OSDN Git Service

[cmake] Add function for building native tool
authorShoaib Meenai <smeenai@fb.com>
Tue, 2 Apr 2019 15:58:03 +0000 (15:58 +0000)
committerShoaib Meenai <smeenai@fb.com>
Tue, 2 Apr 2019 15:58:03 +0000 (15:58 +0000)
commitf66e62013a3da97dfb0d81249197d52630764532
tree2720d16a1f59988df0967e3cc35bb0fba4dcbbf2
parent85027ee656056a834fd3bcacc91bcf79dcd1d3ae
[cmake] Add function for building native tool

Instead of duplicating functionality for building native versions of
tblgen and llvm-config, add a function to set up a native tool build.
This will also be used for llvm-nm in a follow-up.

This should be NFC for tblgen, besides the slightly different COMMENT
for the custom command (it'll display the tablegen target name instead
of always saying TableGen).  For the native llvm-config, it's a behavior
change in that we'll use llvm_ExternalProject_BuildCmd instead of
constructing the build command manually, always build in Release, and
reference the correct binary path for multi-config generators. I believe
all of these changes to be bug fixes.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357486 91177308-0d34-0410-b5e6-96231b3b80d8
cmake/modules/CrossCompile.cmake
cmake/modules/TableGen.cmake
tools/llvm-config/CMakeLists.txt