diff options
author | Rainer Orth <ro@gcc.gnu.org> | 2020-09-20 12:40:21 +0200 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2020-09-20 12:40:21 +0200 |
commit | 26947d7b63809413b96b0bb6033f168488836289 (patch) | |
tree | 15770a6587d401b2cbb7065a896e1215df5a50bc /clang/lib/Tooling/JSONCompilationDatabase.cpp | |
parent | 871d03a6751e0f82e210c80a881ef357c5633a26 (diff) | |
download | llvm-26947d7b63809413b96b0bb6033f168488836289.zip llvm-26947d7b63809413b96b0bb6033f168488836289.tar.gz llvm-26947d7b63809413b96b0bb6033f168488836289.tar.bz2 |
[tools][remarks-shlib] Don't build libRemarks.so without PIC
A build on `sparcv9-sun-solaris2.11` with `-DLLVM_ENABLE_PIC=Off` failed
linking `libRemarks.so`:
[27/2297] Linking CXX shared library lib/libRemarks.so.12git
FAILED: lib/libRemarks.so.12git
[...]
ld: fatal: relocation error: R_SPARC_H44: file lib/libLLVMRemarks.a(Remark.cpp.o): symbol _ZTVN4llvm18raw_string_ostreamE: invalid shared object relocation type: ABS44 code model unsupported
[...]
On Solaris/sparcv9 as on many other targets you cannot link non-PIC objects
into a shared object.
The following patch avoids this by not building the library with PIC. It
allowed the build to complete and `ninja check-all` showed no errors.
Differential Revision: https://reviews.llvm.org/D85626
Diffstat (limited to 'clang/lib/Tooling/JSONCompilationDatabase.cpp')
0 files changed, 0 insertions, 0 deletions