aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2021-04-21 18:24:38 -0700
committerColin Cross <ccross@android.com>2021-04-21 18:24:38 -0700
commit390142a2d3a9ad1fa5934dca238184e663ede234 (patch)
treebd268a49665636505beb5e82a184dbb057f68741
parent0f0ec3b6f93fcd52395fdbbc1db591b0f1a07d64 (diff)
downloadlinux-x86-390142a2d3a9ad1fa5934dca238184e663ede234.tar.gz
Replace libclang_rt_llndk_library with is_llndk in libclang_rt_prebuilt_library_shared
Remove the vestigial libclang_rt_llndk_library modules and replace them with is_llndk in the implementation libclang_rt_prebuilt_library_shared, which will be translated to the appropriate llndk.symbol_file property. Bug: 170784825 Test: m checkbuild Test: compare out/soong/build.ninja Change-Id: Ie972d2bfe35b9efb3d06ae43fa344de802d67c2d
-rw-r--r--Android.bp66
-rw-r--r--soong/clangprebuilts.go26
2 files changed, 11 insertions, 81 deletions
diff --git a/Android.bp b/Android.bp
index d9db31dd8..deb7449f4 100644
--- a/Android.bp
+++ b/Android.bp
@@ -230,7 +230,7 @@ libclang_rt_prebuilt_library_shared {
defaults: ["libclang_rt.asan-android-default"],
sdk_version: "24",
check_elf_files: false, // Bypass circular dependency between libc++
- llndk_stubs: "libclang_rt.asan-arm-android.llndk",
+ is_llndk: true,
arch: {
arm: {
enabled: true,
@@ -242,7 +242,7 @@ libclang_rt_prebuilt_library_shared {
name: "libclang_rt.asan-aarch64-android",
defaults: ["libclang_rt.asan-android-default"],
check_elf_files: false, // Bypass circular dependency between libc++
- llndk_stubs: "libclang_rt.asan-aarch64-android.llndk",
+ is_llndk: true,
host_supported: true,
arch: {
arm64: {
@@ -255,7 +255,7 @@ libclang_rt_prebuilt_library_shared {
name: "libclang_rt.asan-i686-android",
defaults: ["libclang_rt.asan-android-default"],
check_elf_files: false, // Bypass circular dependency between libc++
- llndk_stubs: "libclang_rt.asan-i686-android.llndk",
+ is_llndk: true,
arch: {
x86: {
enabled: true,
@@ -270,7 +270,7 @@ libclang_rt_prebuilt_library_shared {
"libclang_rt.asan-android-default",
],
check_elf_files: false, // Bypass circular dependency between libc++
- llndk_stubs: "libclang_rt.asan-x86_64-android.llndk",
+ is_llndk: true,
arch: {
x86_64: {
enabled: true,
@@ -279,62 +279,6 @@ libclang_rt_prebuilt_library_shared {
}
///////////////////////////////////////////////////////////////////////////////
-libclang_rt_llndk_library {
- name: "libclang_rt.asan-arm-android.llndk",
- native_bridge_supported: true,
- enabled: false,
- arch: {
- arm: {
- enabled: true,
- },
- },
-}
-
-libclang_rt_llndk_library {
- name: "libclang_rt.asan-aarch64-android.llndk",
- native_bridge_supported: true,
- enabled: false,
- arch: {
- arm64: {
- enabled: true,
- },
- },
-}
-
-libclang_rt_llndk_library {
- name: "libclang_rt.asan-i686-android.llndk",
- native_bridge_supported: true,
- enabled: false,
- arch: {
- x86: {
- enabled: true,
- },
- },
-}
-
-libclang_rt_llndk_library {
- name: "libclang_rt.asan-x86_64-android.llndk",
- native_bridge_supported: true,
- enabled: false,
- arch: {
- x86_64: {
- enabled: true,
- },
- },
-}
-
-///////////////////////////////////////////////////////////////////////////////
-libclang_rt_llndk_library {
- name: "libclang_rt.hwasan-aarch64-android.llndk",
- enabled: false,
- arch: {
- arm64: {
- enabled: true,
- },
- },
-}
-
-///////////////////////////////////////////////////////////////////////////////
cc_defaults {
name: "libclang_rt.ubsan_standalone-android-default",
defaults: ["libclang_rt-prebuilt-default"],
@@ -627,7 +571,7 @@ libclang_rt_prebuilt_library_shared {
},
},
check_elf_files: false, // Bypass circular dependency between libc++
- llndk_stubs: "libclang_rt.hwasan-aarch64-android.llndk",
+ is_llndk: true,
defaults: [
"libclang_rt-prebuilt-default",
],
diff --git a/soong/clangprebuilts.go b/soong/clangprebuilts.go
index bf7f5262b..c0979c203 100644
--- a/soong/clangprebuilts.go
+++ b/soong/clangprebuilts.go
@@ -51,8 +51,6 @@ func init() {
libClangRtPrebuiltLibrarySharedFactory)
android.RegisterModuleType("libclang_rt_prebuilt_library_static",
libClangRtPrebuiltLibraryStaticFactory)
- android.RegisterModuleType("libclang_rt_llndk_library",
- libClangRtLLndkLibraryFactory)
android.RegisterModuleType("llvm_darwin_filegroup",
llvmDarwinFileGroupFactory)
android.RegisterModuleType("clang_builtin_headers",
@@ -199,7 +197,7 @@ func llvmPrebuiltLibraryStatic(ctx android.LoadHookContext) {
}
type prebuiltLibrarySharedProps struct {
- Llndk_stubs *string
+ Is_llndk *bool
Shared_libs []string
}
@@ -227,6 +225,9 @@ func libClangRtPrebuiltLibraryShared(ctx android.LoadHookContext, in *prebuiltLi
Symbol_file *string
Versions []string
}
+ Llndk struct {
+ Symbol_file *string
+ }
}
p := &props{}
@@ -242,9 +243,10 @@ func libClangRtPrebuiltLibraryShared(ctx android.LoadHookContext, in *prebuiltLi
p.Pack_relocations = &disable
p.Stl = proptools.StringPtr("none")
- if proptools.String(in.Llndk_stubs) != "" {
+ if proptools.Bool(in.Is_llndk) {
p.Stubs.Versions = []string{"29", "10000"}
p.Stubs.Symbol_file = proptools.StringPtr(getSymbolFilePath(ctx))
+ p.Llndk.Symbol_file = proptools.StringPtr(getSymbolFilePath(ctx))
}
ctx.AppendProperties(p)
@@ -274,16 +276,6 @@ func libClangRtPrebuiltLibraryStatic(ctx android.LoadHookContext) {
ctx.AppendProperties(p)
}
-func libClangRtLLndkLibrary(ctx android.LoadHookContext) {
- type props struct {
- Symbol_file *string
- }
-
- p := &props{}
- p.Symbol_file = proptools.StringPtr(getSymbolFilePath(ctx))
- ctx.AppendProperties(p)
-}
-
func llvmDarwinFileGroup(ctx android.LoadHookContext) {
clangDir := getClangPrebuiltDir(ctx)
libName := strings.TrimSuffix(ctx.ModuleName(), "_darwin")
@@ -334,12 +326,6 @@ func libClangRtPrebuiltLibraryStaticFactory() android.Module {
return module.Init()
}
-func libClangRtLLndkLibraryFactory() android.Module {
- module := cc.NewLLndkStubLibrary()
- android.AddLoadHook(module, libClangRtLLndkLibrary)
- return module.Init()
-}
-
func llvmDarwinFileGroupFactory() android.Module {
module := android.FileGroupFactory()
android.AddLoadHook(module, llvmDarwinFileGroup)