[cfe-dev] how to avoid passing new clang front end option to the linker?

Peeter Joot via cfe-dev cfe-dev at lists.llvm.org
Wed Mar 15 08:09:38 PDT 2017


I'm attempting to implement a new clang front end option for my project (-fmyopt=blah), and have made the changes required that I can access and act on it in my Target class when compiling. When linking, it causes a bit of trouble, as clang passes it on to gcc in the link phase:

"/usr/lib64/ccache/gcc" -g -D QSIZE -fpic -MD -fmyopt=blah -v -m64 -o tryit /run/user/1002/tryit-46641b.o

which gcc objects to.

What part of the code is the link command line constructed in, and what is the mechanism used to select which options get passed to other stages (or an example of that)?

--
Peeter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170315/8d3ad724/attachment.html>


More information about the cfe-dev mailing list