Support static_executable: true for musl builds
Bug: 190084016
Test: aosp-build-tools linux_musl build
Change-Id: I630c54033c44ddd6b54388ed36642629cf2e4e5b
diff --git a/cc/binary.go b/cc/binary.go
index 24c9918..b423c50 100644
--- a/cc/binary.go
+++ b/cc/binary.go
@@ -212,7 +212,7 @@
func (binary *binaryDecorator) linkerInit(ctx BaseModuleContext) {
binary.baseLinker.linkerInit(ctx)
- if !ctx.toolchain().Bionic() {
+ if !ctx.toolchain().Bionic() && !ctx.toolchain().Musl() {
if ctx.Os() == android.Linux {
// Unless explicitly specified otherwise, host static binaries are built with -static
// if HostStaticBinaries is true for the product configuration.