Merge pull request #33871 from dtzWill/fix/llvm-5-python-closure

llvm-5: add extra 'python' output for opt-viewer tool
This commit is contained in:
Daiderd Jordan 2018-02-06 23:33:45 +01:00 committed by GitHub
commit 335ae38674
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -36,7 +36,7 @@ in stdenv.mkDerivation (rec {
mv compiler-rt-* $sourceRoot/projects/compiler-rt
'';
outputs = [ "out" ]
outputs = [ "out" "python" ]
++ stdenv.lib.optional enableSharedLibraries "lib";
nativeBuildInputs = [ cmake python ]
@ -120,7 +120,11 @@ in stdenv.mkDerivation (rec {
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${stdenv.hostPlatform.extensions.sharedLibrary}" "$lib"
substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \