This is an archive of the discontinued LLVM Phabricator instance.

[release] Build the LLVM releases with Position Independent Code enabled
AbandonedPublic

Authored by ldionne on Jun 15 2021, 3:45 PM.

Details

Summary

According to http://llvm.org/PR43604, it looks like we want to provide
the guarantee that users can build their applications with -fPIC or -fPIE
when linking against libc++.a. This is only possible if we build libc++.a
with -fPIC itself, which can be achieved through CMake's
CMAKE_POSITION_INDEPENDENT_CODE knob.

Diff Detail

Event Timeline

ldionne requested review of this revision.Jun 15 2021, 3:45 PM
ldionne created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2021, 3:45 PM

I created another take on this here: https://reviews.llvm.org/D104328.

Personally, I find the solution in this patch here more elegant, since it avoids hardcoding that choice in a layer way below in libc++.

ldionne abandoned this revision.Jul 27 2021, 11:20 AM

Abandoning since I went with D104328 instead.