forked from mirrors/nixpkgs
Merge pull request #162607 from waldheinz/libllvm-drop-static
llvmPackages/libllvm: do not include static archives when shared is r…
This commit is contained in:
commit
a1780e4b7d
|
@ -244,6 +244,12 @@ in stdenv.mkDerivation (rec {
|
|||
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
|
||||
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
|
||||
''
|
||||
+ optionalString enableSharedLibraries ''
|
||||
mkdir -p $dev/lib
|
||||
mv $lib/lib/*.a $dev/lib
|
||||
sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
|
||||
"$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
|
||||
''
|
||||
+ optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
|
||||
'';
|
||||
|
|
|
@ -255,6 +255,12 @@ in stdenv.mkDerivation (rec {
|
|||
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
|
||||
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
|
||||
''
|
||||
+ optionalString enableSharedLibraries ''
|
||||
mkdir -p $dev/lib
|
||||
mv $lib/lib/*.a $dev/lib
|
||||
sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
|
||||
"$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
|
||||
''
|
||||
+ optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
|
||||
'';
|
||||
|
|
|
@ -242,6 +242,12 @@ in stdenv.mkDerivation (rec {
|
|||
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
|
||||
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
|
||||
''
|
||||
+ optionalString enableSharedLibraries ''
|
||||
mkdir -p $dev/lib
|
||||
mv $lib/lib/*.a $dev/lib
|
||||
sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
|
||||
"$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
|
||||
''
|
||||
+ optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
|
||||
'';
|
||||
|
|
|
@ -205,6 +205,12 @@ in stdenv.mkDerivation (rec {
|
|||
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
|
||||
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
|
||||
''
|
||||
+ optionalString enableSharedLibraries ''
|
||||
mkdir -p $dev/lib
|
||||
mv $lib/lib/*.a $dev/lib
|
||||
sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
|
||||
"$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
|
||||
''
|
||||
+ optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
|
||||
'';
|
||||
|
|
|
@ -200,6 +200,12 @@ in stdenv.mkDerivation (rec {
|
|||
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
|
||||
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
|
||||
''
|
||||
+ optionalString enableSharedLibraries ''
|
||||
mkdir -p $dev/lib
|
||||
mv $lib/lib/*.a $dev/lib
|
||||
sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
|
||||
"$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
|
||||
''
|
||||
+ optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
|
||||
'';
|
||||
|
|
|
@ -222,6 +222,12 @@ stdenv.mkDerivation (rec {
|
|||
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${v}.dylib
|
||||
'') versionSuffixes}
|
||||
''
|
||||
+ optionalString enableSharedLibraries ''
|
||||
mkdir -p $dev/lib
|
||||
mv $lib/lib/*.a $dev/lib
|
||||
sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
|
||||
"$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
|
||||
''
|
||||
+ optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
|
||||
'';
|
||||
|
|
|
@ -215,6 +215,12 @@ stdenv.mkDerivation (rec {
|
|||
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${v}.dylib
|
||||
'') versionSuffixes}
|
||||
''
|
||||
+ optionalString enableSharedLibraries ''
|
||||
mkdir -p $dev/lib
|
||||
mv $lib/lib/*.a $dev/lib
|
||||
sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
|
||||
"$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
|
||||
''
|
||||
+ optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
|
||||
'';
|
||||
|
|
|
@ -234,6 +234,12 @@ in stdenv.mkDerivation (rec {
|
|||
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${v}.dylib
|
||||
'') versionSuffixes}
|
||||
''
|
||||
+ optionalString enableSharedLibraries ''
|
||||
mkdir -p $dev/lib
|
||||
mv $lib/lib/*.a $dev/lib
|
||||
sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
|
||||
"$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
|
||||
''
|
||||
+ optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
|
||||
'';
|
||||
|
|
|
@ -226,6 +226,12 @@ in stdenv.mkDerivation (rec {
|
|||
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
|
||||
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
|
||||
''
|
||||
+ optionalString enableSharedLibraries ''
|
||||
mkdir -p $dev/lib
|
||||
mv $lib/lib/*.a $dev/lib
|
||||
sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
|
||||
"$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
|
||||
''
|
||||
+ optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
|
||||
'';
|
||||
|
|
|
@ -241,6 +241,12 @@ in stdenv.mkDerivation (rec {
|
|||
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
|
||||
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
|
||||
''
|
||||
+ optionalString enableSharedLibraries ''
|
||||
mkdir -p $dev/lib
|
||||
mv $lib/lib/*.a $dev/lib
|
||||
sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
|
||||
"$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
|
||||
''
|
||||
+ optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
|
||||
'';
|
||||
|
|
|
@ -200,6 +200,12 @@ in stdenv.mkDerivation (rec {
|
|||
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
|
||||
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
|
||||
''
|
||||
+ optionalString enableSharedLibraries ''
|
||||
mkdir -p $dev/lib
|
||||
mv $lib/lib/*.a $dev/lib
|
||||
sed -i -E "s|$lib/lib/(.*)\.a|$dev/lib/\1\.a|" \
|
||||
"$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake"
|
||||
''
|
||||
+ optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue