ctxt.Flag_dynlink = *flags.Dynlink
ctxt.Flag_shared = *flags.Shared || *flags.Dynlink
ctxt.Flag_go115newobj = *flags.Go115Newobj
+ switch *flags.Spectre {
+ default:
+ log.Printf("unknown setting -spectre=%s", *flags.Spectre)
+ os.Exit(2)
+ case "":
+ // nothing
+ case "index":
+ // known to compiler; ignore here so people can use
+ // the same list with -gcflags=-spectre=LIST and -asmflags=-spectrre=LIST
+ case "all", "ret":
+ ctxt.Retpoline = true
+ }
+
ctxt.Bso = bufio.NewWriter(os.Stdout)
defer ctxt.Bso.Flush()