From: Matthew Dempsky Date: Tue, 17 Apr 2018 21:56:29 +0000 (-0700) Subject: cmd/compile: use empty package name for runtime/{race,msan} X-Git-Tag: go1.11beta1~779 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=bf101662642c2585afb957c418b33c0499cf87dd;p=gostls13.git cmd/compile: use empty package name for runtime/{race,msan} These fake imports are just so we can emit build dependencies for the linker, so the package name isn't really necessary. Also, the package import logic assumes that if we have the name for a package, then we've already read some package data for it. Using the empty string allows the importers to correctly populate it the first time these packages are seen in package export data. Passes toolstash-check. Change-Id: I047bde297600e9dc07478fccc3f57ccc75ce8ae4 Reviewed-on: https://go-review.googlesource.com/107619 Run-TryBot: Matthew Dempsky TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/src/cmd/compile/internal/gc/main.go b/src/cmd/compile/internal/gc/main.go index 9496fc9a94..fb51ef537c 100644 --- a/src/cmd/compile/internal/gc/main.go +++ b/src/cmd/compile/internal/gc/main.go @@ -306,10 +306,10 @@ func Main(archInit func(*Arch)) { flag_msan = false } if flag_race { - racepkg = types.NewPkg("runtime/race", "race") + racepkg = types.NewPkg("runtime/race", "") } if flag_msan { - msanpkg = types.NewPkg("runtime/msan", "msan") + msanpkg = types.NewPkg("runtime/msan", "") } if flag_race || flag_msan { instrumenting = true