cpp/llvm; os.Args; build: add llvm.BinDir to PATH

This commit is contained in:
xushiwei
2024-07-15 00:22:10 +08:00
parent 9156466351
commit cbe190fa70
9 changed files with 210 additions and 6 deletions

View File

@@ -174,7 +174,10 @@ func Do(args []string, conf *Config) {
patches := make(cl.Patches, len(altPkgPaths))
altSSAPkgs(progSSA, patches, altPkgs[1:], verbose)
ctx := &context{llvm.New(""), progSSA, prog, dedup, patches, make(map[string]none), initial, mode}
env := llvm.New("")
os.Setenv("PATH", env.BinDir()+":"+os.Getenv("PATH")) // TODO(xsw): check windows
ctx := &context{env, progSSA, prog, dedup, patches, make(map[string]none), initial, mode}
pkgs := buildAllPkgs(ctx, initial, verbose)
var llFiles []string