From a793db33a2d8dcba98b23d1a8c59ef6fb1579214 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 18 Aug 2021 13:53:58 -0700 Subject: [PATCH] Support static_executable: true for musl builds Bug: 190084016 Test: aosp-build-tools linux_musl build Change-Id: I630c54033c44ddd6b54388ed36642629cf2e4e5b --- cc/binary.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cc/binary.go b/cc/binary.go index 24c99185d..b423c50ae 100644 --- a/cc/binary.go +++ b/cc/binary.go @@ -212,7 +212,7 @@ func NewBinary(hod android.HostOrDeviceSupported) (*Module, *binaryDecorator) { 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.