This is an archive of the discontinued LLVM Phabricator instance.

Prepare Compiler-RT for GnuInstallDirs, matching libcxx
ClosedPublic

Authored by Ericson2314 on Apr 28 2021, 3:48 PM.

Details

Summary

Instead of using COMPILER_RT_INSTALL_PATH through the CMake for
complier-rt, just use it to define variables for the subdirs which
themselves are used.

This preserves compatibility, but later on we might consider getting rid
of COMPILER_RT_INSTALL_PATH and just changing the defaults for the
subdir variables directly.


There was a seaming bug where the (non-Apple) per-target libdir was
${target} not lib/${target}. I suspect that has to do with the docs
on COMPILER_RT_INSTALL_PATH saying was the library dir when that's no
longer true, so I just went ahead and fixed it, allowing me to define
fewer and more sensible variables.

That last part should be the only behavior changes; everything else
should be a pure refactoring.


D99484 is the main thrust of the GnuInstallDirs work. Once this lands,
it should be feasible to follow both of these up with a simple patch for
compiler-rt analogous to the one for libcxx.

Diff Detail

Event Timeline

Ericson2314 created this revision.Apr 28 2021, 3:48 PM
Ericson2314 requested review of this revision.Apr 28 2021, 3:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 28 2021, 3:48 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
Ericson2314 added inline comments.
compiler-rt/cmake/base-config-ix.cmake
93–95

The new /lib here is the behavior change I spoke of in the commit message.

Ericson2314 edited the summary of this revision. (Show Details)Apr 28 2021, 3:55 PM
Ericson2314 added inline comments.
compiler-rt/cmake/base-config-ix.cmake
72

The suspicious, out-of-date description I described in the commit message.

Fix typo: BINDARY -> BINARY

@phosek Might you in particular like to review this one, after we earlier talked over what to do about compiler-rt in the other diffs?

Can anyone approval this and land this? My GNUInstallDirs patches have sit in limbo for a while now, and it is making me nervous.

phosek accepted this revision.Jul 2 2021, 1:25 AM

I tested this patch in our toolchain build and everything seems to be working, thanks for doing this!

This revision is now accepted and ready to land.Jul 2 2021, 1:25 AM

@Ericson2314 do you need me to land it for you?

Ericson2314 added a comment.EditedJul 2 2021, 9:26 PM

@phosek Thanks for reviewing and testing!

do you need me to land it for you

Yes, please.

If landing my patches becomes a burden, I am happy to go through the steps described in https://llvm.org/docs/DeveloperPolicy.html#id17. I would assume I am many, many patches away from earning that privilege, but I am not sure what the norms are around here.