Page MenuHomePhabricator

[cmake] Fix get_llvm_lit_path() to respect LLVM_EXTERNAL_LIT always
ClosedPublic

Authored by mgorny on Jan 26 2019, 5:22 AM.

Details

Summary

Refactor the get_llvm_lit_path() logic to respect LLVM_EXTERNAL_LIT,
and require the fallback to be defined explicitly
as LLVM_DEFAULT_EXTERNAL_LIT. This fixes building libcxx standalone
after r346888.

The old logic was using LLVM_EXTERNAL_LIT both as user-defined cache
variable and an optional pre-definition of default value from caller
(e.g. libcxx). It included a hack to make this work by assigning
the value back and forth but it was fragile and stopped working
in libcxx.

The new logic is simpler and more transparent. Default value is
provided in a separate variable, and used only when user-specified
variable is empty (i.e. not overriden).

Diff Detail

Repository
rL LLVM

Event Timeline

mgorny created this revision.Jan 26 2019, 5:22 AM
This revision is now accepted and ready to land.Jan 28 2019, 3:29 AM
This revision was automatically updated to reflect the committed changes.