aboutsummaryrefslogtreecommitdiff
path: root/soong
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 /soong
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
Diffstat (limited to 'soong')
-rw-r--r--soong/clangprebuilts.go26
1 files changed, 6 insertions, 20 deletions
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)