func dumpexport() {
lno := lineno
+ if buildid != "" {
+ fmt.Fprintf(bout, "build id %q\n", buildid)
+ }
fmt.Fprintf(bout, "\n$$\npackage %s", localpkg.Name)
if safemode != 0 {
fmt.Fprintf(bout, " safe")
var imported_unsafe int
-var goos string
-
-var goarch string
-
-var goroot string
+var (
+ goos string
+ goarch string
+ goroot string
+ buildid string
+)
var (
Debug_wb int
obj.Flagfn0("V", "print compiler version", doversion)
obj.Flagcount("W", "debug parse tree after type checking", &Debug['W'])
obj.Flagstr("asmhdr", "write assembly header to `file`", &asmhdr)
+ obj.Flagstr("buildid", "record `id` as the build id in the export metadata", &buildid)
obj.Flagcount("complete", "compiling complete package (no C or assembly)", &pure_go)
obj.Flagstr("d", "print debug information about items in `list`", &debugstr)
obj.Flagcount("e", "no limit on number of errors reported", &Debug['e'])