This is an archive of the discontinued LLVM Phabricator instance.

[libcxx][libcxxabi][libunwind][cmake] Use `GNUInstallDirs` to support custom installation dirs
ClosedPublic

Authored by Ericson2314 on Jan 15 2022, 10:02 PM.

Details

Reviewers
compnerd
phosek
beanz
Group Reviewers
Restricted Project
Restricted Project
Restricted Project
Commits
rGf16a4a034a27: [libcxx][libcxxabi][libunwind][cmake] Use `GNUInstallDirs` to support custom…
Summary

I am breaking apart D99484 so the cause of build failures is easier to
understand.

Diff Detail

Event Timeline

Ericson2314 created this revision.Jan 15 2022, 10:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 15 2022, 10:02 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Ericson2314 requested review of this revision.Jan 15 2022, 10:02 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 15 2022, 10:02 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Herald added a reviewer: Restricted Project. · View Herald Transcript
Ericson2314 retitled this revision from [libcxx][libcxxabi][libunwind][cmake] Use `GNUInstallDirs` to support custom installation dirs. to [libcxx][libcxxabi][libunwind][cmake] Use `GNUInstallDirs` to support custom installation dirs.Jan 15 2022, 10:15 PM

Forgot one part of libcxx

This code was previously approved as part of D99484 so to continue my breaking-for-easy-trouble-shooting I will land this next.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 17 2022, 10:45 PM
This revision was automatically updated to reflect the committed changes.
arichardson added inline comments.
libcxx/CMakeLists.txt
32

Shouldn't this be included below project() to avoid cmake warnings?

Ericson2314 added inline comments.Jan 18 2022, 12:42 PM
libcxx/CMakeLists.txt
32

Sorry, I did see this and your earlier comment in https://reviews.llvm.org/D100810#3248494 .

If it's OK, I figured I might want to come up with a systematic solution later. Relatedly, we are not yet using CMAKE_INSTALL_LIBDIR because of LLVM_LIBDIR_SUFFIX and friends.

I think the solution might end being custom logic to default CMAKE_INSTALL_LIBDIR if it is not yet defined, and then we side-step the warning entirely?