llvm6: same python output fix from #33871

Unlike that PR, however, this doesn't need to go to staging
since no one depends on a package that doesn't exist yet :).
This commit is contained in:
Will Dietz 2018-02-02 06:38:15 -06:00
parent 0d90539cda
commit 11cb7d00ca

View File

@ -38,7 +38,7 @@ in stdenv.mkDerivation (rec {
mv compiler-rt-* $sourceRoot/projects/compiler-rt mv compiler-rt-* $sourceRoot/projects/compiler-rt
''; '';
outputs = [ "out" ] outputs = [ "out" "python" ]
++ stdenv.lib.optional enableSharedLibraries "lib"; ++ stdenv.lib.optional enableSharedLibraries "lib";
nativeBuildInputs = [ perl groff cmake python ] nativeBuildInputs = [ perl groff cmake python ]
@ -120,7 +120,11 @@ in stdenv.mkDerivation (rec {
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib
''; '';
postInstall = stdenv.lib.optionalString enableSharedLibraries '' postInstall = ''
mkdir -p $python/share
mv $out/share/opt-viewer $python/share/opt-viewer
''
+ stdenv.lib.optionalString enableSharedLibraries ''
moveToOutput "lib/libLLVM-*" "$lib" moveToOutput "lib/libLLVM-*" "$lib"
moveToOutput "lib/libLLVM${stdenv.hostPlatform.extensions.sharedLibrary}" "$lib" moveToOutput "lib/libLLVM${stdenv.hostPlatform.extensions.sharedLibrary}" "$lib"
substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \ substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \