[cfe-users] Default compiler flags

Alexander Biddulph via cfe-users cfe-users at lists.llvm.org
Mon Sep 17 22:10:34 PDT 2018

I am trying to compile clang/llvm to target a specific CPU architecture (Intel Broadwell for instance). The intention here is that every time this specific compiler is run it will only ever generate code for that specific CPU.

To achieve this I would like to "bake-in" some command line arguments into the built compiler (things like -march), but still allow the user to provide extra command line arguments that may override the "baked-in" defaults.

GCC provides a spec file to achieve this, but I can't find something equivalent for clang/llvm. Does such a thing exist for clang/llvm?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20180918/58b61d4c/attachment.html>

More information about the cfe-users mailing list