summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinh Tran <vinhdaitran@google.com>2023-10-06 15:21:32 -0400
committerVinh Tran <vinhdaitran@google.com>2023-10-06 15:21:32 -0400
commitba0d00462edc7b687d49adbc64d3e762ea1a21b3 (patch)
treef712235f4483e867ce22b6911da16e659ece839a
parentb8e776611e9c910548dcacdcb401098b3cb3d95b (diff)
downloadrust-ba0d00462edc7b687d49adbc64d3e762ea1a21b3.tar.gz
Remove generic flags for stdlibs from BUILD file
This brings the BUILD file almost identical prebuilts/rust/Android.bp modulo the prebuilt modules (b/299647037). Bug: 295918553 Test: b build //build/bazel/examples/rust:all --config=android Change-Id: I968bf90e04ac822d8c8bc179212ba168ac6ad574
-rw-r--r--linux-x86/1.72.0/BUILD.bazel21
1 files changed, 3 insertions, 18 deletions
diff --git a/linux-x86/1.72.0/BUILD.bazel b/linux-x86/1.72.0/BUILD.bazel
index ea0e6786..66dd5f53 100644
--- a/linux-x86/1.72.0/BUILD.bazel
+++ b/linux-x86/1.72.0/BUILD.bazel
@@ -21,17 +21,6 @@ rust_stdlib_filegroup(
srcs = glob(["lib/rustlib/x86_64_unknown-linux-gnu/*"]),
)
-# Flags for vendored dependencies.
-COMMON_INTERNAL_CRATE_RUSTC_FLAGS = [
- # Even though --cap-lints=allow is set at the toolchain level (b/301466790),
- # setting it again here is needed to disble linting in all upstream deps
- "--cap-lints=allow",
- # TODO(b/302716992) This flag isn't set in Soong but is needed in Bazel\
- # because rust rule emits metadata by default causing a compile error when
- # compiling metadata if this flag is missed
- "-Zforce-unstable-if-unmarked",
-]
-
filegroup(
name = "stdlib_sources",
srcs = [
@@ -89,7 +78,7 @@ rust_library(
rustc_env = {
"STD_ENV_ARCH": "aarch64",
},
- rustc_flags = COMMON_INTERNAL_CRATE_RUSTC_FLAGS + [
+ rustc_flags = [
"--cfg=backtrace_in_libstd",
],
visibility = ["//visibility:public"],
@@ -134,7 +123,7 @@ rust_library(
"no_std",
],
crate_name = "hashbrown",
- rustc_flags = COMMON_INTERNAL_CRATE_RUSTC_FLAGS + [
+ rustc_flags = [
"--cfg=has_extern_crate_alloc",
],
deps = [
@@ -172,7 +161,6 @@ rust_library(
],
crate_name = "compiler_builtins",
edition = "2015",
- rustc_flags = COMMON_INTERNAL_CRATE_RUSTC_FLAGS,
deps = [
"libcore.rust_sysroot",
],
@@ -233,7 +221,6 @@ rust_library(
"no_std",
],
crate_name = "cfg_if",
- rustc_flags = COMMON_INTERNAL_CRATE_RUSTC_FLAGS,
deps = [
":libcompiler_builtins.rust_sysroot",
":libcore.rust_sysroot",
@@ -248,7 +235,6 @@ rust_library(
"no_std",
],
crate_name = "panic_abort",
- rustc_flags = COMMON_INTERNAL_CRATE_RUSTC_FLAGS,
deps = [
":liballoc.rust_sysroot",
":libcfg_if.rust_sysroot",
@@ -277,7 +263,7 @@ rust_library(
"--cfg=libc_core_cvoid",
"--cfg=libc_packedN",
"--cfg=libc_thread_local",
- ] + COMMON_INTERNAL_CRATE_RUSTC_FLAGS,
+ ],
deps = [
":libcfg_if.rust_sysroot",
":libcompiler_builtins.rust_sysroot",
@@ -293,7 +279,6 @@ rust_library(
"no_std",
],
crate_name = "unwind",
- rustc_flags = COMMON_INTERNAL_CRATE_RUSTC_FLAGS,
deps = [
":libcfg_if.rust_sysroot",
":libcompiler_builtins.rust_sysroot",