mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-24 06:10:12 +00:00
[llgo] cmd/gllgo: handle/ignore more flags
Summary: This diff is to support Debian packaging, which sets various hardening-rleated flags in CFLAGS. They don't make sense for Go, so we just ignore them. Reviewers: pcc Subscribers: llvm-commits, axw Differential Revision: http://reviews.llvm.org/D11288 llvm-svn: 242513
This commit is contained in:
parent
f55803f761
commit
7a94f98bea
@ -324,6 +324,14 @@ func parseArguments(args []string) (opts driverOptions, err error) {
|
||||
case strings.HasPrefix(args[0], "-fgo-relative-import-path="):
|
||||
// TODO(pcc): Handle this.
|
||||
|
||||
case strings.HasPrefix(args[0], "-fstack-protector"):
|
||||
// TODO(axw) set ssp function attributes. This can be useful
|
||||
// even for Go, if it interfaces with code written in a non-
|
||||
// memory safe language (e.g. via cgo).
|
||||
|
||||
case strings.HasPrefix(args[0], "-W"):
|
||||
// Go doesn't do warnings. Ignore.
|
||||
|
||||
case args[0] == "-fload-plugin":
|
||||
if len(args) == 1 {
|
||||
return opts, errors.New("missing argument after '-fload-plugin'")
|
||||
|
Loading…
Reference in New Issue
Block a user