I'm trying to prevent the -mdisable-fp-elim
option from being provided to clang.
When I run clang -v test.c
, the output is:
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin12.4.0
Thread model: posix
"/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name grso-asm.c -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 224.1 -v -resource-dir /usr/bin/../lib/clang/5.0 -isystem /usr/local/include -isystem /usr/include/libxml2 -isystem /System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers -I /usr/local/opt/curl/include -fdebug-compilation-dir /private/tmp/quarkcoin-cpuminer-JHoT -ferror-limit 19 -fmessage-length 172 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.8.0 -fobjc-dispatch-method=mixed -fobjc-default-synthesize-properties -fencode-extended-block-signature -fdiagnostics-show-option -fcolor-diagnostics -o /var/folders/4v/114p9dfd0jzbgj395sdrj9jr0000gp/T/grso-asm-Za8dM0.o -x c grso-asm.c
How can I control all those automatically added options? More to the point, how can I make sure -mdisable-fp-elim
is not added?
This is controlled by ConstructJob() in lib/Driver/Tools.cpp in the clang source. You can generally search for the argument there and see what if any options control it (-fomit-frame-pointer in this case).