summaryrefslogtreecommitdiff
path: root/rust/compiler.go
diff options
context:
space:
mode:
author Vinh Tran <vinhdaitran@google.com> 2023-10-04 21:22:15 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-10-04 21:22:15 +0000
commit4414c4e7ff9c57160844aa912ab6815f972a2ad1 (patch)
tree6c479c61a5e76baead463416747f954c8ff2f664 /rust/compiler.go
parente88fe1fb92b971bde9caa4bb6d82ae399cad4fd9 (diff)
parent50de8becd12b8d37d387ea870d280e4a3dea95f6 (diff)
Merge "Export rust flags to bazel" into main
Diffstat (limited to 'rust/compiler.go')
-rw-r--r--rust/compiler.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/rust/compiler.go b/rust/compiler.go
index 98a61af55..b3f574d57 100644
--- a/rust/compiler.go
+++ b/rust/compiler.go
@@ -330,14 +330,7 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flag
if ctx.Os() == android.Linux {
// Add -lc, -lrt, -ldl, -lpthread, -lm and -lgcc_s to glibc builds to match
// the default behavior of device builds.
- flags.LinkFlags = append(flags.LinkFlags,
- "-lc",
- "-lrt",
- "-ldl",
- "-lpthread",
- "-lm",
- "-lgcc_s",
- )
+ flags.LinkFlags = append(flags.LinkFlags, config.LinuxHostGlobalLinkFlags...)
} else if ctx.Os() == android.Darwin {
// Add -lc, -ldl, -lpthread and -lm to glibc darwin builds to match the default
// behavior of device builds.