[PATCH] D40947: [cmake] Make setting of CMAKE_C(XX)_COMPILER flags overridable for cross-builds

Don Hinton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 10:45:10 PST 2017


hintonda added a comment.

In https://reviews.llvm.org/D40947#952427, @hintonda wrote:

> Btw, if you actually did include a toolchain file here, and it set CMAKE_SYSTEM_NAME, it could cause an infinite recursion depending on how the call call was made.


I can confirm that the following file will cause the recursion and ultimate build-time failure:

cat llvm/cmake/platforms/.cmake
set(CMAKE_SYSTEM_NAME Darwin)

"llvm/cmake/platforms/.cmake" matches ${LLVM_MAIN_SRC_DIR}/cmake/platforms/${toolchain}.cmake when toolchain is blank -- the default case.


Repository:
  rL LLVM

https://reviews.llvm.org/D40947





More information about the llvm-commits mailing list