From 07fd7e32fd3ab47ebd02c3014ed2bdff7d59e613 Mon Sep 17 00:00:00 2001 From: Ivan Lozano Date: Tue, 30 Apr 2024 11:22:26 -0400 Subject: [PATCH] rust: Add a default cfg indicating an AOSP build This adds a cfg flag `android_platform` which can be used to indicate there's some conditional compilation need specific to AOSP. Test: New flag is emitted on builds Change-Id: I833a7d68db2dad7ab2d32a5eb51d764f0d66b849 --- rust/config/global.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rust/config/global.go b/rust/config/global.go index 23230492f..8cc9d4cc0 100644 --- a/rust/config/global.go +++ b/rust/config/global.go @@ -53,6 +53,9 @@ var ( "--color=always", "-Z dylib-lto", "-Z link-native-libraries=no", + + // cfg flag to indicate that we are building in AOSP with Soong + "--cfg soong", } LinuxHostGlobalLinkFlags = []string{