Merge remote-tracking branch 'channels/nixos-unstable' into jdk-13

This commit is contained in:
Matt McHenry
2020-03-20 08:21:44 -04:00
1021 changed files with 38226 additions and 19312 deletions

View File

@@ -0,0 +1,38 @@
From 1c6af6c68ba3f49ae9e942844c739e934339d3b9 Mon Sep 17 00:00:00 2001
From: Maximilian Bosch <maximilian@mbosch.me>
Date: Sat, 14 Mar 2020 00:37:31 +0100
Subject: [PATCH] Get rid of git dependency
---
CMakeLists.txt | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4acf703e1..4e9bd60b5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,20 +7,7 @@ IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "Release")
ENDIF()
-FIND_PACKAGE(Git QUIET REQUIRED)
-EXECUTE_PROCESS(COMMAND
- "${GIT_EXECUTABLE}" --git-dir=${CMAKE_CURRENT_SOURCE_DIR}/.git describe --tags
- RESULT_VARIABLE
- GIT_HASH_RESULT
- OUTPUT_VARIABLE
- GIT_HASH
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-IF(${GIT_HASH_RESULT})
- MESSAGE(WARNING "Error running git describe to determine version")
- SET(BINARYEN_VERSION_INFO "(unable to determine version)")
-ELSE()
- SET(BINARYEN_VERSION_INFO "${GIT_HASH}")
-ENDIF()
+SET(BINARYEN_VERSION_INFO "@emscriptenv@")
CONFIGURE_FILE(config.h.in config.h)
OPTION(BUILD_STATIC_LIB "Build as a static library" OFF)
--
2.25.0

View File

@@ -1,12 +1,12 @@
{ stdenv, cmake, python, fetchFromGitHub, emscriptenRev ? null }:
{ stdenv, cmake, python3, fetchFromGitHub, emscriptenRev ? null, substituteAll }:
let
defaultVersion = "89";
defaultVersion = "91";
# Map from git revs to SHA256 hashes
sha256s = {
version_89 = "0rh1dq33ilq54szfgi1ajaiaj7rbylai02rhp9zm9vpwp0rw8mij";
"1.38.28" = "172s7y5f38736ic8ri3mnbdqcrkadd40a26cxcfwbscc53phl11v";
version_91 = "1qsjqnzc5w9ny9v01bxkdvhh4kgbsia01x5vvac72m075v4mpgs4";
"1.39.1" = "0ygm9m5322h4vfpf3j63q32qxk2l26yk62hh7dkb49j51zwl1y3y";
};
in
@@ -29,7 +29,12 @@ stdenv.mkDerivation rec {
inherit rev;
};
nativeBuildInputs = [ cmake python ];
patches = stdenv.lib.optional (emscriptenRev != null) (substituteAll {
src = ./0001-Get-rid-of-git-dependency.patch;
emscriptenv = "1.39.1";
});
nativeBuildInputs = [ cmake python3 ];
meta = with stdenv.lib; {
homepage = https://github.com/WebAssembly/binaryen;

View File

@@ -16,18 +16,28 @@
patches = [];
}))
}:
stdenv.mkDerivation {
let
bin_folder = if stdenv.isDarwin then "darwin" else "linux";
in
stdenv.mkDerivation rec {
inherit src version;
pname = "bs-platform";
BS_RELEASE_BUILD = "true";
# BuckleScript's idiosyncratic build process only builds artifacts required
# for editor-tooling to work when this environment variable is set:
# https://github.com/BuckleScript/bucklescript/blob/7.2.0/scripts/install.js#L225-L227
BS_TRAVIS_CI = "1";
buildInputs = [ nodejs python3 custom-ninja ];
patchPhase = ''
sed -i 's:./configure.py --bootstrap:python3 ./configure.py --bootstrap:' ./scripts/install.js
mkdir -p ./native/${ocaml-version}/bin
ln -sf ${ocaml}/bin/* ./native/${ocaml-version}/bin
rm -f vendor/ninja/snapshot/ninja.linux
cp ${custom-ninja}/bin/ninja vendor/ninja/snapshot/ninja.linux
'';
# avoid building the development version, will break aarch64 build
@@ -41,10 +51,14 @@ stdenv.mkDerivation {
installPhase = ''
mkdir -p $out/bin
cp -rf jscomp lib vendor odoc_gen native $out
cp -rf jscomp lib ${bin_folder} vendor odoc_gen native bsb bsc bsrefmt $out
mkdir $out/lib/ocaml
cp jscomp/runtime/js.* jscomp/runtime/*.cm* $out/lib/ocaml
cp jscomp/others/*.ml jscomp/others/*.mli jscomp/others/*.cm* $out/lib/ocaml
cp jscomp/stdlib-406/*.ml jscomp/stdlib-406/*.mli jscomp/stdlib-406/*.cm* $out/lib/ocaml
cp bsconfig.json package.json $out
ln -s $out/lib/bsb $out/bin/bsb
ln -s $out/lib/bsc $out/bin/bsc
ln -s $out/lib/bsrefmt $out/bin/bsrefmt
ln -s $out/bsb $out/bin/bsb
ln -s $out/bsc $out/bin/bsc
ln -s $out/bsrefmt $out/bin/bsrefmt
'';
}

View File

@@ -2,16 +2,16 @@
let
build-bs-platform = import ./build-bs-platform.nix;
in
(build-bs-platform {
(build-bs-platform rec {
inherit stdenv runCommand fetchFromGitHub ninja nodejs python3;
version = "7.0.1";
version = "7.2.0";
ocaml-version = "4.06.1";
src = fetchFromGitHub {
owner = "BuckleScript";
repo = "bucklescript";
rev = "52770839e293ade2bcf187f2639000ca0a9a1d46";
sha256 = "0s7g2zfhshsilv9zyp0246bypg34d294z27alpwz03ws9608yr7k";
rev = version;
sha256 = "1fsx7gvcp6rbqd0qf5fix02mbbmk9rgm09zbwjrx0lp5cjv3n2s4";
fetchSubmodules = true;
};
}).overrideAttrs (attrs: {

View File

@@ -1,4 +1,4 @@
# This file has been generated by node2nix 1.7.0. Do not edit!
# This file has been generated by node2nix 1.8.0. Do not edit!
{pkgs ? import <nixpkgs> {
inherit system;

File diff suppressed because it is too large Load Diff

View File

@@ -43,7 +43,7 @@ with stdenv.lib;
with builtins;
let majorVersion = "8";
version = "${majorVersion}.3.0";
version = "${majorVersion}.4.0";
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
@@ -77,7 +77,7 @@ stdenv.mkDerivation ({
src = fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
sha256 = "0b3xv411xhlnjmin2979nxcbnidgvzqdf4nbhix99x60dkzavfk4";
sha256 = "1m1d3gfix56w4aq8myazzfffkl8bqcrx4jhhapnjf7qfs596w2p3";
};
inherit patches;

View File

@@ -245,6 +245,12 @@ stdenv.mkDerivation ({
inherit (stdenv) is64bit;
# In this particular combination it stopped creating lib output at all.
# TODO: perhaps find a better fix? (ideally understand what's going on)
postFixup = if crossStageStatic && targetPlatform.isMusl && targetPlatform.is32bit
then ''mkdir "$lib"''
else null;
meta = {
homepage = https://gcc.gnu.org/;
license = stdenv.lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+

View File

@@ -133,7 +133,7 @@ if test "$noSysDirs" = "1"; then
if test "$crossStageStatic" == 1; then
# We don't want the gcc build to assume there will be a libc providing
# limits.h in this stagae
# limits.h in this stage
makeFlagsArray+=(
'LIMITS_H_TEST=false'
)
@@ -203,31 +203,31 @@ postConfigure() {
preInstall() {
# Make lib64 symlinks to lib.
if [ -n "$is64bit" -a -z "$enableMultilib" ]; then
mkdir -p "$out/lib"
ln -s lib "$out/lib64"
mkdir -p "$lib/lib"
ln -s lib "$lib/lib64"
mkdir -p "$out/${targetConfig}/lib"
ln -s lib "$out/${targetConfig}/lib64"
mkdir -p "$lib/${targetConfig}/lib"
ln -s lib "$lib/${targetConfig}/lib64"
fi
}
postInstall() {
# Move runtime libraries to $lib.
moveToOutput "lib/lib*.so*" "$lib"
moveToOutput "lib/lib*.la" "$lib"
moveToOutput "lib/lib*.dylib" "$lib"
moveToOutput "${targetConfig+$targetConfig/}lib/lib*.so*" "$lib"
moveToOutput "${targetConfig+$targetConfig/}lib/lib*.la" "$lib"
moveToOutput "${targetConfig+$targetConfig/}lib/lib*.dylib" "$lib"
moveToOutput "share/gcc-*/python" "$lib"
for i in "$lib"/lib/*.{la,py}; do
for i in "$lib/${targetConfig}"/lib/*.{la,py}; do
substituteInPlace "$i" --replace "$out" "$lib"
done
if [ -n "$enableMultilib" ]; then
moveToOutput "lib64/lib*.so*" "$lib"
moveToOutput "lib64/lib*.la" "$lib"
moveToOutput "lib64/lib*.dylib" "$lib"
moveToOutput "${targetConfig+$targetConfig/}lib64/lib*.so*" "$lib"
moveToOutput "${targetConfig+$targetConfig/}lib64/lib*.la" "$lib"
moveToOutput "${targetConfig+$targetConfig/}lib64/lib*.dylib" "$lib"
for i in "$lib"/lib64/*.{la,py}; do
for i in "$lib/${targetConfig}"/lib64/*.{la,py}; do
substituteInPlace "$i" --replace "$out" "$lib"
done
fi
@@ -247,13 +247,6 @@ postInstall() {
NEW_RPATH=`echo "$PREV_RPATH" | sed 's,:[^:]*bootstrap-tools/lib,,g'`
patchelf --set-rpath "$NEW_RPATH" "$i" && echo OK
done
# For some reason the libs retain RPATH to $out
for i in "$lib"/lib/{libtsan,libasan,libubsan}.so.*.*.*; do
PREV_RPATH=`patchelf --print-rpath "$i"`
NEW_RPATH=`echo "$PREV_RPATH" | sed "s,:${out}[^:]*,,g"`
patchelf --set-rpath "$NEW_RPATH" "$i" && echo OK
done
fi
if type "install_name_tool"; then

View File

@@ -87,7 +87,7 @@ stdenv.mkDerivation (rec {
name = "${targetPrefix}ghc-${version}";
src = fetchurl {
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.xz";
url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
sha256 = "1ch4j2asg7pr52ai1hwzykxyj553wndg7wq93i47ql4fllspf48i";
};

View File

@@ -92,7 +92,7 @@ stdenv.mkDerivation (rec {
name = "${targetPrefix}ghc-${version}";
src = fetchurl {
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.xz";
url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
sha256 = "0qg3zsmbk4rkwkc3jpas3zs74qaxmw4sp4v1mhsbj0a0dzls2jjd";
};
@@ -187,7 +187,7 @@ stdenv.mkDerivation (rec {
strictDeps = true;
# Dont add -liconv to LDFLAGS automatically so that GHC will add it itself.
dontAddExtraLibs = true;
dontAddExtraLibs = true;
nativeBuildInputs = [
perl autoconf automake m4 python3 sphinx

View File

@@ -2,18 +2,18 @@
rustPlatform.buildRustPackage rec {
pname = "gleam";
version = "0.6.0";
version = "0.7.1";
src = fetchFromGitHub {
owner = "gleam-lang";
repo = pname;
rev = "v${version}";
sha256 = "1fvy2j6pw1rwm0rg7555q3qg2069cx2b9lk0nsyc3jxsqp9hbn6i";
sha256 = "1bcxq7bgn0kf1vdw6id8s3izz6mwf3ivr8iph4miig302qm9lmmr";
};
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
cargoSha256 = "1vhra9v4jsy9hyhjrmxjy6rnraxz13h1b7l51xvbai5wxsxm7z8m";
cargoSha256 = "17bvms65frxhw0d196qswh3jjqlriidq3xi3mfjjgfh6n17rh608";
meta = with stdenv.lib; {
description = "A statically typed language for the Erlang VM";

View File

@@ -24,13 +24,13 @@ in
stdenv.mkDerivation rec {
pname = "intel-graphics-compiler";
version = "1.0.3041";
version = "1.0.3151";
src = fetchFromGitHub {
owner = "intel";
repo = "intel-graphics-compiler";
rev = "igc-${version}";
sha256 = "1d3vxq4v8jdjgl5jdm9qpxzgaw98r84dzs9lk9ph02khfkajqhjm";
sha256 = "1c2ll563a2j4sv3r468i4lv158hkzywnyajyk7iyin7bhqhm2vzf";
};
nativeBuildInputs = [ clang cmake bison flex llvm python ];

View File

@@ -1,54 +1,15 @@
{ stdenv, lib, fetchurl, file, glib, libxml2, libav_0_8, ffmpeg, libxslt
, libGL , xorg, alsaLib, fontconfig, freetype, pango, gtk2, cairo
, gdk-pixbuf, atk, zlib }:
# TODO: Investigate building from source instead of patching binaries.
# TODO: Binary patching for not just x86_64-linux but also x86_64-darwin i686-linux
let drv = stdenv.mkDerivation rec {
pname = "jetbrainsjdk";
version = "520.38";
src = if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://bintray.com/jetbrains/intellij-jbr/download_file?file_path=jbrsdk-11_0_5-linux-x64-b${version}.tar.gz";
sha256 = "13hqp9ww9afkl70yrslyyx0z7fqcc8nrcqax69d6jaj587qfjqvz";
}
else if stdenv.hostPlatform.system == "x86_64-darwin" then
fetchurl {
url = "https://bintray.com/jetbrains/intellij-jbr/download_file?file_path=jbrsdk-11_0_5-osx-x64-b${version}.tar.gz";
sha256 = "1qrw4rpyznx7pkcjlfhi889l3a7gydz9yrqp6phz1rszmklpyk07";
}
else
throw "unsupported system: ${stdenv.hostPlatform.system}";
nativeBuildInputs = [ file ];
unpackCmd = "mkdir jdk; pushd jdk; tar -xzf $src; popd";
installPhase = ''
cd ..
mv $sourceRoot/jbrsdk $out
'';
postFixup = lib.optionalString (!stdenv.isDarwin) ''
find $out -type f -perm -0100 \
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "$rpath" {} \;
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
'';
rpath = lib.optionalString (!stdenv.isDarwin) (lib.makeLibraryPath ([
stdenv.cc.cc stdenv.cc.libc glib libxml2 libav_0_8 ffmpeg libxslt libGL
alsaLib fontconfig freetype pango gtk2 cairo gdk-pixbuf atk zlib
(placeholder "out")
] ++ (with xorg; [
libX11 libXext libXtst libXi libXp libXt libXrender libXxf86vm
])) + ":${placeholder "out"}/lib/jli");
passthru.home = drv;
{ stdenv, openjdk12, fetchFromGitHub, jetbrains }:
openjdk12.overrideAttrs (oldAttrs: rec {
pname = "jetbrains-jdk";
version = "11.0.6-b774";
src = fetchFromGitHub {
owner = "JetBrains";
repo = "JetBrainsRuntime";
rev = "jb${stdenv.lib.replaceStrings ["."] ["_"] version}";
sha256 = "0lx3h74jwa14kr8ybwxbzc4jsjj6xnymvckdsrhqhvrciya7bxzw";
};
patches = [];
meta = with stdenv.lib; {
description = "An OpenJDK fork to better support Jetbrains's products.";
longDescription = ''
@@ -64,7 +25,10 @@ let drv = stdenv.mkDerivation rec {
'';
homepage = "https://bintray.com/jetbrains/intellij-jdk/";
license = licenses.gpl2;
maintainers = with maintainers; [ edwtjo ];
platforms = with platforms; [ "x86_64-linux" "x86_64-darwin" ];
maintainers = with maintainers; [ edwtjo petabyteboy ];
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
};
}; in drv
passthru = oldAttrs.passthru // {
home = "${jetbrains.jdk}/lib/openjdk";
};
})

View File

@@ -0,0 +1,18 @@
Compressed diff from
```
git show d21664cce1db8debe2528f36b1fbd2b8af9c9401 87dac7da68ea1e0adac78c59ef1891dcf9632b67 3a0f6e699bb6d96dc62dce6faef20ac26cf103fd
```
with the purpose of avoiding linker errors arising in the polly-flavoured clang.
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index 781c3eb7f2f..dc1413f4b59 100644
--- clang/CMakeLists.txt
+++ clang/CMakeLists.txt
@@ -864,6 +864,7 @@ add_subdirectory(utils/hmaptool)
if(CLANG_BUILT_STANDALONE)
llvm_distribution_add_targets()
+ process_llvm_pass_plugins()
endif()
configure_file(

View File

@@ -1,7 +1,6 @@
{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python3, lld
, fixDarwinDylibNames
, enableManpages ? false
, enablePolly ? false # TODO: get this info from llvm (passthru?)
}:
let
@@ -9,7 +8,7 @@ let
pname = "clang";
inherit version;
src = fetch "clang" "1npwv0j6812q9jar79bb5m2j4lmvp11680in45nlma8czrs52w0v";
src = fetch "clang" "1w7ixr16a9f0g5kv4irvhwq973wn0d418kb0p9rabyfscm05wfmq";
unpackPhase = ''
unpackFile $src
@@ -34,12 +33,12 @@ let
"-DSPHINX_OUTPUT_MAN=ON"
"-DSPHINX_OUTPUT_HTML=OFF"
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
] ++ stdenv.lib.optionals enablePolly [
"-DWITH_POLLY=ON"
"-DLINK_POLLY_INTO_TOOLS=ON"
];
patches = [
# 10.0.0rc3-only
./clang-extension-handling.patch
./purity.patch
# https://reviews.llvm.org/D51899
./compiler-rt-baremetal.patch

View File

@@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
pname = "compiler-rt";
inherit version;
src = fetch pname "11qiass6gbpq3m1srqlk5gm0zcm8j4jk2cmingra237qhaxz8wv9";
src = fetch pname "0qv40mv91630l6f75w9g5y6v97s5shz94n82rms12gcd8mir6qp5";
nativeBuildInputs = [ cmake python3 llvm ];
buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi;

View File

@@ -6,7 +6,7 @@
let
release_version = "10.0.0";
candidate = "rc2";
candidate = "rc3";
version = "10.0.0${candidate}"; # differentiating these is important for rc's
fetch = name: sha256: fetchurl {
@@ -14,7 +14,7 @@ let
inherit sha256;
};
clang-tools-extra_src = fetch "clang-tools-extra" "1yi34b6lspcpig0gnws2ba0shgmrs2jgjb3hp08mm0dg3blzk8ss";
clang-tools-extra_src = fetch "clang-tools-extra" "03669c93wzmbmfpv0pyzb7y4z1xc912l95iqywyx01xgdl1xws0r";
tools = stdenv.lib.makeExtensible (tools: let
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
@@ -39,7 +39,6 @@ let
clang-polly-unwrapped = callPackage ./clang {
inherit clang-tools-extra_src;
llvm = tools.llvm-polly;
enablePolly = true;
};
llvm-manpages = lowPrio (tools.llvm.override {

View File

@@ -5,7 +5,7 @@ stdenv.mkDerivation {
pname = "libc++";
inherit version;
src = fetch "libcxx" "0d83z1dbr6kkwcq72kqpdkvnndjvcjx7w80qlkvqlv7r2zai5kjg";
src = fetch "libcxx" "1cjxiby8nq95g02rgx08iy86pswpi66b9wmxqjiyga1s92nb19j0";
postUnpack = ''
unpackFile ${libcxxabi.src}

View File

@@ -5,7 +5,7 @@ stdenv.mkDerivation {
pname = "libc++abi";
inherit version;
src = fetch "libcxxabi" "001rnpgya6y0vcsy5jqcc7ria666mswbzw4avdps6dgs6caqrfpd";
src = fetch "libcxxabi" "1xs7dr91qzz7lq9am4q3vcj2jf1gx23ar1jbnhn763011hl94vs0";
nativeBuildInputs = [ cmake ];
buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;

View File

@@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
pname = "libunwind";
inherit version;
src = fetch pname "0194s3qqqz4qcrzdfy7c931sm3d9hnjk624gldja85mwz1v1x9a8";
src = fetch pname "1dm7l75ajnjy6kbg2157v2g5gfia3n47fc56ayryyp2jdvbgprwl";
nativeBuildInputs = [ cmake ];

View File

@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
pname = "lld";
inherit version;
src = fetch pname "0z0a1h94hx0wj5289gvp99bvvj2ghid94xj2c5acmh1df8cx1vna";
src = fetch pname "1w9c9xmzbdnkwgal612hqz2lxj9jgqpfzxr2rllcspmf6v7arvf4";
nativeBuildInputs = [ cmake ];
buildInputs = [ llvm libxml2 ];

View File

@@ -20,7 +20,7 @@ stdenv.mkDerivation (rec {
pname = "lldb";
inherit version;
src = fetch pname "0nh26a4mxd54k5f9gpizr55vdalkzym2l82kvfh3lm8lvimypga1";
src = fetch pname "06qzh13cr20wrd5925698yq696bhl68zbvm7kjxp7c2rx5swxmg8";
patches = [ ./lldb-procfs.patch ];

View File

@@ -0,0 +1,146 @@
Compressed diff from
```
git show d21664cce1db8debe2528f36b1fbd2b8af9c9401 87dac7da68ea1e0adac78c59ef1891dcf9632b67 3a0f6e699bb6d96dc62dce6faef20ac26cf103fd
```
with the purpose of avoiding linker errors arising in the polly-flavoured clang.
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index a02c2a5a23f..faf8f561faa 100644
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -1069,6 +1069,7 @@ endif()
# after all targets are created.
include(LLVMDistributionSupport)
llvm_distribution_add_targets()
+process_llvm_pass_plugins(GEN_CONFIG)
# This allows us to deploy the Universal CRT DLLs by passing -DCMAKE_INSTALL_UCRT_LIBRARIES=ON to CMake
if (MSVC AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows" AND CMAKE_INSTALL_UCRT_LIBRARIES)
@@ -1093,5 +1094,3 @@ endif()
if (LLVM_INCLUDE_UTILS AND LLVM_INCLUDE_TOOLS)
add_subdirectory(utils/llvm-locstats)
endif()
-
-process_llvm_pass_plugins()
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index fd69786544a..8fbb33a22fd 100644
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -884,53 +884,71 @@ function(add_llvm_pass_plugin name)
if (TARGET intrinsics_gen)
add_dependencies(obj.${name} intrinsics_gen)
endif()
- message(STATUS "Registering ${name} as a pass plugin (static build: ${LLVM_${name_upper}_LINK_INTO_TOOLS})")
- set_property(GLOBAL APPEND PROPERTY LLVM_COMPILE_EXTENSIONS ${name})
+ set_property(GLOBAL APPEND PROPERTY LLVM_STATIC_EXTENSIONS ${name})
elseif(NOT ARG_NO_MODULE)
add_llvm_library(${name} MODULE ${ARG_UNPARSED_ARGUMENTS})
else()
add_llvm_library(${name} OBJECT ${ARG_UNPARSED_ARGUMENTS})
endif()
+ message(STATUS "Registering ${name} as a pass plugin (static build: ${LLVM_${name_upper}_LINK_INTO_TOOLS})")
endfunction(add_llvm_pass_plugin)
-# Generate X Macro file for extension handling. It provides a
-# HANDLE_EXTENSION(extension_namespace, ExtensionProject) call for each extension
-# allowing client code to define HANDLE_EXTENSION to have a specific code be run for
-# each extension.
+# process_llvm_pass_plugins([GEN_CONFIG])
+#
+# Correctly set lib dependencies between plugins and tools, based on tools
+# registered with the ENABLE_PLUGINS option.
+#
+# if GEN_CONFIG option is set, also generate X Macro file for extension
+# handling. It provides a HANDLE_EXTENSION(extension_namespace, ExtensionProject)
+# call for each extension allowing client code to define
+# HANDLE_EXTENSION to have a specific code be run for each extension.
#
-# Also correctly set lib dependencies between plugins and tools.
function(process_llvm_pass_plugins)
- get_property(LLVM_EXTENSIONS GLOBAL PROPERTY LLVM_COMPILE_EXTENSIONS)
- file(WRITE "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp" "//extension handlers\n")
- foreach(llvm_extension ${LLVM_EXTENSIONS})
- string(TOLOWER ${llvm_extension} llvm_extension_lower)
-
- string(TOUPPER ${llvm_extension} llvm_extension_upper)
- string(SUBSTRING ${llvm_extension_upper} 0 1 llvm_extension_upper_first)
- string(SUBSTRING ${llvm_extension_lower} 1 -1 llvm_extension_lower_tail)
- string(CONCAT llvm_extension_project ${llvm_extension_upper_first} ${llvm_extension_lower_tail})
-
- if(LLVM_${llvm_extension_upper}_LINK_INTO_TOOLS)
- file(APPEND "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp" "HANDLE_EXTENSION(${llvm_extension_project})\n")
-
- get_property(llvm_plugin_targets GLOBAL PROPERTY LLVM_PLUGIN_TARGETS)
- foreach(llvm_plugin_target ${llvm_plugin_targets})
- set_property(TARGET ${llvm_plugin_target} APPEND PROPERTY LINK_LIBRARIES ${llvm_extension})
- set_property(TARGET ${llvm_plugin_target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${llvm_extension})
- endforeach()
- else()
- add_llvm_library(${llvm_extension_lower} MODULE obj.${llvm_extension_lower})
- endif()
+ cmake_parse_arguments(ARG
+ "GEN_CONFIG" "" ""
+ ${ARGN})
+ if(ARG_GEN_CONFIG)
+ get_property(LLVM_STATIC_EXTENSIONS GLOBAL PROPERTY LLVM_STATIC_EXTENSIONS)
+ else()
+ include(LLVMConfigExtensions)
+ endif()
+
+ # Add static plugins to each plugin target.
+ foreach(llvm_extension ${LLVM_STATIC_EXTENSIONS})
+ get_property(llvm_plugin_targets GLOBAL PROPERTY LLVM_PLUGIN_TARGETS)
+ foreach(llvm_plugin_target ${llvm_plugin_targets})
+ set_property(TARGET ${llvm_plugin_target} APPEND PROPERTY LINK_LIBRARIES ${llvm_extension})
+ set_property(TARGET ${llvm_plugin_target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${llvm_extension})
+ endforeach()
endforeach()
- file(APPEND "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp" "#undef HANDLE_EXTENSION\n")
- # only replace if there's an actual change
- execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
- "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp"
- "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def")
- file(REMOVE "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp")
+ # Eventually generate the extension header, and store config to a cmake file
+ # for usage in third-party configuration.
+ if(ARG_GEN_CONFIG)
+ set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
+ set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
+ file(WRITE
+ "${llvm_cmake_builddir}/LLVMConfigExtensions.cmake"
+ "set(LLVM_STATIC_EXTENSIONS ${LLVM_STATIC_EXTENSIONS})")
+ install(FILES
+ ${llvm_cmake_builddir}/LLVMConfigExtensions.cmake
+ DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
+ COMPONENT cmake-exports)
+
+ file(WRITE "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp" "//extension handlers\n")
+ foreach(llvm_extension ${LLVM_STATIC_EXTENSIONS})
+ file(APPEND "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp" "HANDLE_EXTENSION(${llvm_extension})\n")
+ endforeach()
+ file(APPEND "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp" "#undef HANDLE_EXTENSION\n")
+
+ # only replace if there's an actual change
+ execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp"
+ "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def")
+ file(REMOVE "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp")
+ endif()
endfunction()
function(export_executable_symbols target)
diff --git a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt
index 9cf22b436fa..af757d6199a 100644
--- llvm/cmake/modules/CMakeLists.txt
+++ llvm/cmake/modules/CMakeLists.txt
@@ -136,6 +136,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
FILES_MATCHING PATTERN *.cmake
PATTERN .svn EXCLUDE
PATTERN LLVMConfig.cmake EXCLUDE
+ PATTERN LLVMConfigExtensions.cmake EXCLUDE
PATTERN LLVMConfigVersion.cmake EXCLUDE
PATTERN LLVM-Config.cmake EXCLUDE
PATTERN GetHostTriple.cmake EXCLUDE)

View File

@@ -31,8 +31,8 @@ in stdenv.mkDerivation (rec {
pname = "llvm";
inherit version;
src = fetch pname "01azqqygm83s6l1g35kqkc7da06dkc8jxpb4zsd420lmhfhw4gws";
polly_src = fetch "polly" "00nvnh0jhi1s5gcyfnb30h9g2j18z79kipiy878bkawg53f4z2xf";
src = fetch pname "1pa322iwqg071gxdn5wxri263j6aki6ag36xbdzbyi3g8m8v8jci";
polly_src = fetch "polly" "0p9dmv4hxwx4f5k1v4r9b5jp7fbi71ajpmrv3xf3vmp6m4i3r0pc";
unpackPhase = ''
unpackFile $src
@@ -54,6 +54,11 @@ in stdenv.mkDerivation (rec {
propagatedBuildInputs = [ ncurses zlib ];
patches = [
# 10.0.0rc3-only
./llvm-extension-handling.patch
];
postPatch = optionalString stdenv.isDarwin ''
substituteInPlace cmake/modules/AddLLVM.cmake \
--replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \

View File

@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
pname = "openmp";
inherit version;
src = fetch pname "1fpvpsbrrpngm8zplhdbkhnk79mhfdf3xsw1rwcfcv564gilla3w";
src = fetch pname "0axdxar18rvk9r4yx7y55ywqr3070mixag9sg2fcck1jzwfgymjb";
nativeBuildInputs = [ cmake perl ];
buildInputs = [ llvm ];

View File

@@ -3,11 +3,11 @@
stdenv.mkDerivation rec {
pname = "mercury";
version = "14.01.1";
version = "20.01.1";
src = fetchurl {
url = "https://dl.mercurylang.org/release/mercury-srcdist-${version}.tar.gz";
sha256 = "12z8qi3da8q50mcsjsy5bnr4ia6ny5lkxvzy01a3c9blgbgcpxwq";
sha256 = "0vxp9f0jmr228n13p6znhbxncav6ay0bnl4ypy6r3lw5lh7z172p";
};
buildInputs = [ gcc flex bison texinfo jdk erlang makeWrapper

View File

@@ -1,22 +0,0 @@
import ./default.nix {
rustcVersion = "1.38.0";
rustcSha256 = "101dlpsfkq67p0hbwx4acqq6n90dj4bbprndizpgh1kigk566hk4";
enableRustcDev = false;
# Note: the version MUST be one version prior to the version we're
# building
bootstrapVersion = "1.37.0";
# fetch hashes by running `print-hashes.sh 1.37.0`
bootstrapHashes = {
i686-unknown-linux-gnu = "74510e0e52a55e65a9f716673c2cda4d2bd427e2453541c6993c77c3ec04acf9";
x86_64-unknown-linux-gnu = "cb573229bfd32928177c3835fdeb62d52da64806b844bc1095c6225b0665a1cb";
arm-unknown-linux-gnueabihf = "272739fbb23cf6c2040c1813af9c8c7f386cac37d9de638f22a1816eb96bc0ae";
armv7-unknown-linux-gnueabihf = "5b87b877f0ed20c6a09ce26e7a15d8c61b26b62484b97e78a51099d0efefec98";
aarch64-unknown-linux-gnu = "263ef98fa3a6b2911b56f89c06615cdebf6ef676eb9b2493ad1539602f79b6ba";
i686-apple-darwin = "e45d0c4d882fc6c404ffa6fe790294f4ea96384a2b48804adbf723f3635477a8";
x86_64-apple-darwin = "b2310c97ffb964f253c4088c8d29865f876a49da2a45305493af5b5c7a3ca73d";
};
selectRustPackage = pkgs: pkgs.rust_1_38_0;
}

View File

@@ -10,11 +10,11 @@
stdenv.mkDerivation rec {
pname = "sbcl";
version = "2.0.1";
version = "2.0.2";
src = fetchurl {
url = "mirror://sourceforge/project/sbcl/sbcl/${version}/${pname}-${version}-source.tar.bz2";
sha256 = "1s2nrq26czl7f8jpa9qjpmdqbzvldvf4c7c1z1c438v4f85xcl44";
sha256 = "07pyzdjnhcpqwvr3rrk4i18maqdywbq1qj93fnpx1h4b7dp08r28";
};
buildInputs = [texinfo];

View File

@@ -3,16 +3,16 @@
buildGoModule rec {
pname = "tinygo";
version = "0.11.0";
version = "0.12.0";
src = fetchFromGitHub {
owner = "tinygo-org";
repo = "tinygo";
rev = "v${version}";
sha256 = "0cmg8x9hpvzlxp6hiy9hkh9nn7ig7b0x6k8a2c3bw19pfx9lxksf";
sha256 = "0dw3kxf55p617pb0bj3knsqcfvap5scxlvhh3a9g9ia92kann4v1";
};
modSha256 = "0r3lfi1bj550sf3b7ysz62c2c33f8zfli8208xixj3jadycb6r3z";
modSha256 = "1bjq4vaf38hi204lr9w3r3wcy1rzj06ygi5gzfa7dl3kx10hw6p0";
enableParallelBuilding = true;
subPackages = [ "." ];
buildInputs = [ llvm clang-unwrapped makeWrapper ];

View File

@@ -0,0 +1,28 @@
{ lib, rustPlatform, fetchFromGitHub, makeWrapper, z3 }:
rustPlatform.buildRustPackage rec {
pname = "zz-unstable";
version = "2020-03-02";
src = fetchFromGitHub {
owner = "aep";
repo = "zz";
rev = "2dd92b959f7c34bf99af84b263e3864a5c41a0fe";
sha256 = "14ch5qgga2vpxvb53v4v4y6cwy3kkm10x1vbfpyfa7im57syib85";
};
nativeBuildInputs = [ makeWrapper ];
cargoSha256 = "1m9az3adbkx2ab6fkg64cr7f9d73jbx8kx2pmgpw29csmh9hzqjy";
postInstall = ''
wrapProgram $out/bin/zz --prefix PATH ":" "${lib.getBin z3}/bin"
'';
meta = with lib; {
description = "🍺🐙 ZetZ a zymbolic verifier and tranzpiler to bare metal C";
homepage = "https://github.com/aep/zz";
license = licenses.mit;
maintainers = [ maintainers.marsam ];
};
}