Branch: refs/heads/main
Revision: 92a5614
Author: mppf
Link: Address linker errors on systems where clang defaults to pic/pie by mppf · Pull Request #19894 · chapel-lang/chapel · GitHub
Log Message:
Merge pull request #19894 from mppf/fix-llvm-pic
Address linker errors on systems where clang defaults to pic/pie
This PR is a better solution to the problem solved by PR #19785.
In addition to on Arch, I observed on Ubuntu 22.04 the same linker errors when using the Ubuntu package for LLVM and clang 14; but did not see the problem with version 13.
In setupModule, we were configuring the LLVM relocation model to be always static, except if CHPL_LIB_PIC=pic
. Now, we configure it based on whatever clang would do (so we can get the default that clang uses) and then additionally configure it to be pic
in the event that CHPL_LIB_PIC=pic
.
This PR removes the workaround from PR #19785 (but leaves in chpl_platform.is_arch_linux
in case it is needed in the future).
Future Work:
- #19898
Reviewed by @lydia-duncan - thanks!
-
[x] addresses problem with system LLVM 14 on Ubuntu 22.04
-
[x] arch linux still works
-
[x] full local testing
Modified Files:
M compiler/llvm/clangUtil.cpp
M doc/rst/usingchapel/chplenv.rst
M util/chplenv/chpl_lib_pic.pyCompare: Comparing 35ff527e26d8...92a56145f7e6 · chapel-lang/chapel · GitHub