Lines Matching refs:c

490 func (c *configImpl) parseArgs(ctx Context, args []string) {
495 c.verbose = true
497 c.skipMake = true
517 c.parallel = parseArgNum(c.parallel)
519 c.keepGoing = parseArgNum(0)
527 c.environ.Set(k, v)
529 c.dist = true
532 c.checkbuild = true
534 c.arguments = append(c.arguments, arg)
539 func (c *configImpl) configureLocale(ctx Context) {
540 cmd := Command(ctx, Config{c}, "locale", "locale", "-a")
557 if lc_all, ok := c.environ.Get("LC_ALL"); ok {
559 } else if lc_messages, ok := c.environ.Get("LC_MESSAGES"); ok {
561 } else if lang, ok := c.environ.Get("LANG"); ok {
565 c.environ.UnsetWithPrefix("LC_")
568 c.environ.Set("LC_MESSAGES", user_lang)
574 c.environ.Set("LANG", "C.UTF-8")
577 c.environ.Set("LANG", "C.UTF-8")
579 c.environ.Set("LANG", "en_US.UTF-8")
582 c.environ.Set("LANG", "en_US.UTF-8")
590 func (c *configImpl) Lunch(ctx Context, product, variant string) {
595 c.environ.Set("TARGET_PRODUCT", product)
596 c.environ.Set("TARGET_BUILD_VARIANT", variant)
597 c.environ.Set("TARGET_BUILD_TYPE", "release")
598 c.environ.Unset("TARGET_BUILD_APPS")
599 c.environ.Unset("TARGET_BUILD_UNBUNDLED")
604 func (c *configImpl) Tapas(ctx Context, apps []string, arch, variant string) {
630 c.environ.Set("TARGET_PRODUCT", product)
631 c.environ.Set("TARGET_BUILD_VARIANT", variant)
632 c.environ.Set("TARGET_BUILD_TYPE", "release")
633 c.environ.Set("TARGET_BUILD_APPS", strings.Join(apps, " "))
636 func (c *configImpl) Environment() *Environment {
637 return c.environ
640 func (c *configImpl) Arguments() []string {
641 return c.arguments
644 func (c *configImpl) OutDir() string {
645 if outDir, ok := c.environ.Get("OUT_DIR"); ok {
651 func (c *configImpl) DistDir() string {
652 return c.distDir
655 func (c *configImpl) NinjaArgs() []string {
656 if c.skipMake {
657 return c.arguments
659 return c.ninjaArgs
662 func (c *configImpl) SoongOutDir() string {
663 return filepath.Join(c.OutDir(), "soong")
666 func (c *configImpl) TempDir() string {
667 return shared.TempDirForOutDir(c.SoongOutDir())
670 func (c *configImpl) FileListDir() string {
671 return filepath.Join(c.OutDir(), ".module_paths")
674 func (c *configImpl) KatiSuffix() string {
675 if c.katiSuffix != "" {
676 return c.katiSuffix
683 func (c *configImpl) Checkbuild() bool {
684 return c.checkbuild
687 func (c *configImpl) Dist() bool {
688 return c.dist
691 func (c *configImpl) IsVerbose() bool {
692 return c.verbose
695 func (c *configImpl) SkipMake() bool {
696 return c.skipMake
699 func (c *configImpl) TargetProduct() string {
700 if v, ok := c.environ.Get("TARGET_PRODUCT"); ok {
706 func (c *configImpl) TargetDevice() string {
707 return c.targetDevice
710 func (c *configImpl) SetTargetDevice(device string) {
711 c.targetDevice = device
714 func (c *configImpl) TargetBuildVariant() string {
715 if v, ok := c.environ.Get("TARGET_BUILD_VARIANT"); ok {
721 func (c *configImpl) KatiArgs() []string {
722 return c.katiArgs
725 func (c *configImpl) Parallel() int {
726 return c.parallel
729 func (c *configImpl) HighmemParallel() int {
730 if i, ok := c.environ.GetInt("NINJA_HIGHMEM_NUM_JOBS"); ok {
735 parallel := c.Parallel()
736 if c.UseRemoteBuild() {
742 } else if c.totalRAM == 0 {
745 } else if c.totalRAM <= 16*1024*1024*1024 {
748 } else if c.totalRAM <= 32*1024*1024*1024 {
751 } else if p := int(c.totalRAM / minMemPerHighmemProcess); p < parallel {
759 func (c *configImpl) TotalRAM() uint64 {
760 return c.totalRAM
763 func (c *configImpl) UseGoma() bool {
764 if v, ok := c.environ.Get("USE_GOMA"); ok {
773 func (c *configImpl) StartGoma() bool {
774 if !c.UseGoma() {
778 if v, ok := c.environ.Get("NOSTART_GOMA"); ok {
787 func (c *configImpl) UseRBE() bool {
788 if v, ok := c.environ.Get("USE_RBE"); ok {
797 func (c *configImpl) StartRBE() bool {
798 if !c.UseRBE() {
802 if v, ok := c.environ.Get("NOSTART_RBE"); ok {
811 func (c *configImpl) RBEStatsOutputDir() string {
813 if v, ok := c.environ.Get(f); ok {
820 func (c *configImpl) UseRemoteBuild() bool {
821 return c.UseGoma() || c.UseRBE()
827 func (c *configImpl) RemoteParallel() int {
828 if !c.UseRemoteBuild() {
831 if i, ok := c.environ.GetInt("NINJA_REMOTE_NUM_JOBS"); ok {
837 func (c *configImpl) SetKatiArgs(args []string) {
838 c.katiArgs = args
841 func (c *configImpl) SetNinjaArgs(args []string) {
842 c.ninjaArgs = args
845 func (c *configImpl) SetKatiSuffix(suffix string) {
846 c.katiSuffix = suffix
849 func (c *configImpl) LastKatiSuffixFile() string {
850 return filepath.Join(c.OutDir(), "last_kati_suffix")
853 func (c *configImpl) HasKatiSuffix() bool {
854 return c.katiSuffix != ""
857 func (c *configImpl) KatiEnvFile() string {
858 return filepath.Join(c.OutDir(), "env"+c.KatiSuffix()+".sh")
861 func (c *configImpl) KatiBuildNinjaFile() string {
862 return filepath.Join(c.OutDir(), "build"+c.KatiSuffix()+katiBuildSuffix+".ninja")
865 func (c *configImpl) KatiPackageNinjaFile() string {
866 return filepath.Join(c.OutDir(), "build"+c.KatiSuffix()+katiPackageSuffix+".ninja")
869 func (c *configImpl) SoongNinjaFile() string {
870 return filepath.Join(c.SoongOutDir(), "build.ninja")
873 func (c *configImpl) CombinedNinjaFile() string {
874 if c.katiSuffix == "" {
875 return filepath.Join(c.OutDir(), "combined.ninja")
877 return filepath.Join(c.OutDir(), "combined"+c.KatiSuffix()+".ninja")
880 func (c *configImpl) SoongAndroidMk() string {
881 return filepath.Join(c.SoongOutDir(), "Android-"+c.TargetProduct()+".mk")
884 func (c *configImpl) SoongMakeVarsMk() string {
885 return filepath.Join(c.SoongOutDir(), "make_vars-"+c.TargetProduct()+".mk")
888 func (c *configImpl) ProductOut() string {
889 return filepath.Join(c.OutDir(), "target", "product", c.TargetDevice())
892 func (c *configImpl) DevicePreviousProductConfig() string {
893 return filepath.Join(c.ProductOut(), "previous_build_config.mk")
896 func (c *configImpl) KatiPackageMkDir() string {
897 return filepath.Join(c.ProductOut(), "obj", "CONFIG", "kati_packaging")
900 func (c *configImpl) hostOutRoot() string {
901 return filepath.Join(c.OutDir(), "host")
904 func (c *configImpl) HostOut() string {
905 return filepath.Join(c.hostOutRoot(), c.HostPrebuiltTag())
909 func (c *configImpl) hostCrossOut() string {
911 return filepath.Join(c.hostOutRoot(), "windows-x86")
917 func (c *configImpl) HostPrebuiltTag() string {
927 func (c *configImpl) PrebuiltBuildTool(name string) string {
928 if v, ok := c.environ.Get("SANITIZE_HOST"); ok {
930 asan := filepath.Join("prebuilts/build-tools", c.HostPrebuiltTag(), "asan/bin", name)
936 return filepath.Join("prebuilts/build-tools", c.HostPrebuiltTag(), "bin", name)
939 func (c *configImpl) SetBuildBrokenDupRules(val bool) {
940 c.brokenDupRules = val
943 func (c *configImpl) BuildBrokenDupRules() bool {
944 return c.brokenDupRules
947 func (c *configImpl) SetBuildBrokenUsesNetwork(val bool) {
948 c.brokenUsesNetwork = val
951 func (c *configImpl) BuildBrokenUsesNetwork() bool {
952 return c.brokenUsesNetwork
955 func (c *configImpl) SetBuildBrokenNinjaUsesEnvVars(val []string) {
956 c.brokenNinjaEnvVars = val
959 func (c *configImpl) BuildBrokenNinjaUsesEnvVars() []string {
960 return c.brokenNinjaEnvVars
963 func (c *configImpl) SetTargetDeviceDir(dir string) {
964 c.targetDeviceDir = dir
967 func (c *configImpl) TargetDeviceDir() string {
968 return c.targetDeviceDir
971 func (c *configImpl) SetPdkBuild(pdk bool) {
972 c.pdkBuild = pdk
975 func (c *configImpl) IsPdkBuild() bool {
976 return c.pdkBuild
979 func (c *configImpl) BuildDateTime() string {
980 return c.buildDateTime
983 func (c *configImpl) MetricsUploaderApp() string {
984 if p, ok := c.environ.Get("ANDROID_ENABLE_METRICS_UPLOAD"); ok {