diff options
author | Andrew Wilkins <axwalk@gmail.com> | 2015-07-17 08:15:01 +0000 |
---|---|---|
committer | Andrew Wilkins <axwalk@gmail.com> | 2015-07-17 08:15:01 +0000 |
commit | 7a94f98beaf11daf0046e02e34d07c9970ff2b28 (patch) | |
tree | b7b1ae1efab117bb42fd2a7bf2c8ff6809fc4432 /llgo | |
parent | f55803f761340107d3be8dc3a582f87fe4e2ea98 (diff) | |
download | bcm5719-llvm-7a94f98beaf11daf0046e02e34d07c9970ff2b28.tar.gz bcm5719-llvm-7a94f98beaf11daf0046e02e34d07c9970ff2b28.zip |
[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
Diffstat (limited to 'llgo')
-rw-r--r-- | llgo/cmd/gllgo/gllgo.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llgo/cmd/gllgo/gllgo.go b/llgo/cmd/gllgo/gllgo.go index 112675a31bd..11038a33749 100644 --- a/llgo/cmd/gllgo/gllgo.go +++ b/llgo/cmd/gllgo/gllgo.go @@ -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'") |