[PATCH] D104327: [release] Build the LLVM releases with Position Independent Code enabled

Louis Dionne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 15 15:45:41 PDT 2021


ldionne created this revision.
ldionne added reviewers: tstellar, chandlerc.
ldionne requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D104327

Files:
  llvm/utils/release/test-release.sh


Index: llvm/utils/release/test-release.sh
===================================================================
--- llvm/utils/release/test-release.sh
+++ llvm/utils/release/test-release.sh
@@ -384,12 +384,14 @@
         cmake -G "$generator" \
         -DCMAKE_BUILD_TYPE=$BuildType -DLLVM_ENABLE_ASSERTIONS=$Assertions \
         -DLLVM_ENABLE_PROJECTS="$project_list" \
+        -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
         $ExtraConfigureFlags $BuildDir/llvm-project/llvm \
         2>&1 | tee $LogDir/llvm.configure-Phase$Phase-$Flavor.log
     env CC="$c_compiler" CXX="$cxx_compiler" \
         cmake -G "$generator" \
         -DCMAKE_BUILD_TYPE=$BuildType -DLLVM_ENABLE_ASSERTIONS=$Assertions \
         -DLLVM_ENABLE_PROJECTS="$project_list" \
+        -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
         $ExtraConfigureFlags $BuildDir/llvm-project/llvm \
         2>&1 | tee $LogDir/llvm.configure-Phase$Phase-$Flavor.log
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104327.352275.patch
Type: text/x-patch
Size: 932 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210615/fa5540fe/attachment.bin>


More information about the llvm-commits mailing list