Skip to content

Commit

Permalink
[eclipse-iceoryx#439] Try fix cbindgen generation for bazel 6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Oct 10, 2024
1 parent 43eb550 commit 488f39f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#
# SPDX-License-Identifier: Apache-2.0 OR MIT

package(default_visibility = ["//visibility:public"])

exports_files([
"LICENSE-APACHE",
"LICENSE-MIT",
Expand Down
13 changes: 11 additions & 2 deletions iceoryx2-ffi/ffi/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,24 @@ filegroup(
srcs = ["@cbindgen//file"],
)

filegroup(
name = "ffi-cargo-dir",
srcs = ["."],
)

genrule(
name = "iceoryx2-ffi-cbindgen",
srcs = glob(["src/**/*.rs"]) + [
"//:Cargo.toml",
"Cargo.toml",
"cbindgen.toml",
":cbindgen-cli",
"src"
"//:all_srcs",
#":ffi-cargo-dir",
],
outs = ["include/iox2/iceoryx2.h"],
cmd = "$(execpath :cbindgen-cli) --config $(location cbindgen.toml) --output $(OUTS) $(location src)/..",
cmd = "$(execpath :cbindgen-cli) --config $(location cbindgen.toml) --output $(OUTS) $$(dirname $(location Cargo.toml))",
# cmd = "$(execpath :cbindgen-cli) --config $(location cbindgen.toml) --output $(OUTS) $(location :ffi-cargo-dir)",
)

rust_shared_library(
Expand Down

0 comments on commit 488f39f

Please sign in to comment.