From 8fd5afdbb9b2c2be8c834d87854adfbdcac41fdc Mon Sep 17 00:00:00 2001 From: Marvin Hansen Date: Tue, 8 Oct 2024 14:50:53 +0800 Subject: [PATCH] Fixed CI Signed-off-by: Marvin Hansen --- examples/bzlmod/cross_compile/.bazelignore | 8 -------- examples/bzlmod/cross_compile/.bazelrc | 2 +- examples/bzlmod/cross_compile/BUILD.bazel | 15 ++++++++++++--- examples/bzlmod/hello_world_no_cargo/BUILD.bazel | 4 ++-- 4 files changed, 15 insertions(+), 14 deletions(-) delete mode 100644 examples/bzlmod/cross_compile/.bazelignore diff --git a/examples/bzlmod/cross_compile/.bazelignore b/examples/bzlmod/cross_compile/.bazelignore deleted file mode 100644 index b5e6d8effc..0000000000 --- a/examples/bzlmod/cross_compile/.bazelignore +++ /dev/null @@ -1,8 +0,0 @@ -.cargo -.git -target -target-bzl -target-bzl/bin -target-bzl/out -target-bzl/quant-engine -target-bzl/testlogs \ No newline at end of file diff --git a/examples/bzlmod/cross_compile/.bazelrc b/examples/bzlmod/cross_compile/.bazelrc index 70d4a4f51f..cf48c2de80 100644 --- a/examples/bzlmod/cross_compile/.bazelrc +++ b/examples/bzlmod/cross_compile/.bazelrc @@ -11,7 +11,7 @@ # Don't create bazel-* symlinks in the WORKSPACE directory. # Instead, set a prefix and put it in .gitignore -build --symlink_prefix=target-bzl/ +build --symlink_prefix=target-bzl # Non-empty glob test is disabled because some Bazels deps fail the test. # build --incompatible_disallow_empty_glob diff --git a/examples/bzlmod/cross_compile/BUILD.bazel b/examples/bzlmod/cross_compile/BUILD.bazel index 51ef4130f4..5d1548ff7b 100644 --- a/examples/bzlmod/cross_compile/BUILD.bazel +++ b/examples/bzlmod/cross_compile/BUILD.bazel @@ -14,21 +14,30 @@ filegroup( rust_binary( name = "hello_world_host", srcs = ["src/main.rs"], - deps = [], + deps = [ + "@crates//:mimalloc", + "@crates//:lz4-sys", + ], ) rust_binary( name = "hello_world_x86_64", srcs = ["src/main.rs"], platform = "//build/platforms:linux-x86_64", - deps = [], + deps = [ + "@crates//:mimalloc", + "@crates//:lz4-sys", + ], ) rust_binary( name = "hello_world_aarch64", srcs = ["src/main.rs"], platform = "//build/platforms:linux-aarch64", - deps = [], + deps = [ + "@crates//:mimalloc", + "@crates//:lz4-sys", + ], ) # Test if the host binary works. diff --git a/examples/bzlmod/hello_world_no_cargo/BUILD.bazel b/examples/bzlmod/hello_world_no_cargo/BUILD.bazel index 54d62227d6..9e805891f1 100644 --- a/examples/bzlmod/hello_world_no_cargo/BUILD.bazel +++ b/examples/bzlmod/hello_world_no_cargo/BUILD.bazel @@ -6,7 +6,7 @@ rust_binary( name = "hello_world", srcs = ["src/main.rs"], deps = [ - "@crates//:mimalloc", - "@crates//:lz4-sys", + "@crates//:anyhow", + "@crates//:uuid", ], )