Closed schwern closed 9 years ago
Those options are set in GNUmakefile
, which is not part of the CPAN distribution (so this shouldn't affect "normal" users). I use it to turn on options for development. So far I've only used gcc, so clang development compatibility is not a priority.
But according to http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation those flags should be supported. Is this a version issue?
This is what OS X 10.10.2 is using.
$ clang --version
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.1.0
Thread model: posix
The odd thing is it's in the --help
.
$ clang --help | grep -- -fsan
-fsanitize-blacklist=<value>
-fsanitize-memory-track-origins
-fsanitize=<check> Enable runtime instrumentation for bug detection: undefined (miscellaneous undefined behavior)
But it doesn't work on the command line.
$ clang -fsanitize=address ~/tmp/test.c
clang: error: unsupported argument 'address' to option 'fsanitize='
$ clang -fsanitize=undefined ~/tmp/test.c
clang: error: unsupported argument 'undefined' to option 'fsanitize='
Googling the error message shows that this is Apple specific. Apparently it works if you build clang from source.
Workaround for this repo: make -f Makefile
, so I'm just going to close this.
01b110157fbc0088f5127144ccd595c011afc9cd introduced some compiler options which do not work with clang (the default OS X compiler).