This is an archive of the discontinued LLVM Phabricator instance.

[cmake] Don't build Native llvm-config when cross compiling if passed by user.
ClosedPublic

Authored by hintonda on Jan 6 2018, 6:07 PM.

Details

Summary

Rename LLVM_CONFIG_EXE to LLVM_CONFIG_PATH, and avoid building it if
passed in by user. This is the same way CLANG_TABLEGEN and
LLVM_TABLEGEN are handled, e.g., when -DLLVM_OPTIMIZED_TABLEGEN=ON is
passed.

Diff Detail

Repository
rL LLVM

Event Timeline

hintonda created this revision.Jan 6 2018, 6:07 PM
hintonda retitled this revision from [cmake] Remove unused NATIVE LLVM_CONFIG_EXE logic. to [cmake] Don't build Native LLVM_CONFIG_EXE when cross compiling if passed by user..Jan 8 2018, 7:20 PM
hintonda edited the summary of this revision. (Show Details)
hintonda added a reviewer: phosek.
hintonda updated this revision to Diff 129027.Jan 8 2018, 7:20 PM
  • Don't build Native LLVM_CONFIG_EXE when cross compiling if passed by

I think LLVM_CONFIG_PATH is a more appropriate as that name is already used by other LLVM projects exactly for this purpose.

hintonda updated this revision to Diff 130681.Jan 19 2018, 1:22 PM
  • Change name to LLVM_CONFIG_PATH per suggestion by @phosek.
martell accepted this revision.Jan 20 2018, 1:27 PM
martell added a subscriber: martell.

This seems to work better then what I have in D41580 for llvm_config.
LGTM.

We should try to get this back ported to the 6.0 branch before release.

This revision is now accepted and ready to land.Jan 20 2018, 1:27 PM
hintonda updated this revision to Diff 130781.Jan 20 2018, 2:29 PM

Add LLVM_CONFIG_PATH to the cache instead of using PARENT_SCOPE, since
PARENT_SCOPE only goes up one level -- tools directory in this case --
and won't be visible to llvm_ExternalProject_Add otherwise.

hintonda retitled this revision from [cmake] Don't build Native LLVM_CONFIG_EXE when cross compiling if passed by user. to [cmake] Don't build Native llvm-config when cross compiling if passed by user..Jan 20 2018, 4:21 PM
hintonda edited the summary of this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.