Pavel Labath f4f4ffb1e1 [cmake] Make setting of CMAKE_C(XX)_COMPILER flags overridable for cross-builds
Summary:
r319898 made it possible to override these variables via the
CROSS_TOOLCHAIN_FLAGS setting, but this only worked if one explicitly
specifies these variables there. If, instead, one uses
CROSS_TOOLCHAIN_FLAGS to specify a toolchain file (as our internal
builds do, to point cmake to a checked-in toolchain), the
CMAKE_C(XX)_COMPILER flags would still win over the ones specified by
the toolchain file.

To fix is to make the mere presence of these flags overridable. I do
this by putting them as a default value for the CROSS_TOOLCHAIN_FLAGS
setting, so they can be overridden at cmake configuration time.

Reviewers: hintonda, beanz

Subscribers: bogner, llvm-commits, mgorny

Differential Revision: https://reviews.llvm.org/D40947

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320138 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-08 09:59:48 +00:00
..
2017-07-21 22:48:47 +00:00

See docs/CMake.html for instructions on how to build LLVM with CMake.