[cmake-developers] CMake adds -qalias=noansi by XLC
Todd Gamblin
tgamblin at llnl.gov
Wed Jul 1 12:14:39 EDT 2015
Hi,
I asked this over on the regular cmake list and got no answer, so maybe
developers is the right place for it.
I noticed while poking around CMake's compiler modules that the defaults for
XL are kind of inconsistent. Specifically, If you look here:
https://github.com/Kitware/CMake/blob/master/Modules/Compiler/XL-C.cmake
CMake adds -qalias=noansi by default, which prevents a bunch of
optimizations. CMake does not add that for XL C++. It also doesn't tweak
any default aliasing settings for other compilers. Why XLC?
At LLNL, we don't like qalias=noansi because it prevents a lot of
optimizations, so we typically recommend that users NOT use that flag. It's
been surprising for us that CMake adds it by default when it's not a default
for XL, which uses -qalias=ansi (type-based aliasing) by default.
So, two questions:
- Is there some reason CMake adds the -qalias=noansi arg for XLC?
- Could it be removed in future versions for consistency with
other compilers' C++ settings?
I can push a feature branch if people agree that this is a good idea.
-Todd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150701/83da986c/attachment.html>
More information about the cmake-developers
mailing list