Allow debugging with SOONG_DELVE=<listen addr>
Allow running Soong in a headless delve debugger by passing SOONG_DELVE=<listen addr> in the environment. Bug: 80165685 Test: SOONG_DELVE=:1234 m nothing Change-Id: Icfc893c8a8354a9bbc99112d9c83259cb41906d1
This commit is contained in:
@@ -162,6 +162,10 @@ func (c *Cmd) wrapSandbox() {
|
||||
c.ctx.Printf("AllowBuildBrokenUsesNetwork: %v", c.Sandbox.AllowBuildBrokenUsesNetwork)
|
||||
c.ctx.Printf("BuildBrokenUsesNetwork: %v", c.config.BuildBrokenUsesNetwork())
|
||||
sandboxArgs = append(sandboxArgs, "-N")
|
||||
} else if dlv, _ := c.config.Environment().Get("SOONG_DELVE"); dlv != "" {
|
||||
// The debugger is enabled and soong_build will pause until a remote delve process connects, allow
|
||||
// network connections.
|
||||
sandboxArgs = append(sandboxArgs, "-N")
|
||||
}
|
||||
|
||||
// Stop nsjail from parsing arguments
|
||||
|
Reference in New Issue
Block a user