Export rust flags to bazel

Bug: 290790800
Test: Inspect out/soong/soong_inspection folder after running `m bp2build`
Change-Id: Iffc43a540f67e5f07d109a0a87f3248fae035267
This commit is contained in:
Vinh Tran
2023-09-21 15:28:53 -04:00
parent c68afc4e9f
commit 50de8becd1
2 changed files with 15 additions and 9 deletions

View File

@@ -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.