diff options
Diffstat (limited to 'cc')
-rw-r--r-- | cc/cc.go | 8 | ||||
-rw-r--r-- | cc/compdb.go | 2 | ||||
-rw-r--r-- | cc/config/arm64_device.go | 10 | ||||
-rw-r--r-- | cc/fdo_profile.go | 9 | ||||
-rw-r--r-- | cc/fuzz.go | 2 | ||||
-rw-r--r-- | cc/library_sdk_member.go | 5 | ||||
-rw-r--r-- | cc/ndk_abi.go | 4 | ||||
-rw-r--r-- | cc/ndk_sysroot.go | 2 | ||||
-rw-r--r-- | cc/sanitize.go | 5 | ||||
-rw-r--r-- | cc/tidy.go | 2 |
10 files changed, 29 insertions, 20 deletions
@@ -3422,7 +3422,7 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps { return } - commonInfo := android.OtherModuleProviderOrDefault(ctx, dep, android.CommonModuleInfoProvider) + commonInfo := android.OtherModulePointerProviderOrDefault(ctx, dep, android.CommonModuleInfoProvider) if commonInfo.Target.Os != ctx.Os() { ctx.ModuleErrorf("OS mismatch between %q (%s) and %q (%s)", ctx.ModuleName(), ctx.Os().Name, depName, dep.Target().Os.Name) return @@ -3676,7 +3676,7 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps { c.sabi.Properties.ReexportedSystemIncludes, depExporterInfo.SystemIncludeDirs.Strings()...) } - makeLibName := MakeLibName(ccInfo, linkableInfo, &commonInfo, commonInfo.BaseModuleName) + libDepTag.makeSuffix + makeLibName := MakeLibName(ccInfo, linkableInfo, commonInfo, commonInfo.BaseModuleName) + libDepTag.makeSuffix switch { case libDepTag.header(): c.Properties.AndroidMkHeaderLibs = append( @@ -3703,7 +3703,7 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps { switch depTag { case runtimeDepTag: c.Properties.AndroidMkRuntimeLibs = append( - c.Properties.AndroidMkRuntimeLibs, MakeLibName(ccInfo, linkableInfo, &commonInfo, + c.Properties.AndroidMkRuntimeLibs, MakeLibName(ccInfo, linkableInfo, commonInfo, commonInfo.BaseModuleName)+libDepTag.makeSuffix) case objDepTag: depPaths.Objs.objFiles = append(depPaths.Objs.objFiles, linkFile.Path()) @@ -3779,7 +3779,7 @@ func ShouldUseStubForApex(ctx android.ModuleContext, parent android.Module, dep // platform APIs, use stubs only when it is from an APEX (and not from // platform) However, for host, ramdisk, vendor_ramdisk, recovery or // bootstrap modules, always link to non-stub variant - isNotInPlatform := android.OtherModuleProviderOrDefault(ctx, dep, android.CommonModuleInfoProvider).NotInPlatform + isNotInPlatform := android.OtherModulePointerProviderOrDefault(ctx, dep, android.CommonModuleInfoProvider).NotInPlatform useStubs = isNotInPlatform && !bootstrap } else { diff --git a/cc/compdb.go b/cc/compdb.go index 4132e090b..3818e9c46 100644 --- a/cc/compdb.go +++ b/cc/compdb.go @@ -193,7 +193,7 @@ func generateCompdbProject(compiledModule CompiledInterface, ctx android.Singlet } builds[src.String()] = compDbEntry{ Directory: android.AbsSrcDirForExistingUseCases(), - Arguments: getArguments(src, ctx, ccModule, ccPath, cxxPath), + Arguments: args, File: src.String(), } } diff --git a/cc/config/arm64_device.go b/cc/config/arm64_device.go index 45b15809f..25edb798d 100644 --- a/cc/config/arm64_device.go +++ b/cc/config/arm64_device.go @@ -53,6 +53,16 @@ var ( "-mbranch-protection=standard", "-fno-stack-protector", }, + "armv9-3a": []string{ + "-march=armv9.3-a", + "-mbranch-protection=standard", + "-fno-stack-protector", + }, + "armv9-4a": []string{ + "-march=armv9.4-a", + "-mbranch-protection=standard", + "-fno-stack-protector", + }, } arm64Ldflags = []string{ diff --git a/cc/fdo_profile.go b/cc/fdo_profile.go index 1a3395773..c79ea1018 100644 --- a/cc/fdo_profile.go +++ b/cc/fdo_profile.go @@ -17,6 +17,8 @@ package cc import ( "android/soong/android" "github.com/google/blueprint" + + "github.com/google/blueprint/proptools" ) func init() { @@ -34,7 +36,7 @@ type fdoProfile struct { } type fdoProfileProperties struct { - Profile *string `android:"arch_variant"` + Profile proptools.Configurable[string] `android:"arch_variant,replace_instead_of_append"` } // FdoProfileInfo is provided by FdoProfileProvider @@ -47,8 +49,9 @@ var FdoProfileProvider = blueprint.NewProvider[FdoProfileInfo]() // GenerateAndroidBuildActions of fdo_profile does not have any build actions func (fp *fdoProfile) GenerateAndroidBuildActions(ctx android.ModuleContext) { - if fp.properties.Profile != nil { - path := android.PathForModuleSrc(ctx, *fp.properties.Profile) + profile := fp.properties.Profile.GetOrDefault(ctx, "") + if profile != "" { + path := android.PathForModuleSrc(ctx, profile) android.SetProvider(ctx, FdoProfileProvider, FdoProfileInfo{ Path: path, }) diff --git a/cc/fuzz.go b/cc/fuzz.go index ba343876f..79874fc80 100644 --- a/cc/fuzz.go +++ b/cc/fuzz.go @@ -486,7 +486,7 @@ func (s *ccRustFuzzPackager) GenerateBuildActions(ctx android.SingletonContext) sharedLibsInstallDirPrefix = "lib/vendor" } - commonInfo := android.OtherModuleProviderOrDefault(ctx, module, android.CommonModuleInfoProvider) + commonInfo := android.OtherModulePointerProviderOrDefault(ctx, module, android.CommonModuleInfoProvider) isHost := commonInfo.Target.Os.Class == android.Host hostOrTargetString := "target" if commonInfo.Target.HostCross { diff --git a/cc/library_sdk_member.go b/cc/library_sdk_member.go index d1440eaad..46290300c 100644 --- a/cc/library_sdk_member.go +++ b/cc/library_sdk_member.go @@ -573,9 +573,8 @@ func (p *nativeLibInfoProperties) PopulateFromVariant(ctx android.SdkMemberConte func getRequiredMemberOutputFile(ctx android.SdkMemberContext, ccModule *Module) android.Path { var path android.Path - outputFile := ccModule.OutputFile() - if outputFile.Valid() { - path = outputFile.Path() + if info, ok := android.OtherModuleProvider(ctx.SdkModuleContext(), ccModule, LinkableInfoProvider); ok && info.OutputFile.Valid() { + path = info.OutputFile.Path() } else { ctx.SdkModuleContext().ModuleErrorf("member variant %s does not have a valid output file", ccModule) } diff --git a/cc/ndk_abi.go b/cc/ndk_abi.go index a59cc11eb..b96a779cb 100644 --- a/cc/ndk_abi.go +++ b/cc/ndk_abi.go @@ -40,7 +40,7 @@ type ndkAbiDumpSingleton struct{} func (n *ndkAbiDumpSingleton) GenerateBuildActions(ctx android.SingletonContext) { var depPaths android.Paths ctx.VisitAllModuleProxies(func(module android.ModuleProxy) { - if !android.OtherModuleProviderOrDefault(ctx, module, android.CommonModuleInfoProvider).Enabled { + if !android.OtherModulePointerProviderOrDefault(ctx, module, android.CommonModuleInfoProvider).Enabled { return } @@ -78,7 +78,7 @@ type ndkAbiDiffSingleton struct{} func (n *ndkAbiDiffSingleton) GenerateBuildActions(ctx android.SingletonContext) { var depPaths android.Paths ctx.VisitAllModuleProxies(func(module android.ModuleProxy) { - if !android.OtherModuleProviderOrDefault(ctx, module, android.CommonModuleInfoProvider).Enabled { + if !android.OtherModulePointerProviderOrDefault(ctx, module, android.CommonModuleInfoProvider).Enabled { return } diff --git a/cc/ndk_sysroot.go b/cc/ndk_sysroot.go index 82a19d0d9..16778627f 100644 --- a/cc/ndk_sysroot.go +++ b/cc/ndk_sysroot.go @@ -212,7 +212,7 @@ func (n *ndkSingleton) GenerateBuildActions(ctx android.SingletonContext) { var licensePaths android.Paths ctx.VisitAllModuleProxies(func(module android.ModuleProxy) { - if !android.OtherModuleProviderOrDefault(ctx, module, android.CommonModuleInfoProvider).Enabled { + if !android.OtherModulePointerProviderOrDefault(ctx, module, android.CommonModuleInfoProvider).Enabled { return } diff --git a/cc/sanitize.go b/cc/sanitize.go index b704ef4bf..f0b0308ae 100644 --- a/cc/sanitize.go +++ b/cc/sanitize.go @@ -1422,6 +1422,7 @@ func sanitizerRuntimeMutator(mctx android.BottomUpMutatorContext) { sanitizers = append(sanitizers, "bool", "integer-divide-by-zero", + "object-size", "return", "returns-nonnull-attribute", "shift-exponent", @@ -1438,10 +1439,6 @@ func sanitizerRuntimeMutator(mctx android.BottomUpMutatorContext) { //"shift-base", //"signed-integer-overflow", ) - - if mctx.Config().ReleaseBuildObjectSizeSanitizer() { - sanitizers = append(sanitizers, "object-size") - } } sanitizers = append(sanitizers, sanProps.Misc_undefined...) } diff --git a/cc/tidy.go b/cc/tidy.go index e8e1dc29d..bf273e986 100644 --- a/cc/tidy.go +++ b/cc/tidy.go @@ -220,7 +220,7 @@ func collectTidyObjModuleTargets(ctx android.SingletonContext, module android.Mo // (1) Collect all obj/tidy files into OS-specific groups. ctx.VisitAllModuleVariantProxies(module, func(variant android.ModuleProxy) { - osName := android.OtherModuleProviderOrDefault(ctx, variant, android.CommonModuleInfoProvider).Target.Os.Name + osName := android.OtherModulePointerProviderOrDefault(ctx, variant, android.CommonModuleInfoProvider).Target.Os.Name info := android.OtherModuleProviderOrDefault(ctx, variant, CcObjectInfoProvider) addToOSGroup(osName, info.ObjFiles, allObjFileGroups, subsetObjFileGroups) addToOSGroup(osName, info.TidyFiles, allTidyFileGroups, subsetTidyFileGroups) |