Page MenuHomePhabricator

Fix llvm-config support for CMake build-mode-style builds
ClosedPublic

Authored by jordan_rose on Aug 15 2019, 5:24 PM.

Details

Reviewers
beanz
jfb
Summary

At some point we and/or CMake changed our build-mode-style builds from $LLVM_OBJ_ROOT/bin/$CMAKE_CFG_INTDIR/ to $LLVM_OBJ_ROOT/$CMAKE_CFG_INTDIR/bin/, which is way easier to use. But no one updated llvm-config.

Discovered when attempting to build libcxx with Xcode via Swift's build script, something that's probably not an interesting configuration to LLVM (or even so much to Swift). But it's good to be correct, right?

Diff Detail

Repository
rL LLVM

Event Timeline

jordan_rose created this revision.Aug 15 2019, 5:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 15 2019, 5:24 PM
jordan_rose marked an inline comment as done.Aug 15 2019, 5:25 PM
jordan_rose added inline comments.
tools/llvm-config/llvm-config.cpp
330

I'm not actually sure if LLVM_LIBDIR_SUFFIX is used here either, but it's not more wrong than it was before.

jordan_rose marked an inline comment as not done.Aug 15 2019, 5:26 PM
beanz accepted this revision.Aug 15 2019, 10:22 PM

This fix looks good, although I would suggest that when building libcxx, using the LLVM CMake exports should be more reliable than llvm-confit.

This revision is now accepted and ready to land.Aug 15 2019, 10:22 PM

libcxx is using llvm-config to find the CMake exports; that's actually what prompted this change.