Make debugging easier:

- Add the -N -l command line arguments to Microfactory
- Pass the the Delve arguments to the primary builder on the command line

Test: Manual.

Change-Id: I4034f2d48b3e40d9863529053715183dc3dce1f5
This commit is contained in:
Lukacs T. Berki 2021-03-02 10:09:34 +01:00
parent f802ffcd12
commit 122b3ee153
2 changed files with 2 additions and 1 deletions

View file

@ -128,7 +128,7 @@ var (
// TODO: it's kinda ugly that some parameters are computed from
// environment variables and some from Ninja parameters, but it's probably
// better to not to touch that while Blueprint and Soong are separate
Command: "cd $$(dirname $builder) && BUILDER=$$PWD/$$(basename $builder) && cd / && env -i $$BUILDER $extra --top \"$$TOP\" --out \"$$SOONG_OUTDIR\" -b $buildDir -n $ninjaBuildDir -d $out.d -globFile $globFile -o $out $in",
Command: "cd $$(dirname $builder) && BUILDER=$$PWD/$$(basename $builder) && cd / && env -i $$BUILDER $extra --top \"$$TOP\" --out \"$$SOONG_OUTDIR\" --delve_listen \"$$SOONG_DELVE\" --delve_path \"$$SOONG_DELVE_PATH\" -b $buildDir -n $ninjaBuildDir -d $out.d -globFile $globFile -o $out $in",
CommandDeps: []string{"$builder"},
Description: "$builder $out",
Deps: blueprint.DepsGCC,

View file

@ -397,6 +397,7 @@ func (p *GoPackage) Compile(config *Config, outDir string) error {
fmt.Fprintln(hash, runtime.GOOS, runtime.GOARCH, goVersion)
cmd := exec.Command(filepath.Join(goToolDir, "compile"),
"-N", "-l", // Disable optimization and inlining so that debugging works better
"-o", p.output,
"-p", p.Name,
"-complete", "-pack", "-nolocalimports")