Lines Matching refs:c

61 func (c Config) BuildDir() string {
62 return c.buildDir
426 func (c *config) mockFileSystem(bp string, fs map[string][]byte) {
450 c.fs = pathtools.MockFs(mockFS)
451 c.mockBpList = blueprint.MockModuleListFile
454 func (c *config) fromEnv() error {
455 switch c.Getenv("EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9") {
465 func (c *config) StopBefore() bootstrap.StopBefore {
466 return c.stopBefore
469 func (c *config) SetStopBefore(stopBefore bootstrap.StopBefore) {
470 c.stopBefore = stopBefore
475 func (c *config) BlueprintToolLocation() string {
476 return filepath.Join(c.buildDir, "host", c.PrebuiltOS(), "bin")
481 func (c *config) HostToolPath(ctx PathContext, tool string) Path {
482 return PathForOutput(ctx, "host", c.PrebuiltOS(), "bin", tool)
485 func (c *config) HostJNIToolPath(ctx PathContext, path string) Path {
490 return PathForOutput(ctx, "host", c.PrebuiltOS(), "lib64", path+ext)
493 func (c *config) HostJavaToolPath(ctx PathContext, path string) Path {
494 return PathForOutput(ctx, "host", c.PrebuiltOS(), "framework", path)
499 func (c *config) HostSystemTool(name string) string {
500 for _, dir := range filepath.SplitList(c.Getenv("PATH")) {
512 func (c *config) PrebuiltOS() string {
524 func (c *config) GoRoot() string {
525 return fmt.Sprintf("%s/prebuilts/go/%s", c.srcDir, c.PrebuiltOS())
528 func (c *config) PrebuiltBuildTool(ctx PathContext, tool string) Path {
529 return PathForSource(ctx, "prebuilts/build-tools", c.PrebuiltOS(), "bin", tool)
532 func (c *config) CpPreserveSymlinksFlags() string {
543 func (c *config) Getenv(key string) string {
546 c.envLock.Lock()
547 defer c.envLock.Unlock()
548 if c.envDeps == nil {
549 c.envDeps = make(map[string]string)
551 if val, exists = c.envDeps[key]; !exists {
552 if c.envFrozen {
555 val, _ = c.env[key]
556 c.envDeps[key] = val
561 func (c *config) GetenvWithDefault(key string, defaultValue string) string {
562 ret := c.Getenv(key)
569 func (c *config) IsEnvTrue(key string) bool {
570 value := c.Getenv(key)
574 func (c *config) IsEnvFalse(key string) bool {
575 value := c.Getenv(key)
579 func (c *config) EnvDeps() map[string]string {
580 c.envLock.Lock()
581 defer c.envLock.Unlock()
582 c.envFrozen = true
583 return c.envDeps
586 func (c *config) EmbeddedInMake() bool {
587 return c.inMake
590 func (c *config) BuildId() string {
591 return String(c.productVariables.BuildId)
594 func (c *config) BuildNumberFile(ctx PathContext) Path {
595 return PathForOutput(ctx, String(c.productVariables.BuildNumberFile))
600 func (c *config) DeviceName() string {
601 return *c.productVariables.DeviceName
604 func (c *config) DeviceResourceOverlays() []string {
605 return c.productVariables.DeviceResourceOverlays
608 func (c *config) ProductResourceOverlays() []string {
609 return c.productVariables.ProductResourceOverlays
612 func (c *config) PlatformVersionName() string {
613 return String(c.productVariables.Platform_version_name)
616 func (c *config) PlatformSdkVersionInt() int {
617 return *c.productVariables.Platform_sdk_version
620 func (c *config) PlatformSdkVersion() string {
621 return strconv.Itoa(c.PlatformSdkVersionInt())
624 func (c *config) PlatformSdkCodename() string {
625 return String(c.productVariables.Platform_sdk_codename)
628 func (c *config) PlatformSecurityPatch() string {
629 return String(c.productVariables.Platform_security_patch)
632 func (c *config) PlatformPreviewSdkVersion() string {
633 return String(c.productVariables.Platform_preview_sdk_version)
636 func (c *config) PlatformMinSupportedTargetSdkVersion() string {
637 return String(c.productVariables.Platform_min_supported_target_sdk_version)
640 func (c *config) PlatformBaseOS() string {
641 return String(c.productVariables.Platform_base_os)
644 func (c *config) MinSupportedSdkVersion() int {
648 func (c *config) DefaultAppTargetSdkInt() int {
649 if Bool(c.productVariables.Platform_sdk_final) {
650 return c.PlatformSdkVersionInt()
656 func (c *config) DefaultAppTargetSdk() string {
657 if Bool(c.productVariables.Platform_sdk_final) {
658 return c.PlatformSdkVersion()
660 return c.PlatformSdkCodename()
664 func (c *config) AppsDefaultVersionName() string {
665 return String(c.productVariables.AppsDefaultVersionName)
669 func (c *config) PlatformVersionActiveCodenames() []string {
670 return c.productVariables.Platform_version_active_codenames
673 func (c *config) ProductAAPTConfig() []string {
674 return c.productVariables.AAPTConfig
677 func (c *config) ProductAAPTPreferredConfig() string {
678 return String(c.productVariables.AAPTPreferredConfig)
681 func (c *config) ProductAAPTCharacteristics() string {
682 return String(c.productVariables.AAPTCharacteristics)
685 func (c *config) ProductAAPTPrebuiltDPI() []string {
686 return c.productVariables.AAPTPrebuiltDPI
689 func (c *config) DefaultAppCertificateDir(ctx PathContext) SourcePath {
690 defaultCert := String(c.productVariables.DefaultAppCertificate)
698 func (c *config) DefaultAppCertificate(ctx PathContext) (pem, key SourcePath) {
699 defaultCert := String(c.productVariables.DefaultAppCertificate)
703 defaultDir := c.DefaultAppCertificateDir(ctx)
708 func (c *config) ApexKeyDir(ctx ModuleContext) SourcePath {
710 defaultCert := String(c.productVariables.DefaultAppCertificate)
721 func (c *config) AllowMissingDependencies() bool {
722 return Bool(c.productVariables.Allow_missing_dependencies)
726 func (c *config) UnbundledBuild() bool {
727 return Bool(c.productVariables.Unbundled_build)
732 func (c *config) UnbundledBuildApps() bool {
733 return Bool(c.productVariables.Unbundled_build_apps)
736 func (c *config) UnbundledBuildUsePrebuiltSdks() bool {
737 …return Bool(c.productVariables.Unbundled_build) && !Bool(c.productVariables.Unbundled_build_sdks_f…
740 func (c *config) Fuchsia() bool {
741 return Bool(c.productVariables.Fuchsia)
744 func (c *config) IsPdkBuild() bool {
745 return Bool(c.productVariables.Pdk)
748 func (c *config) MinimizeJavaDebugInfo() bool {
749 return Bool(c.productVariables.MinimizeJavaDebugInfo) && !Bool(c.productVariables.Eng)
752 func (c *config) Debuggable() bool {
753 return Bool(c.productVariables.Debuggable)
756 func (c *config) Eng() bool {
757 return Bool(c.productVariables.Eng)
760 func (c *config) DevicePrimaryArchType() ArchType {
761 return c.Targets[Android][0].Arch.ArchType
764 func (c *config) SkipMegaDeviceInstall(path string) bool {
765 return Bool(c.Mega_device) &&
766 strings.HasPrefix(path, filepath.Join(c.buildDir, "target", "product"))
769 func (c *config) SanitizeHost() []string {
770 return append([]string(nil), c.productVariables.SanitizeHost...)
773 func (c *config) SanitizeDevice() []string {
774 return append([]string(nil), c.productVariables.SanitizeDevice...)
777 func (c *config) SanitizeDeviceDiag() []string {
778 return append([]string(nil), c.productVariables.SanitizeDeviceDiag...)
781 func (c *config) SanitizeDeviceArch() []string {
782 return append([]string(nil), c.productVariables.SanitizeDeviceArch...)
785 func (c *config) EnableCFI() bool {
786 if c.productVariables.EnableCFI == nil {
789 return *c.productVariables.EnableCFI
793 func (c *config) DisableScudo() bool {
794 return Bool(c.productVariables.DisableScudo)
797 func (c *config) Android64() bool {
798 for _, t := range c.Targets[Android] {
807 func (c *config) UseGoma() bool {
808 return Bool(c.productVariables.UseGoma)
811 func (c *config) UseRBE() bool {
812 return Bool(c.productVariables.UseRBE)
815 func (c *config) UseRBEJAVAC() bool {
816 return Bool(c.productVariables.UseRBEJAVAC)
819 func (c *config) UseRBER8() bool {
820 return Bool(c.productVariables.UseRBER8)
823 func (c *config) UseRBED8() bool {
824 return Bool(c.productVariables.UseRBED8)
827 func (c *config) UseRemoteBuild() bool {
828 return c.UseGoma() || c.UseRBE()
831 func (c *config) RunErrorProne() bool {
832 return c.IsEnvTrue("RUN_ERROR_PRONE")
835 func (c *config) XrefCorpusName() string {
836 return c.Getenv("XREF_CORPUS")
840 func (c *config) XrefCuEncoding() string {
841 if enc := c.Getenv("KYTHE_KZIP_ENCODING"); enc != "" {
847 func (c *config) EmitXrefRules() bool {
848 return c.XrefCorpusName() != ""
851 func (c *config) ClangTidy() bool {
852 return Bool(c.productVariables.ClangTidy)
855 func (c *config) TidyChecks() string {
856 if c.productVariables.TidyChecks == nil {
859 return *c.productVariables.TidyChecks
862 func (c *config) LibartImgHostBaseAddress() string {
866 func (c *config) LibartImgDeviceBaseAddress() string {
870 func (c *config) ArtUseReadBarrier() bool {
871 return Bool(c.productVariables.ArtUseReadBarrier)
874 func (c *config) EnforceRROForModule(name string) bool {
875 enforceList := c.productVariables.EnforceRROTargets
877 exemptedList := c.productVariables.EnforceRROExemptedTargets
892 func (c *config) EnforceRROExcludedOverlay(path string) bool {
893 excluded := c.productVariables.EnforceRROExcludedOverlays
900 func (c *config) ExportedNamespaces() []string {
901 return append([]string(nil), c.productVariables.NamespacesToExport...)
904 func (c *config) HostStaticBinaries() bool {
905 return Bool(c.productVariables.HostStaticBinaries)
908 func (c *config) UncompressPrivAppDex() bool {
909 return Bool(c.productVariables.UncompressPrivAppDex)
912 func (c *config) ModulesLoadedByPrivilegedModules() []string {
913 return c.productVariables.ModulesLoadedByPrivilegedModules
936 func (c *config) BootJars() []string {
938 config: c,
940 return append(GetJarsFromApexJarPairs(ctx, c.productVariables.BootJars),
941 GetJarsFromApexJarPairs(ctx, c.productVariables.UpdatableBootJars)...)
944 func (c *config) DexpreoptGlobalConfig(ctx PathContext) ([]byte, error) {
945 if c.productVariables.DexpreoptGlobalConfig == nil {
948 path := absolutePath(*c.productVariables.DexpreoptGlobalConfig)
953 func (c *config) FrameworksBaseDirExists(ctx PathContext) bool {
957 func (c *config) VndkSnapshotBuildArtifacts() bool {
958 return Bool(c.productVariables.VndkSnapshotBuildArtifacts)
961 func (c *config) HasMultilibConflict(arch ArchType) bool {
962 return c.multilibConflicts[arch]
965 func (c *deviceConfig) Arches() []Arch {
967 for _, target := range c.config.Targets[Android] {
973 func (c *deviceConfig) BinderBitness() string {
974 is32BitBinder := c.config.productVariables.Binder32bit
981 func (c *deviceConfig) VendorPath() string {
982 if c.config.productVariables.VendorPath != nil {
983 return *c.config.productVariables.VendorPath
988 func (c *deviceConfig) VndkVersion() string {
989 return String(c.config.productVariables.DeviceVndkVersion)
992 func (c *deviceConfig) PlatformVndkVersion() string {
993 return String(c.config.productVariables.Platform_vndk_version)
996 func (c *deviceConfig) ProductVndkVersion() string {
997 return String(c.config.productVariables.ProductVndkVersion)
1000 func (c *deviceConfig) ExtraVndkVersions() []string {
1001 return c.config.productVariables.ExtraVndkVersions
1004 func (c *deviceConfig) VndkUseCoreVariant() bool {
1005 return Bool(c.config.productVariables.VndkUseCoreVariant)
1008 func (c *deviceConfig) SystemSdkVersions() []string {
1009 return c.config.productVariables.DeviceSystemSdkVersions
1012 func (c *deviceConfig) PlatformSystemSdkVersions() []string {
1013 return c.config.productVariables.Platform_systemsdk_versions
1016 func (c *deviceConfig) OdmPath() string {
1017 if c.config.productVariables.OdmPath != nil {
1018 return *c.config.productVariables.OdmPath
1023 func (c *deviceConfig) ProductPath() string {
1024 if c.config.productVariables.ProductPath != nil {
1025 return *c.config.productVariables.ProductPath
1030 func (c *deviceConfig) SystemExtPath() string {
1031 if c.config.productVariables.SystemExtPath != nil {
1032 return *c.config.productVariables.SystemExtPath
1037 func (c *deviceConfig) BtConfigIncludeDir() string {
1038 return String(c.config.productVariables.BtConfigIncludeDir)
1041 func (c *deviceConfig) DeviceKernelHeaderDirs() []string {
1042 return c.config.productVariables.DeviceKernelHeaders
1045 func (c *deviceConfig) SamplingPGO() bool {
1046 return Bool(c.config.productVariables.SamplingPGO)
1055 func (c *deviceConfig) JavaCoverageEnabledForPath(path string) bool {
1057 if len(c.config.productVariables.JavaCoveragePaths) == 0 ||
1058 InList("*", c.config.productVariables.JavaCoveragePaths) ||
1059 HasAnyPrefix(path, c.config.productVariables.JavaCoveragePaths) {
1062 if coverage && len(c.config.productVariables.JavaCoverageExcludePaths) > 0 {
1063 if HasAnyPrefix(path, c.config.productVariables.JavaCoverageExcludePaths) {
1071 func (c *deviceConfig) NativeCoverageEnabled() bool {
1072 return Bool(c.config.productVariables.GcovCoverage) ||
1073 Bool(c.config.productVariables.ClangCoverage)
1076 func (c *deviceConfig) ClangCoverageEnabled() bool {
1077 return Bool(c.config.productVariables.ClangCoverage)
1080 func (c *deviceConfig) GcovCoverageEnabled() bool {
1081 return Bool(c.config.productVariables.GcovCoverage)
1089 func (c *deviceConfig) NativeCoverageEnabledForPath(path string) bool {
1091 if len(c.config.productVariables.NativeCoveragePaths) > 0 {
1092 …if InList("*", c.config.productVariables.NativeCoveragePaths) || HasAnyPrefix(path, c.config.produ…
1096 if coverage && len(c.config.productVariables.NativeCoverageExcludePaths) > 0 {
1097 if HasAnyPrefix(path, c.config.productVariables.NativeCoverageExcludePaths) {
1104 func (c *deviceConfig) PgoAdditionalProfileDirs() []string {
1105 return c.config.productVariables.PgoAdditionalProfileDirs
1108 func (c *deviceConfig) VendorSepolicyDirs() []string {
1109 return c.config.productVariables.BoardVendorSepolicyDirs
1112 func (c *deviceConfig) OdmSepolicyDirs() []string {
1113 return c.config.productVariables.BoardOdmSepolicyDirs
1116 func (c *deviceConfig) PlatPublicSepolicyDirs() []string {
1117 return c.config.productVariables.BoardPlatPublicSepolicyDirs
1120 func (c *deviceConfig) PlatPrivateSepolicyDirs() []string {
1121 return c.config.productVariables.BoardPlatPrivateSepolicyDirs
1124 func (c *deviceConfig) SepolicyM4Defs() []string {
1125 return c.config.productVariables.BoardSepolicyM4Defs
1128 func (c *deviceConfig) OverrideManifestPackageNameFor(name string) (manifestName string, overridden…
1129 return findOverrideValue(c.config.productVariables.ManifestPackageNameOverrides, name,
1133 func (c *deviceConfig) OverrideCertificateFor(name string) (certificatePath string, overridden bool…
1134 return findOverrideValue(c.config.productVariables.CertificateOverrides, name,
1138 func (c *deviceConfig) OverridePackageNameFor(name string) string {
1140 c.config.productVariables.PackageNameOverrides,
1166 func (c *config) IntegerOverflowDisabledForPath(path string) bool {
1167 if len(c.productVariables.IntegerOverflowExcludePaths) == 0 {
1170 return HasAnyPrefix(path, c.productVariables.IntegerOverflowExcludePaths)
1173 func (c *config) CFIDisabledForPath(path string) bool {
1174 if len(c.productVariables.CFIExcludePaths) == 0 {
1177 return HasAnyPrefix(path, c.productVariables.CFIExcludePaths)
1180 func (c *config) CFIEnabledForPath(path string) bool {
1181 if len(c.productVariables.CFIIncludePaths) == 0 {
1184 return HasAnyPrefix(path, c.productVariables.CFIIncludePaths)
1187 func (c *config) VendorConfig(name string) VendorConfig {
1188 return soongconfig.Config(c.productVariables.VendorVars[name])
1191 func (c *config) NdkAbis() bool {
1192 return Bool(c.productVariables.Ndk_abis)
1195 func (c *config) AmlAbis() bool {
1196 return Bool(c.productVariables.Aml_abis)
1199 func (c *config) ExcludeDraftNdkApis() bool {
1200 return Bool(c.productVariables.Exclude_draft_ndk_apis)
1203 func (c *config) FlattenApex() bool {
1204 return Bool(c.productVariables.Flatten_apex)
1207 func (c *config) EnforceSystemCertificate() bool {
1208 return Bool(c.productVariables.EnforceSystemCertificate)
1211 func (c *config) EnforceSystemCertificateAllowList() []string {
1212 return c.productVariables.EnforceSystemCertificateAllowList
1215 func (c *config) EnforceProductPartitionInterface() bool {
1216 return Bool(c.productVariables.EnforceProductPartitionInterface)
1219 func (c *config) InstallExtraFlattenedApexes() bool {
1220 return Bool(c.productVariables.InstallExtraFlattenedApexes)
1223 func (c *config) ProductHiddenAPIStubs() []string {
1224 return c.productVariables.ProductHiddenAPIStubs
1227 func (c *config) ProductHiddenAPIStubsSystem() []string {
1228 return c.productVariables.ProductHiddenAPIStubsSystem
1231 func (c *config) ProductHiddenAPIStubsTest() []string {
1232 return c.productVariables.ProductHiddenAPIStubsTest
1235 func (c *deviceConfig) TargetFSConfigGen() []string {
1236 return c.config.productVariables.TargetFSConfigGen
1239 func (c *config) ProductPublicSepolicyDirs() []string {
1240 return c.productVariables.ProductPublicSepolicyDirs
1243 func (c *config) ProductPrivateSepolicyDirs() []string {
1244 return c.productVariables.ProductPrivateSepolicyDirs
1247 func (c *config) ProductCompatibleProperty() bool {
1248 return Bool(c.productVariables.ProductCompatibleProperty)
1251 func (c *config) MissingUsesLibraries() []string {
1252 return c.productVariables.MissingUsesLibraries
1255 func (c *deviceConfig) DeviceArch() string {
1256 return String(c.config.productVariables.DeviceArch)
1259 func (c *deviceConfig) DeviceArchVariant() string {
1260 return String(c.config.productVariables.DeviceArchVariant)
1263 func (c *deviceConfig) DeviceSecondaryArch() string {
1264 return String(c.config.productVariables.DeviceSecondaryArch)
1267 func (c *deviceConfig) DeviceSecondaryArchVariant() string {
1268 return String(c.config.productVariables.DeviceSecondaryArchVariant)
1271 func (c *deviceConfig) BoardUsesRecoveryAsBoot() bool {
1272 return Bool(c.config.productVariables.BoardUsesRecoveryAsBoot)
1275 func (c *deviceConfig) BoardKernelBinaries() []string {
1276 return c.config.productVariables.BoardKernelBinaries