Ignore respective bit in export data, but leave the info to
minimize format changes for 1.7. Scheduled to remove by 1.8.
For #15772.
Change-Id: Ifb3beea655367308a4e2d5dc8cb625915f904287
Reviewed-on: https://go-review.googlesource.com/23285
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
// --- compiler-specific export data ---
// read compiler-specific flags
- importpkg.Safe = p.bool()
+
+ // read but ignore safemode bit (see issue #15772)
+ p.bool() // formerly: importpkg.Safe = p.bool()
// phase 2
objcount = 0
}
}
+ // process header lines
+ for {
+ p, err = imp.ReadString('\n')
+ if err != nil {
+ log.Fatalf("reading input: %v", err)
+ }
+ if p == "\n" {
+ break // header ends with blank line
+ }
+ if strings.HasPrefix(p, "safe") {
+ importpkg.Safe = true
+ break // ok to ignore rest
+ }
+ }
+
// assume files move (get installed)
// so don't record the full path.
linehistpragma(file[len(file)-len(path_)-2:]) // acts as #pragma lib
p.import_error()
}
- importsafe := false
+ // read but skip "safe" bit (see issue #15772)
if p.tok == LNAME {
- if p.sym_.Name == "safe" {
- importsafe = true
- }
p.next()
}
p.want(';')
} else if importpkg.Name != name {
Yyerror("conflicting names %s and %s for package %q", importpkg.Name, name, importpkg.Path)
}
- importpkg.Safe = importsafe
typecheckok = true
defercheckwidth()