aboutsummaryrefslogtreecommitdiffstats
path: root/cc/linker.go
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2016-11-17 01:02:25 -0800
committerDan Willemsen <dwillemsen@google.com>2016-11-17 01:50:43 -0800
commit2e47b34435de8cfe3f1533c553fe546217c98b3c (patch)
treebe009e1af663c782465c0bd9cf2545926eea367d /cc/linker.go
parent967c6a9b87eb4eca13449498183e3f191843c9cd (diff)
downloadbuild_soong-2e47b34435de8cfe3f1533c553fe546217c98b3c.tar.gz
build_soong-2e47b34435de8cfe3f1533c553fe546217c98b3c.tar.bz2
build_soong-2e47b34435de8cfe3f1533c553fe546217c98b3c.zip
Add Toolchain.Bionic()
Move some cc ctx.Host() / ctx.Device() checks over to using ctx.toolchain().Bionic(). There will be more changes, these are just the obvious ones dealing with host_ldlibs / crt / system libraries. Bug: 31559095 Test: out/soong/build.ninja is identical Change-Id: Ibba60483b4ab0e01f6996eb7d883120e4acc1830
Diffstat (limited to 'cc/linker.go')
-rw-r--r--cc/linker.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cc/linker.go b/cc/linker.go
index 28572c69..6d4edbcf 100644
--- a/cc/linker.go
+++ b/cc/linker.go
@@ -119,7 +119,7 @@ func (linker *baseLinker) linkerDeps(ctx BaseModuleContext, deps Deps) Deps {
deps.LateStaticLibs = append(deps.LateStaticLibs, "libcompiler_rt-extras")
}
- if ctx.Device() {
+ if ctx.toolchain().Bionic() {
// libgcc and libatomic have to be last on the command line
deps.LateStaticLibs = append(deps.LateStaticLibs, "libatomic")
if !Bool(linker.Properties.No_libgcc) {
@@ -165,7 +165,7 @@ func (linker *baseLinker) linkerFlags(ctx ModuleContext, flags Flags) Flags {
flags.LdFlags = append(flags.LdFlags, toolchain.Ldflags())
}
- if ctx.Host() {
+ if !ctx.toolchain().Bionic() {
CheckBadHostLdlibs(ctx, "host_ldlibs", linker.Properties.Host_ldlibs)
flags.LdFlags = append(flags.LdFlags, linker.Properties.Host_ldlibs...)