Loading scripts/build_broken_logs.go +4 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,10 @@ var buildBrokenSettings = []struct { "Changes.md#LOCAL_MODULE_TAGS", }, }, { name: "BUILD_BROKEN_USES_NETWORK", behavior: DefaultDeprecated, }, } type ProductBranch struct { Loading ui/build/config.go +9 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ type configImpl struct { brokenDupRules bool brokenPhonyTargets bool brokenUsesNetwork bool pathReplaced bool } Loading Loading @@ -622,6 +623,14 @@ func (c *configImpl) BuildBrokenPhonyTargets() bool { return c.brokenPhonyTargets } func (c *configImpl) SetBuildBrokenUsesNetwork(val bool) { c.brokenUsesNetwork = val } func (c *configImpl) BuildBrokenUsesNetwork() bool { return c.brokenUsesNetwork } func (c *configImpl) SetTargetDeviceDir(dir string) { c.targetDeviceDir = dir } Loading ui/build/dumpvars.go +4 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,9 @@ func runMakeProductConfig(ctx Context, config Config) { // Used to turn on --werror_ options in Kati "BUILD_BROKEN_PHONY_TARGETS", // Whether to enable the network during the build "BUILD_BROKEN_USES_NETWORK", // Not used, but useful to be in the soong.log "BOARD_VNDK_VERSION", "BUILD_BROKEN_ANDROIDMK_EXPORTS", Loading Loading @@ -238,4 +241,5 @@ func runMakeProductConfig(ctx Context, config Config) { config.SetPdkBuild(make_vars["TARGET_BUILD_PDK"] == "true") config.SetBuildBrokenDupRules(make_vars["BUILD_BROKEN_DUP_RULES"] == "true") config.SetBuildBrokenPhonyTargets(make_vars["BUILD_BROKEN_PHONY_TARGETS"] == "true") config.SetBuildBrokenUsesNetwork(make_vars["BUILD_BROKEN_USES_NETWORK"] == "true") } ui/build/sandbox_linux.go +13 −2 Original line number Diff line number Diff line Loading @@ -26,6 +26,8 @@ import ( type Sandbox struct { Enabled bool DisableWhenUsingGoma bool AllowBuildBrokenUsesNetwork bool } var ( Loading @@ -40,6 +42,8 @@ var ( ninjaSandbox = Sandbox{ Enabled: true, DisableWhenUsingGoma: true, AllowBuildBrokenUsesNetwork: true, } ) Loading Loading @@ -152,10 +156,17 @@ func (c *Cmd) wrapSandbox() { // Only log important warnings / errors "-q", } // Stop parsing arguments "--", if c.Sandbox.AllowBuildBrokenUsesNetwork && c.config.BuildBrokenUsesNetwork() { c.ctx.Printf("AllowBuildBrokenUsesNetwork: %v", c.Sandbox.AllowBuildBrokenUsesNetwork) c.ctx.Printf("BuildBrokenUsesNetwork: %v", c.config.BuildBrokenUsesNetwork()) sandboxArgs = append(sandboxArgs, "-N") } // Stop nsjail from parsing arguments sandboxArgs = append(sandboxArgs, "--") c.Args = append(sandboxArgs, c.Args[1:]...) c.Path = nsjailPath Loading Loading
scripts/build_broken_logs.go +4 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,10 @@ var buildBrokenSettings = []struct { "Changes.md#LOCAL_MODULE_TAGS", }, }, { name: "BUILD_BROKEN_USES_NETWORK", behavior: DefaultDeprecated, }, } type ProductBranch struct { Loading
ui/build/config.go +9 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ type configImpl struct { brokenDupRules bool brokenPhonyTargets bool brokenUsesNetwork bool pathReplaced bool } Loading Loading @@ -622,6 +623,14 @@ func (c *configImpl) BuildBrokenPhonyTargets() bool { return c.brokenPhonyTargets } func (c *configImpl) SetBuildBrokenUsesNetwork(val bool) { c.brokenUsesNetwork = val } func (c *configImpl) BuildBrokenUsesNetwork() bool { return c.brokenUsesNetwork } func (c *configImpl) SetTargetDeviceDir(dir string) { c.targetDeviceDir = dir } Loading
ui/build/dumpvars.go +4 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,9 @@ func runMakeProductConfig(ctx Context, config Config) { // Used to turn on --werror_ options in Kati "BUILD_BROKEN_PHONY_TARGETS", // Whether to enable the network during the build "BUILD_BROKEN_USES_NETWORK", // Not used, but useful to be in the soong.log "BOARD_VNDK_VERSION", "BUILD_BROKEN_ANDROIDMK_EXPORTS", Loading Loading @@ -238,4 +241,5 @@ func runMakeProductConfig(ctx Context, config Config) { config.SetPdkBuild(make_vars["TARGET_BUILD_PDK"] == "true") config.SetBuildBrokenDupRules(make_vars["BUILD_BROKEN_DUP_RULES"] == "true") config.SetBuildBrokenPhonyTargets(make_vars["BUILD_BROKEN_PHONY_TARGETS"] == "true") config.SetBuildBrokenUsesNetwork(make_vars["BUILD_BROKEN_USES_NETWORK"] == "true") }
ui/build/sandbox_linux.go +13 −2 Original line number Diff line number Diff line Loading @@ -26,6 +26,8 @@ import ( type Sandbox struct { Enabled bool DisableWhenUsingGoma bool AllowBuildBrokenUsesNetwork bool } var ( Loading @@ -40,6 +42,8 @@ var ( ninjaSandbox = Sandbox{ Enabled: true, DisableWhenUsingGoma: true, AllowBuildBrokenUsesNetwork: true, } ) Loading Loading @@ -152,10 +156,17 @@ func (c *Cmd) wrapSandbox() { // Only log important warnings / errors "-q", } // Stop parsing arguments "--", if c.Sandbox.AllowBuildBrokenUsesNetwork && c.config.BuildBrokenUsesNetwork() { c.ctx.Printf("AllowBuildBrokenUsesNetwork: %v", c.Sandbox.AllowBuildBrokenUsesNetwork) c.ctx.Printf("BuildBrokenUsesNetwork: %v", c.config.BuildBrokenUsesNetwork()) sandboxArgs = append(sandboxArgs, "-N") } // Stop nsjail from parsing arguments sandboxArgs = append(sandboxArgs, "--") c.Args = append(sandboxArgs, c.Args[1:]...) c.Path = nsjailPath Loading