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:
parent
e021b0405d
commit
7d1eecf3cc
2 changed files with 8 additions and 1 deletions
|
@ -729,7 +729,8 @@ func (library *libraryDecorator) install(ctx ModuleContext, file android.Path) {
|
|||
}
|
||||
|
||||
if Bool(library.Properties.Static_ndk_lib) && library.static() &&
|
||||
!ctx.useVndk() && ctx.Device() {
|
||||
!ctx.useVndk() && ctx.Device() &&
|
||||
library.sanitize.isUnsanitizedVariant() {
|
||||
installPath := getNdkSysrootBase(ctx).Join(
|
||||
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) {
|
||||
switch t {
|
||||
case asan:
|
||||
|
|
Loading…
Reference in a new issue