This is an archive of the discontinued LLVM Phabricator instance.

Remove `COMPILER_RT_INSTALL_PATH`
AbandonedPublic

Authored by Ericson2314 on Apr 4 2021, 9:37 AM.

Details

Reviewers
None
Summary

This patch removes those in order to simplify things for D99484.

It turns out we don't neeed to remove clang/runtime to make this work,
as @phosek thought might be necessary.

To do this, we just set CMAKE_INSTALL_PREFIX rather than
COMPILER_RT_INSTALL_PATH in clang/runtime in the child CMake
invocation. Since it's a separate CMake invocation, we don't have to
worry about mutation "bleeding over" and effecting other projects.

However I am still worrie about redefining of CMAKE_INSTALL_PREIX in
compiler-rt/cmake/base-config-ix.cmake. This occurs under
LLVM_TREE_AVAILABLE. If this is just for separate compiler-rt builds
(separate invocation of CMake, that is), this is fine. But if on the
other hand this is for combination builds in a single CMake run, then
this sort of redefinition is no good as it will effect more than
compiler-rt.

Diff Detail

Event Timeline

Ericson2314 created this revision.Apr 4 2021, 9:37 AM
Ericson2314 requested review of this revision.Apr 4 2021, 9:38 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 4 2021, 9:38 AM
Herald added subscribers: Restricted Project, cfe-commits. · View Herald Transcript
Ericson2314 edited the summary of this revision. (Show Details)Apr 4 2021, 9:47 AM

I'm worried that overriding CMAKE_INSTALL_PREFIX is going to break the runtimes build where we build compiler-rt, libcxx, libcxxabi, libunwind in a single CMake build, and compiler-rt always comes first see https://github.com/llvm/llvm-project/blob/98742e42fc50f58d3f2d3f2cdbbf540288c134b9/runtimes/CMakeLists.txt#L57.

I'm worried that overriding CMAKE_INSTALL_PREFIX is going to break the runtimes build where we build compiler-rt, libcxx, libcxxabi, libunwind in a single CMake build, and compiler-rt always comes first see https://github.com/llvm/llvm-project/blob/98742e42fc50f58d3f2d3f2cdbbf540288c134b9/runtimes/CMakeLists.txt#L57.

Gotcha, and if (LLVM_TREE_AVAILABLE) would be true in that case? That means compiler-rt-specific variables are here to stay, but I no longer think that's so bad. See the latest https://reviews.llvm.org/D99484 for how polly works now, I can do that here.

Ericson2314 abandoned this revision.May 4 2021, 7:42 PM

D101497 is more safe/conservative and gets the job done to prepare for`GnuInstallDirs`. Closing in favor of that.