This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Load LLVMConfig for standalone build of builtins
ClosedPublic

Authored by Hahnfeld on Jul 27 2016, 7:12 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

Hahnfeld updated this revision to Diff 65737.Jul 27 2016, 7:12 AM
Hahnfeld retitled this revision from to ass through COMPILER_RT_DEFAULT_TARGET_ARCH for builtins.
Hahnfeld updated this object.
Hahnfeld added a reviewer: beanz.
Hahnfeld added a subscriber: llvm-commits.
Hahnfeld retitled this revision from ass through COMPILER_RT_DEFAULT_TARGET_ARCH for builtins to Pass through COMPILER_RT_DEFAULT_TARGET_ARCH for builtins.Jul 27 2016, 7:27 AM
beanz requested changes to this revision.Jul 29 2016, 10:33 AM
beanz edited edge metadata.

This isn't the right solution here. We should instead make the builtins build load LLVMConfig.cmake (if available) and construct the value from the TARGET_TRIPLE the same way the sanitizer build does. If LLVMConfig.cmake isn't available we should make the builtin build error out during configuration that it needs the TARGET_TRIPLE specified.

-Chris

This revision now requires changes to proceed.Jul 29 2016, 10:33 AM
Hahnfeld updated this revision to Diff 66281.Aug 1 2016, 12:20 AM
Hahnfeld retitled this revision from Pass through COMPILER_RT_DEFAULT_TARGET_ARCH for builtins to [CMake] Load LLVMConfig for standalone build of builtins.
Hahnfeld updated this object.
Hahnfeld edited edge metadata.

Make changes in compiler-rt to load LLVMConfig

This isn't the right solution here. We should instead make the builtins build load LLVMConfig.cmake (if available) and construct the value from the TARGET_TRIPLE the same way the sanitizer build does. If LLVMConfig.cmake isn't available we should make the builtin build error out during configuration that it needs the TARGET_TRIPLE specified.

-Chris

Hi Chris,

I'm absolutely no CMake expert, but the changes seem to work for me.

Thanks,
Jonas

beanz accepted this revision.Aug 1 2016, 11:01 AM
beanz edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Aug 1 2016, 11:01 AM
This revision was automatically updated to reflect the committed changes.