[PATCH] D19895: cmake: Introduce TEST_SUITE_C_FLAGS, TEST_SUITE_CXX_FLAGS, etc.

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Tue May 3 18:18:11 PDT 2016


MatzeB added a comment.

Some additional comments:

The goal of this is to enable things like:

> cmake -GNinja -C $TESTSUITE/cmake/caches/target-arm64-iphoneos.cmake -DTEST_SUITE_C_FLAGS="-save-temps=obj" $TESTSUITE


with all the strange flags necessary for cross compilation hidden in the target-arm64-iphoneos.cmake file, while it is still being able to inject extra C flags into the build. Using -DCMAKE_C_FLAGS="-save-temps=obj" would override all the settings done in the cache file.

- I am putting this out for review because lnt should be aware of the new flags. (Though in the meantime using CMAKE_C_FLAGS continues to work but gives you a warning message).

- I tried to use new flag names in the cache files instead of forcing new names on the cmake users. However this did not work out: In all my attempts appending the custom flags to CMAKE_C_FLAGS happens too late in the cmake processing and various cmake environment/configuration checks would fail without the cache files target flags being in effect. Setting the crosscompilation flags early enough is essential for those to work so we need to set CMAKE_C_FLAGS in the cache files.


Repository:
  rL LLVM

http://reviews.llvm.org/D19895





More information about the llvm-commits mailing list