From 308096475bf02b7cf268ef428438b49c1396228a Mon Sep 17 00:00:00 2001 From: Vinh Tran Date: Thu, 5 Oct 2023 15:05:55 -0400 Subject: [PATCH] Export rust flags for arm, x86, and x86_64 to Bazel Test: b build //build/bazel/examples/rust:all --config=android Bug: 295918553 Change-Id: I53d393f4cc5cd99ccd17d37e32211adaaba5bd0a --- rust/config/arm_device.go | 1 + rust/config/x86_64_device.go | 2 +- rust/config/x86_device.go | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/rust/config/arm_device.go b/rust/config/arm_device.go index 42c1c0256..a5f4afb92 100644 --- a/rust/config/arm_device.go +++ b/rust/config/arm_device.go @@ -44,6 +44,7 @@ func init() { strings.Join(rustFlags, " ")) } + ExportedVars.ExportStringListStaticVariable("DEVICE_ARM_RUSTC_FLAGS", ArmRustFlags) } type toolchainArm struct { diff --git a/rust/config/x86_64_device.go b/rust/config/x86_64_device.go index 45d1fd0a1..c797eefe3 100644 --- a/rust/config/x86_64_device.go +++ b/rust/config/x86_64_device.go @@ -53,7 +53,7 @@ func init() { pctx.StaticVariable("X86_64"+variant+"VariantRustFlags", strings.Join(rustFlags, " ")) } - + ExportedVars.ExportStringListStaticVariable("DEVICE_X86_64_RUSTC_FLAGS", x86_64RustFlags) } type toolchainX86_64 struct { diff --git a/rust/config/x86_device.go b/rust/config/x86_device.go index 43f73400e..822f281a8 100644 --- a/rust/config/x86_device.go +++ b/rust/config/x86_device.go @@ -55,6 +55,7 @@ func init() { strings.Join(rustFlags, " ")) } + ExportedVars.ExportStringListStaticVariable("DEVICE_X86_RUSTC_FLAGS", x86RustFlags) } type toolchainX86 struct {