Merge pull request #71472 from regadas/fix/graalvm

graalvm: Use lib.getVersion for stdenv.cc
This commit is contained in:
Matthew Bauer 2019-11-07 17:27:49 -05:00 committed by GitHub
commit 90e5be095c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -293,7 +293,7 @@ in rec {
# gfortran readline bzip2 lzma pcre.dev curl ed ## WIP: fastr dependencies
];
postUnpack = ''
cp ${stdenv.cc.cc}/include/c++/${stdenv.cc.cc.version}/stdlib.h \
cp ${stdenv.cc.cc}/include/c++/${lib.getVersion stdenv.cc.cc}/stdlib.h \
$sourceRoot/sulong/projects/com.oracle.truffle.llvm.libraries.bitcode/include
cp ${truffleMake} $TMP && mv *truffle.make truffle.make
rm $sourceRoot/truffle/src/libffi/patches/others/0001-Add-mx-bootstrap-Makefile.patch
@ -318,7 +318,7 @@ in rec {
--replace 'protected String compilerCommand = "cc";' 'protected String compilerCommand = "${stdenv.cc}/bin/cc";'
# prevent cyclical imports caused by identical <include> names
substituteInPlace sulong/projects/com.oracle.truffle.llvm.libraries.bitcode/include/stdlib.h \
--replace '# include <cstdlib>' '# include "${stdenv.cc.cc}/include/c++/${stdenv.cc.cc.version}/cstdlib"'
--replace '# include <cstdlib>' '# include "${stdenv.cc.cc}/include/c++/${lib.getVersion stdenv.cc.cc}/cstdlib"'
# dragonegg can't seem to compile on nix, so let's not require it
substituteInPlace sulong/mx.sulong/suite.py \
--replace '"requireDragonegg" : True,' '"requireDragonegg" : False,'