coreclr: 8c70800 -> 1.0.4
This commit is contained in:
parent
24c551a99d
commit
540e3e8935
@ -7,18 +7,24 @@
|
|||||||
, libunwind
|
, libunwind
|
||||||
, gettext
|
, gettext
|
||||||
, openssl
|
, openssl
|
||||||
|
, python2
|
||||||
|
, icu
|
||||||
|
, lttng-ust
|
||||||
|
, liburcu
|
||||||
|
, libuuid
|
||||||
|
, ed
|
||||||
|
, debug ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "coreclr-${version}";
|
name = "coreclr-${version}";
|
||||||
version = "git-" + (builtins.substring 0 10 rev);
|
version = "1.0.4";
|
||||||
rev = "8c70800b5e8dc5535c379dec4a6fb32f7ab5e878";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "dotnet";
|
owner = "dotnet";
|
||||||
repo = "coreclr";
|
repo = "coreclr";
|
||||||
inherit rev;
|
rev = "v${version}";
|
||||||
sha256 = "1galskbnr9kdjjxpx5qywh49400swchhq5f54i16kxyr9k4mvq1f";
|
sha256 = "1wpig71q0kh2yrq162d32x00zlwrrs1wymkgijh49cqkn4cwkh91";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
@ -30,31 +36,61 @@ stdenv.mkDerivation rec {
|
|||||||
libunwind
|
libunwind
|
||||||
gettext
|
gettext
|
||||||
openssl
|
openssl
|
||||||
|
python2
|
||||||
|
icu
|
||||||
|
lttng-ust
|
||||||
|
liburcu
|
||||||
|
libuuid
|
||||||
|
ed
|
||||||
];
|
];
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
# Prevent clang-3.5 (rather than just clang) from being selected as the compiler as that's
|
# Prevent clang-3.5 (rather than just clang) from being selected as the compiler as that's
|
||||||
# not wrapped
|
# not wrapped
|
||||||
substituteInPlace src/pal/tools/gen-buildsys-clang.sh --replace "which \"clang-" "which \"clang-DoNotFindThisOne"
|
substituteInPlace src/pal/tools/gen-buildsys-clang.sh --replace "which \"clang-\$" "which \"clang-DoNotFindThisOne\$"
|
||||||
|
|
||||||
# Prevent the -nostdinc++ flag to be passed to clang, which causes a compilation error
|
|
||||||
substituteInPlace src/CMakeLists.txt --replace "if(NOT CLR_CMAKE_PLATFORM_DARWIN)" "if(FALSE)"
|
|
||||||
|
|
||||||
patchShebangs build.sh
|
patchShebangs build.sh
|
||||||
patchShebangs src/pal/tools/gen-buildsys-clang.sh
|
patchShebangs src/pal/tools/gen-buildsys-clang.sh
|
||||||
|
|
||||||
|
# See https://github.com/dotnet/coreclr/issues/7573#issuecomment-253081323
|
||||||
|
ed -v ./src/pal/src/include/pal/palinternal.h << EOF
|
||||||
|
/^#undef memcpy
|
||||||
|
-1
|
||||||
|
d
|
||||||
|
+1
|
||||||
|
d
|
||||||
|
w
|
||||||
|
EOF
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = "./build.sh";
|
BuildArch = if stdenv.is64bit then "x64" else "x86";
|
||||||
|
BuildType = if debug then "Debug" else "Release";
|
||||||
|
|
||||||
|
hardeningDisable = [ "strictoverflow" "format" ];
|
||||||
|
NIX_CFLAGS_COMPILE = [ "-Wno-error=unused-result" ];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
./build.sh $BuildArch $BuildType
|
||||||
|
|
||||||
|
# Try to make some sensible hierarchy out of the output
|
||||||
|
pushd bin/Product/Linux.$BuildArch.$BuildType
|
||||||
|
mkdir lib2
|
||||||
|
mv *.so *.so.dbg lib2
|
||||||
|
mv bin lib3
|
||||||
|
mkdir lib4
|
||||||
|
mv Loader lib4
|
||||||
|
mv inc include
|
||||||
|
mv gcinfo include
|
||||||
|
mkdir bin
|
||||||
|
mkdir -p share/doc
|
||||||
|
mv sosdocsunix.txt share/doc
|
||||||
|
for f in * ; do test -f $f && mv -v $f bin; done
|
||||||
|
popd
|
||||||
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
pushd bin/Product/Linux.x64.Debug/
|
mkdir -p $out
|
||||||
mkdir -v -p $out/bin
|
cp -rv bin/Product/Linux.$BuildArch.$BuildType/* $out
|
||||||
cp -v coreconsole corerun crossgen $out/bin
|
|
||||||
cp -rv lib $out
|
|
||||||
cp -v *.so $out/lib
|
|
||||||
cp -rv inc $out/include
|
|
||||||
cp -rv gcinfo $out/include
|
|
||||||
popd
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user