<p dir="ltr"><br>
On 18 Jul 2014 17:41, "Brad King" <<a href="mailto:brad.king@kitware.com">brad.king@kitware.com</a>> wrote:<br>
><br>
> On 07/18/2014 12:15 PM, Dan Liew wrote:<br>
> > The most important differences seem to be the use of the following flags<br>
> > -ffunction-sections<br>
> > -fno-exceptions<br>
> > -fno-rtti<br>
> > -pedantic<br>
><br>
> IMO we also do not need to tell applications about incidental flags<br>
> like "-W...".  Currently you read CMAKE_<LANG>_FLAGS:<br>
><br>
> > +set(LLVM_CFLAGS "${CMAKE_C_FLAGS}")<br>
> > +set(LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS}")<br>
><br>
> but there are other places that flags can appear.  Instead we should<br>
> construct an explicit list of flags that applications need to use to<br>
> achieve ABI compatibility and export only those.  </p>
<p dir="ltr">Would you suggest reading the compile flags from a target (e.g. llvm-dis ) and filtering out unneeded ones (e.g. warning flags and optimisation level)? Or are you suggesting a hard coded list that we put into LLVMConfig.cmake? If the latter we would need to maintain a list for different compilers.</p>

<p dir="ltr">I also don't know what flags are "really" needed. In my experience -fno-rtti and -DNDEBUG ( if LLVM was built with assertions) was sufficient for my use but this really isn't my area of expertise.</p>

<p dir="ltr">Does anyone know? Should I ask on LLVMdev?</p>
<p dir="ltr">Dan.<br>
</p>