Commit 10f88a7
committed
Only disable rpath during installation
We currently disable rpath during both build and install. Instead,
we use LD_LIBRARY_PATH to allow the built clang to find the
libLLVM.so etc objects.
However, this does not work well if the system clang and the
clang being built have the same version. During the build, we
use both the system clang and the just-built clang, and they
need to use the system and just-built shared objects respectively.
However, use of LD_LIBRARY_PATH causes us to always use the
just-built objects as long as the versions match.
This is a problem in two scenarios: When building compat packages
for the current system LLVM version, we mix system clang with
compat libraries, which assume different paths. And when building
release candidates, a build using a previous rc of a newer rc
may use ABI-incompatible objects, because we don't version sonames
on rc versions.
Fix this by keeping the rpath during the build and only stripping
it on installation using the CMAKE_SKIP_INSTALL_RPATH option.
For manually installed binaries, we need to also manually strip
the rpath using chrpath.
This way system clang will use system libraries, and just-built
clang will use just-built libraries.1 parent 4f254e5 commit 10f88a7
1 file changed
+11
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
| |||
805 | 806 | | |
806 | 807 | | |
807 | 808 | | |
808 | | - | |
809 | | - | |
810 | 809 | | |
811 | 810 | | |
812 | 811 | | |
| |||
941 | 940 | | |
942 | 941 | | |
943 | 942 | | |
944 | | - | |
945 | 943 | | |
946 | 944 | | |
947 | 945 | | |
948 | 946 | | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
949 | 956 | | |
950 | 957 | | |
951 | 958 | | |
| |||
1057 | 1064 | | |
1058 | 1065 | | |
1059 | 1066 | | |
| 1067 | + | |
1060 | 1068 | | |
1061 | 1069 | | |
1062 | 1070 | | |
| |||
0 commit comments