This is an archive of the discontinued LLVM Phabricator instance.

[llvm] Include LLVM_ENABLE_RUNTIMES in the cross compilation invocation
ClosedPublic

Authored by JDevlieghere on Oct 29 2021, 4:23 PM.

Details

Summary

Forward the LLVM_ENABLE_RUNTIMES cmake variable in the cross compilation invocation.

Now that passing libcxx must be specified in LLVM_ENABLE_RUNTIMES instead of LLVM_ENABLE_PROJECTS, the LLDB's sanity check for libcxx trips up (in the cross compilation case) because the runtimes are not forwarded. This patch fixes that.

Diff Detail

Event Timeline

JDevlieghere created this revision.Oct 29 2021, 4:23 PM
JDevlieghere requested review of this revision.Oct 29 2021, 4:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 29 2021, 4:23 PM
JDevlieghere added a comment.EditedOct 29 2021, 4:24 PM

Without this change, you get something like:

[551/5308] Configuring NATIVE LLVM...
FAILED: NATIVE/CMakeCache.txt /Users/jonas/llvm/build-ra/NATIVE/CMakeCache.txt
...
CMake Error at /Users/jonas/llvm/llvm-project/lldb/test/CMakeLists.txt:122 (message):
  LLDB test suite requires libc++, but it is currently disabled.  Please add
  `libcxx` to `LLVM_ENABLE_RUNTIMES`, or disable tests via
  `LLDB_INCLUDE_TESTS=OFF`.

I'm putting up a separate patch to specify only LLVM_ENABLE_RUNTIMES in the error message.

edit: D112856

smeenai accepted this revision.Oct 29 2021, 4:25 PM

LGTM, thanks.

This revision is now accepted and ready to land.Oct 29 2021, 4:25 PM
This revision was landed with ongoing or failed builds.Oct 29 2021, 4:33 PM
This revision was automatically updated to reflect the committed changes.