Merge "Change stdlib linkage for C libraries."
This commit is contained in:
commit
bdebb171cc
|
@ -19,6 +19,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
|
"android/soong/rust/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -304,6 +305,15 @@ func (library *libraryDecorator) compilerProps() []interface{} {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (library *libraryDecorator) compilerDeps(ctx DepsContext, deps Deps) Deps {
|
func (library *libraryDecorator) compilerDeps(ctx DepsContext, deps Deps) Deps {
|
||||||
|
|
||||||
|
// TODO(b/144861059) Remove if C libraries support dylib linkage in the future.
|
||||||
|
if !ctx.Host() && (library.static() || library.shared()) {
|
||||||
|
library.setNoStdlibs()
|
||||||
|
for _, stdlib := range config.Stdlibs {
|
||||||
|
deps.Rlibs = append(deps.Rlibs, stdlib+".static")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
deps = library.baseCompiler.compilerDeps(ctx, deps)
|
deps = library.baseCompiler.compilerDeps(ctx, deps)
|
||||||
|
|
||||||
if ctx.toolchain().Bionic() && (library.dylib() || library.shared()) {
|
if ctx.toolchain().Bionic() && (library.dylib() || library.shared()) {
|
||||||
|
|
Loading…
Reference in New Issue