[PATCH] D41580: CMAKE: Add flags to skip building NATIVE tools
Martell Malone via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 26 22:35:40 PST 2017
martell added a comment.
In https://reviews.llvm.org/D41580#964147, @hintonda wrote:
> I like your idea, but can't you do this without adding new flags?
>
> You already have to pass `-D(CLANG|LLVM)_TABLEGEN` which prevents them from getting built. llvm-config is a little different in that you need to pass `-D_LLVM_CONFIG_EXE` since `project` is undefined in tools/llvm-config, but adding a test for `${project}_LLVM_CONFIG_EXE` is consistent and should work as well. Perhaps this needs to be refactored as well, so you can pass `-DLLVM_CONFIG_EXE` instead of `-D_LLVM_CONFIG_EXE`.
I was originally trying to use `-D(CLANG|LLVM)_TABLEGEN` but clang would complain about no rule to build a target.
This either was fixed very very recently (like in the last day or two) or the following set of extra flags fix this
-DCMAKE_SYSTEM_PROGRAM_PATH=$TOOLCHAIN_PREFIX/bin
-DCMAKE_FIND_ROOT_PATH=$TOOLCHAIN_PREFIX
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY
I can probably drop that part of the patch now, though I would like to know how it was fixed.
When building llvm project out of tree you are able to specify `-DLLVM_CONFIG_PATH`, this is true for both lld and clang on a quick look.
It would probably be better to use `LLVM_CONFIG_PATH` to keep the flags consistent across projects rather than using `_LLVM_CONFIG_EXE`
Repository:
rL LLVM
https://reviews.llvm.org/D41580
More information about the llvm-commits
mailing list