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
diff --git a/cc/config/toolchain.go b/cc/config/toolchain.go
index 5a4e032..020a0dd 100644
--- a/cc/config/toolchain.go
+++ b/cc/config/toolchain.go
@@ -74,6 +74,8 @@
SanitizerRuntimeLibraryArch() string
AvailableLibraries() []string
+
+ Bionic() bool
}
type toolchainBase struct {
@@ -133,6 +135,10 @@
return []string{}
}
+func (toolchainBase) Bionic() bool {
+ return true
+}
+
type toolchain64Bit struct {
toolchainBase
}