Loading android/config.go +4 −0 Original line number Diff line number Diff line Loading @@ -1759,6 +1759,10 @@ func (c *deviceConfig) BuildBrokenTrebleSyspropNeverallow() bool { return c.config.productVariables.BuildBrokenTrebleSyspropNeverallow } func (c *deviceConfig) BuildBrokenUsesSoongPython2Modules() bool { return c.config.productVariables.BuildBrokenUsesSoongPython2Modules } func (c *deviceConfig) BuildDebugfsRestrictionsEnabled() bool { return c.config.productVariables.BuildDebugfsRestrictionsEnabled } Loading android/variable.go +1 −0 Original line number Diff line number Diff line Loading @@ -442,6 +442,7 @@ type productVariables struct { BuildBrokenDepfile *bool `json:",omitempty"` BuildBrokenEnforceSyspropOwner bool `json:",omitempty"` BuildBrokenTrebleSyspropNeverallow bool `json:",omitempty"` BuildBrokenUsesSoongPython2Modules bool `json:",omitempty"` BuildBrokenVendorPropertyNamespace bool `json:",omitempty"` BuildBrokenInputDirModules []string `json:",omitempty"` Loading python/python.go +6 −0 Original line number Diff line number Diff line Loading @@ -263,6 +263,12 @@ func versionSplitMutator() func(android.BottomUpMutatorContext) { versionProps = append(versionProps, props.Version.Py3) } if proptools.BoolDefault(props.Version.Py2.Enabled, false) { if !mctx.DeviceConfig().BuildBrokenUsesSoongPython2Modules() && mctx.ModuleName() != "par_test" && mctx.ModuleName() != "py2-cmd" && mctx.ModuleName() != "py2-stdlib" { mctx.PropertyErrorf("version.py2.enabled", "Python 2 is no longer supported, please convert to python 3. This error can be temporarily overridden by setting BUILD_BROKEN_USES_SOONG_PYTHON2_MODULES := true in the product configuration") } versionNames = append(versionNames, pyVersion2) versionProps = append(versionProps, props.Version.Py2) } Loading Loading
android/config.go +4 −0 Original line number Diff line number Diff line Loading @@ -1759,6 +1759,10 @@ func (c *deviceConfig) BuildBrokenTrebleSyspropNeverallow() bool { return c.config.productVariables.BuildBrokenTrebleSyspropNeverallow } func (c *deviceConfig) BuildBrokenUsesSoongPython2Modules() bool { return c.config.productVariables.BuildBrokenUsesSoongPython2Modules } func (c *deviceConfig) BuildDebugfsRestrictionsEnabled() bool { return c.config.productVariables.BuildDebugfsRestrictionsEnabled } Loading
android/variable.go +1 −0 Original line number Diff line number Diff line Loading @@ -442,6 +442,7 @@ type productVariables struct { BuildBrokenDepfile *bool `json:",omitempty"` BuildBrokenEnforceSyspropOwner bool `json:",omitempty"` BuildBrokenTrebleSyspropNeverallow bool `json:",omitempty"` BuildBrokenUsesSoongPython2Modules bool `json:",omitempty"` BuildBrokenVendorPropertyNamespace bool `json:",omitempty"` BuildBrokenInputDirModules []string `json:",omitempty"` Loading
python/python.go +6 −0 Original line number Diff line number Diff line Loading @@ -263,6 +263,12 @@ func versionSplitMutator() func(android.BottomUpMutatorContext) { versionProps = append(versionProps, props.Version.Py3) } if proptools.BoolDefault(props.Version.Py2.Enabled, false) { if !mctx.DeviceConfig().BuildBrokenUsesSoongPython2Modules() && mctx.ModuleName() != "par_test" && mctx.ModuleName() != "py2-cmd" && mctx.ModuleName() != "py2-stdlib" { mctx.PropertyErrorf("version.py2.enabled", "Python 2 is no longer supported, please convert to python 3. This error can be temporarily overridden by setting BUILD_BROKEN_USES_SOONG_PYTHON2_MODULES := true in the product configuration") } versionNames = append(versionNames, pyVersion2) versionProps = append(versionProps, props.Version.Py2) } Loading