Skip to content

Commit

Permalink
Make bazel supply cxx.h only to compilation
Browse files Browse the repository at this point in the history
These are not needed at runtime. They are used with `include_str!` at
compile time.
  • Loading branch information
dtolnay committed Dec 12, 2024
1 parent d472b95 commit 31fe48d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ alias(
rust_binary(
name = "cxxbridge",
srcs = glob(["gen/cmd/src/**/*.rs"]),
data = ["gen/cmd/src/gen/include/cxx.h"],
compile_data = ["gen/cmd/src/gen/include/cxx.h"],
edition = "2021",
deps = [
"@crates.io//:clap",
Expand Down Expand Up @@ -70,7 +70,7 @@ rust_proc_macro(
rust_library(
name = "cxx-build",
srcs = glob(["gen/build/src/**/*.rs"]),
data = ["gen/build/src/gen/include/cxx.h"],
compile_data = ["gen/build/src/gen/include/cxx.h"],
edition = "2021",
deps = [
"@crates.io//:cc",
Expand All @@ -85,7 +85,7 @@ rust_library(
rust_library(
name = "cxx-gen",
srcs = glob(["gen/lib/src/**/*.rs"]),
data = ["gen/lib/src/gen/include/cxx.h"],
compile_data = ["gen/lib/src/gen/include/cxx.h"],
edition = "2021",
visibility = ["//visibility:public"],
deps = [
Expand Down

0 comments on commit 31fe48d

Please sign in to comment.