[cfe-dev] Adding a compile option to the latest llvm/clang build

Martin J. O'Riordan via cfe-dev cfe-dev at lists.llvm.org
Mon Jan 30 03:15:35 PST 2017


When configuring I use:

  -DCMAKE_CXX_FLAGS:STRING=<my-custom-flags>

for instance:

  -DCMAKE_CXX_FLAGS:STRING=-DENABLE_MY_EXPERIMENTAL_CHANGES

This works fine for '-D' etc., but I haven't tried it for other options.

	MartinO

-----Original Message-----
From: cfe-dev [mailto:cfe-dev-bounces at lists.llvm.org] On Behalf Of Edward Diener via cfe-dev
Sent: 30 January 2017 10:51
To: cfe-dev at lists.llvm.org
Subject: Re: [cfe-dev] Adding a compile option to the latest llvm/clang build

On 1/30/2017 12:17 AM, mats petersson via cfe-dev wrote:
> Can you be more specific as to what you are trying to do, and what it 
> actually does? An example would be great!

I build clang from source with gcc-6.3, using CMake and ninja. I need to make sure a particular gcc command line compiler option is added as part of the build that is generated by CMake. How do I do that with the latest clang source ? Previously the CMake gui program listed a particular CMake field for changing the command line option, but I forget what the name of that CMake field was. It is no longer showing in the CMake gui program with the latest llvm/clang source.

>
> On 30 January 2017 at 07:21, Edward Diener via cfe-dev 
> <cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>> wrote:
>
>     It was previously possible to add a compiler option to the build of
>     llvm/clang using CMake. Yet when I tried the cmake-gui program
>     against the latest llvm/clang updates the cmake setting to add
>     compiler optons when building llvm/clang was no longer there. How do
>     I do this with the latest version of llvm/clang ?
>
>     _______________________________________________
>     cfe-dev mailing list
>     cfe-dev at lists.llvm.org
>     <mailto:cfe-dev at lists.llvm.org>
>     http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>     <http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev>
>
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>


_______________________________________________
cfe-dev mailing list
cfe-dev at lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list