Merge "Skip default dependencies for header libraries" am: 4ba70ab48e

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687468

Change-Id: I2e40e73ea5099e88ed65bb8eaf6bea0c51b9ee42
This commit is contained in:
Colin Cross
2021-04-27 16:53:33 +00:00
committed by Automerger Merge Worker
2 changed files with 3 additions and 1 deletions

View File

@@ -322,7 +322,7 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps {
if ctx.toolchain().Bionic() {
// libclang_rt.builtins has to be last on the command line
if !Bool(linker.Properties.No_libcrt) {
if !Bool(linker.Properties.No_libcrt) && !ctx.header() {
deps.LateStaticLibs = append(deps.LateStaticLibs, config.BuiltinsRuntimeLibrary(ctx.toolchain()))
}

View File

@@ -62,6 +62,8 @@ func (stl *stl) begin(ctx BaseModuleContext) {
s := ""
if stl.Properties.Stl != nil {
s = *stl.Properties.Stl
} else if ctx.header() {
s = "none"
}
if ctx.useSdk() && ctx.Device() {
switch s {