Fix static_ndk_lib for sanitized libraries.
Test: build-ndk-prebuilts.sh with libc/libm included in the NDK Bug: https://github.com/android-ndk/ndk/issues/272 Change-Id: Ic398f541036f6c16f7dc58b9af984c60ed948495
This commit is contained in:
@@ -729,7 +729,8 @@ func (library *libraryDecorator) install(ctx ModuleContext, file android.Path) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if Bool(library.Properties.Static_ndk_lib) && library.static() &&
|
if Bool(library.Properties.Static_ndk_lib) && library.static() &&
|
||||||
!ctx.useVndk() && ctx.Device() {
|
!ctx.useVndk() && ctx.Device() &&
|
||||||
|
library.sanitize.isUnsanitizedVariant() {
|
||||||
installPath := getNdkSysrootBase(ctx).Join(
|
installPath := getNdkSysrootBase(ctx).Join(
|
||||||
ctx, "usr/lib", ctx.toolchain().ClangTriple(), file.Base())
|
ctx, "usr/lib", ctx.toolchain().ClangTriple(), file.Base())
|
||||||
|
|
||||||
|
@@ -514,6 +514,12 @@ func (sanitize *sanitize) getSanitizerBoolPtr(t sanitizerType) *bool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (sanitize *sanitize) isUnsanitizedVariant() bool {
|
||||||
|
return !sanitize.isSanitizerEnabled(asan) &&
|
||||||
|
!sanitize.isSanitizerEnabled(tsan) &&
|
||||||
|
!sanitize.isSanitizerEnabled(cfi)
|
||||||
|
}
|
||||||
|
|
||||||
func (sanitize *sanitize) SetSanitizer(t sanitizerType, b bool) {
|
func (sanitize *sanitize) SetSanitizer(t sanitizerType, b bool) {
|
||||||
switch t {
|
switch t {
|
||||||
case asan:
|
case asan:
|
||||||
|
Reference in New Issue
Block a user