summaryrefslogtreecommitdiff
path: root/rust/config/global.go
diff options
context:
space:
mode:
author A. Cody Schuffelen <schuffelen@google.com> 2023-07-13 19:03:39 -0700
committer A. Cody Schuffelen <schuffelen@google.com> 2023-08-03 16:26:44 -0700
commitf29ca58e88c5846bbe8955e5192135e5ab4f14a1 (patch)
tree1eea81e6f3b0a185c5e9b87ef018b10ef6c144a1 /rust/config/global.go
parentcfe9e6d00823dbf4bfdd9f29a57c6a82baf68e97 (diff)
Darwin/Mac OS host rust compilation fixes
- Don't pass `--as-needed` to the linker on Mac OS which is unsupported there - Use `--force_load` rather than `--Wl,--whole-archive` on Mac OS - Scan `rustc`'s linker arguments for `-dylib` and `-dynamiclib`, which it can use instead of `-shared` on Mac OS: https://github.com/rust-lang/rust/blob/7bd81ee1902c049691d0a1f03be5558bee51d100/compiler/rustc_codegen_ssa/src/back/linker.rs#L319 Test: m libhalf serde_derive Bug: 291164566 Change-Id: Iecd6c2532fa31c9476834f49b109de98cbd2dccf
Diffstat (limited to 'rust/config/global.go')
-rw-r--r--rust/config/global.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/rust/config/global.go b/rust/config/global.go
index c39341e4c..86eb2d1cb 100644
--- a/rust/config/global.go
+++ b/rust/config/global.go
@@ -102,7 +102,6 @@ func init() {
pctx.ImportAs("cc_config", "android/soong/cc/config")
pctx.StaticVariable("RustLinker", "${cc_config.ClangBin}/clang++")
- pctx.StaticVariable("RustLinkerArgs", "-Wl,--as-needed")
pctx.StaticVariable("DeviceGlobalLinkFlags", strings.Join(deviceGlobalLinkFlags, " "))