On 17/02/17 06:01 PM, Eero Tamminen wrote: > Hi, > > On 10.02.2017 02:59, Michel Dänzer wrote: >> On 09/02/17 10:50 PM, Emil Velikov wrote: >>> On 9 February 2017 at 08:07, Michel Dänzer <mic...@daenzer.net> wrote: >>>> From: Michel Dänzer <michel.daen...@amd.com> >>>> >>>> Drop all -m*, -W*, -O*, -g* and -f* flags, with the exception of >>>> -fno-rtti, which must be used if it's part of the llvm-config >>>> --cxxflags >>>> output. We don't want LLVM to dictate the flags we use, and it can even >>>> cause build failures, e.g. if LLVM and Mesa are built with different >>>> compilers. > > Out of curiosity, where this stuff is applied? > > (If you're removing all of them, result is hard to debug, non-optimized > binary...) > > >>> Yes, please ! >>> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> >> >> >>> Out of curiosity: >>> Are you speaking of personal experience ? What was stored in the >>> c/cpp/cxx flags that triggered build failure ? >> >> Building LLVM with clang 4.0 resulted in llvm-config --cxxflags >> containing -Wstring-conversion and -fcolor-diagnostics, which aren't >> supported by gcc 6.3. > > There are generic flags that have been supported by few decades, which > are not going to change, like -O[1-3], -Wall, -g. Only the specific > optimization & warning flags are something that differ between compiler > versions (as new ones get added).
strip_unwanted_llvm_flags() only affects LLVM_CXXFLAGS, so this change doesn't remove any compiler flags used by Mesa itself, it just prevents llvm-config from unnecessarily adding potentially harmful compiler flags when compiling some LLVM related Mesa code. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev