]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/cmd/link/internal/ld/lib.go
[dev.boringcrypto] all: merge master into dev.boringcrypto
[gostls13.git] / src / cmd / link / internal / ld / lib.go
index 5b82dc287d20bd9487908e15244d341f46935c57..6055d4327ea29908618936bf5daa4a35ed703323 100644 (file)
@@ -390,7 +390,9 @@ func libinit(ctxt *Link) {
                suffix = "asan"
        }
 
-       Lflag(ctxt, filepath.Join(buildcfg.GOROOT, "pkg", fmt.Sprintf("%s_%s%s%s", buildcfg.GOOS, buildcfg.GOARCH, suffixsep, suffix)))
+       if buildcfg.GOROOT != "" {
+               Lflag(ctxt, filepath.Join(buildcfg.GOROOT, "pkg", fmt.Sprintf("%s_%s%s%s", buildcfg.GOOS, buildcfg.GOARCH, suffixsep, suffix)))
+       }
 
        mayberemoveoutfile()
 
@@ -1478,7 +1480,7 @@ func (ctxt *Link) hostlink() {
                argv = append(argv, unusedArguments)
        }
 
-       const compressDWARF = "-Wl,--compress-debug-sections=zlib-gnu"
+       const compressDWARF = "-Wl,--compress-debug-sections=zlib"
        if ctxt.compressDWARF && linkerFlagSupported(ctxt.Arch, argv[0], altLinker, compressDWARF) {
                argv = append(argv, compressDWARF)
        }