diff options
Diffstat (limited to 'cc')
-rw-r--r-- | cc/afdo.go | 2 | ||||
-rw-r--r-- | cc/library.go | 14 | ||||
-rw-r--r-- | cc/test.go | 3 |
3 files changed, 18 insertions, 1 deletions
diff --git a/cc/afdo.go b/cc/afdo.go index 1233e332e..9be39185c 100644 --- a/cc/afdo.go +++ b/cc/afdo.go @@ -108,6 +108,8 @@ func (afdo *afdo) flags(ctx ModuleContext, flags Flags) Flags { // Salvage stale profile by fuzzy matching and use the remapped location for sample profile query. flags.Local.CFlags = append([]string{"-mllvm", "--salvage-stale-profile=true"}, flags.Local.CFlags...) flags.Local.CFlags = append([]string{"-mllvm", "--salvage-stale-profile-max-callsites=2000"}, flags.Local.CFlags...) + // Salvage stale profile by fuzzy matching renamed functions. + flags.Local.CFlags = append([]string{"-mllvm", "--salvage-unused-profile=true"}, flags.Local.CFlags...) flags.Local.LdFlags = append([]string{profileUseFlag, "-Wl,-mllvm,-no-warn-sample-unused=true"}, flags.Local.LdFlags...) // Update CFlagsDeps and LdFlagsDeps so the module is rebuilt diff --git a/cc/library.go b/cc/library.go index 8a2b6bdbd..b248224bd 100644 --- a/cc/library.go +++ b/cc/library.go @@ -606,10 +606,22 @@ func (library *libraryDecorator) compile(ctx ModuleContext, flags Flags, deps Pa panic(err) } + llndkFlag := "--llndk" + if ctx.baseModuleName() == "libbinder_ndk" && ctx.inProduct() { + // This is a special case only for the libbinder_ndk. As the product partition is in the + // framework side along with system and system_ext partitions in Treble, libbinder_ndk + // provides different binder interfaces between product and vendor modules. + // In libbinder_ndk, 'llndk' annotation is for the vendor APIs; while 'systemapi' + // annotation is for the product APIs. + // Use '--systemapi' flag for building the llndk stub of product variant for the + // libbinder_ndk. + llndkFlag = "--systemapi" + } + // This is the vendor variant of an LLNDK library, build the LLNDK stubs. nativeAbiResult := ParseNativeAbiDefinition(ctx, String(library.Properties.Llndk.Symbol_file), - nativeClampedApiLevel(ctx, version), "--llndk") + nativeClampedApiLevel(ctx, version), llndkFlag) objs := CompileStubLibrary(ctx, flags, nativeAbiResult.StubSrc, sharedFlags) if !Bool(library.Properties.Llndk.Unversioned) { library.versionScriptPath = android.OptionalPathForPath( diff --git a/cc/test.go b/cc/test.go index d2c4b28e8..8b68c5563 100644 --- a/cc/test.go +++ b/cc/test.go @@ -455,6 +455,9 @@ func (test *testBinary) install(ctx ModuleContext, file android.Path) { if standaloneTestDep.SkipInstall() { continue } + if standaloneTestDep.Partition() == "data" { + continue + } test.binaryDecorator.baseInstaller.installStandaloneTestDep(ctx, standaloneTestDep) } } |