aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/compilers/llvm/10
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/llvm/10')
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/bintools.nix14
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/clang/clang-extension-handling.patch18
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/clang/default.nix8
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt.nix4
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/default.nix47
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/libc++/default.nix11
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/libc++/setup-hook.sh6
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/libc++abi.nix2
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/libunwind.nix2
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/lld.nix2
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/lldb.nix2
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/llvm-extension-handling.patch146
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/llvm.nix10
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/openmp.nix2
14 files changed, 48 insertions, 226 deletions
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/bintools.nix b/nixpkgs/pkgs/development/compilers/llvm/10/bintools.nix
index 72a2a733193..53f7941e336 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/10/bintools.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/bintools.nix
@@ -11,9 +11,19 @@ in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
ln -s $prog $out/bin/${prefix}$(basename $prog)
done
for prog in ${llvm}/bin/*; do
- ln -s $prog $out/bin/${prefix}$(echo $(basename $prog) | sed -e "s|llvm-||")
ln -sf $prog $out/bin/${prefix}$(basename $prog)
done
- rm -f $out/bin/${prefix}cat
+
+ ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ar
+ ln -s ${llvm}/bin/llvm-as $out/bin/${prefix}as
+ ln -s ${llvm}/bin/llvm-dwp $out/bin/${prefix}dwp
+ ln -s ${llvm}/bin/llvm-nm $out/bin/${prefix}nm
+ ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}objcopy
+ ln -s ${llvm}/bin/llvm-objdump $out/bin/${prefix}objdump
+ ln -s ${llvm}/bin/llvm-ranlib $out/bin/${prefix}ranlib
+ ln -s ${llvm}/bin/llvm-readelf $out/bin/${prefix}readelf
+ ln -s ${llvm}/bin/llvm-size $out/bin/${prefix}size
+ ln -s ${llvm}/bin/llvm-strip $out/bin/${prefix}strip
+
ln -s ${lld}/bin/lld $out/bin/${prefix}ld
''
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/clang/clang-extension-handling.patch b/nixpkgs/pkgs/development/compilers/llvm/10/clang/clang-extension-handling.patch
deleted file mode 100644
index a74d10989ff..00000000000
--- a/nixpkgs/pkgs/development/compilers/llvm/10/clang/clang-extension-handling.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-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(
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/10/clang/default.nix
index 10026ca4eb1..a3d6e7e402a 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/10/clang/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/clang/default.nix
@@ -8,7 +8,7 @@ let
pname = "clang";
inherit version;
- src = fetch "clang" "08fbxa2a0kr3ni35ckppj0kyvlcyaywrhpqwcdrdy0z900mhcnw8";
+ src = fetch "clang" "091bvcny2lh32zy8f3m9viayyhb2zannrndni7325rl85cwgr6pr";
unpackPhase = ''
unpackFile $src
@@ -27,6 +27,7 @@ let
cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++14"
"-DCLANGD_BUILD_XPC=OFF"
+ "-DLLVM_ENABLE_RTTI=ON"
] ++ stdenv.lib.optionals enableManpages [
"-DCLANG_INCLUDE_DOCS=ON"
"-DLLVM_ENABLE_SPHINX=ON"
@@ -36,9 +37,6 @@ let
];
patches = [
- # 10.0.0 only, this should be present in 10.0.1
- ./clang-extension-handling.patch
-
./purity.patch
# https://reviews.llvm.org/D51899
./compiler-rt-baremetal.patch
@@ -89,8 +87,6 @@ let
passthru = {
isClang = true;
inherit llvm;
- } // stdenv.lib.optionalAttrs (stdenv.targetPlatform.isLinux || (stdenv.cc.isGNU && stdenv.cc.cc ? gcc)) {
- gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
};
meta = {
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt.nix b/nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt.nix
index 68f64ef4256..47bbe808ac2 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt.nix
@@ -11,7 +11,7 @@ in
stdenv.mkDerivation rec {
pname = "compiler-rt";
inherit version;
- src = fetch pname "0x9c531k6ww21s2mkdwqx1vbdjmx6d4wmfb8gdbj0wqa796sczba";
+ src = fetch pname "1yjqjri753w0fzmxcyz687nvd97sbc9rsqrxzpq720na47hwh3fr";
nativeBuildInputs = [ cmake python3 llvm ];
buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
@@ -57,7 +57,7 @@ stdenv.mkDerivation rec {
# can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd
# get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by
# a flag and turn the flag off during the stdenv build.
- postPatch = ''
+ postPatch = stdenv.lib.optionalString (!stdenv.isDarwin) ''
substituteInPlace cmake/builtin-config-ix.cmake \
--replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
'' + stdenv.lib.optionalString stdenv.isDarwin ''
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/default.nix b/nixpkgs/pkgs/development/compilers/llvm/10/default.nix
index 4181ab29bd7..37ab89a5a31 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/10/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/default.nix
@@ -1,12 +1,13 @@
-{ lowPrio, newScope, pkgs, stdenv, cmake, gcc, libstdcxxHook
+{ lowPrio, newScope, pkgs, stdenv, cmake, gccForLibs
, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
+, buildPackages
, buildLlvmTools # tools, but from the previous stage, for cross
, targetLlvmLibraries # libraries, but from the next stage, for cross
}:
let
- release_version = "10.0.0";
- version = release_version; # differentiating these (variables) is important for rc's
+ release_version = "10.0.1";
+ version = release_version; # differentiating these (variables) is important for RCs
targetConfig = stdenv.targetPlatform.config;
fetch = name: sha256: fetchurl {
@@ -14,7 +15,7 @@ let
inherit sha256;
};
- clang-tools-extra_src = fetch "clang-tools-extra" "074ija5s2jsdn0k035r2dzmryjmqxdnyg4xwvaqych2bazv8rpxc";
+ clang-tools-extra_src = fetch "clang-tools-extra" "06n1yp638rh24xdxv9v2df0qajxbjz4w59b7dd4ky36drwmpi4yh";
tools = stdenv.lib.makeExtensible (tools: let
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
@@ -24,8 +25,8 @@ let
ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc"
ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
- '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) ''
- echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags
+ '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && !(stdenv.targetPlatform.useLLVM or false)) ''
+ echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags
'';
in {
@@ -36,20 +37,22 @@ let
inherit clang-tools-extra_src;
};
- llvm-manpages = lowPrio (tools.llvm.override {
- enableManpages = true;
- python3 = pkgs.python3; # don't use python-boot
- });
+ # disabled until recommonmark supports sphinx 3
+ #Llvm-manpages = lowPrio (tools.llvm.override {
+ # enableManpages = true;
+ # python3 = pkgs.python3; # don't use python-boot
+ #});
clang-manpages = lowPrio (tools.clang-unwrapped.override {
enableManpages = true;
python3 = pkgs.python3; # don't use python-boot
});
- lldb-manpages = lowPrio (tools.lldb.override {
- enableManpages = true;
- python3 = pkgs.python3; # don't use python-boot
- });
+ # disabled until recommonmark supports sphinx 3
+ # lldb-manpages = lowPrio (tools.lldb.override {
+ # enableManpages = true;
+ # python3 = pkgs.python3; # don't use python-boot
+ # });
libclang = tools.clang-unwrapped.lib;
@@ -57,23 +60,18 @@ let
libstdcxxClang = wrapCCWith rec {
cc = tools.clang-unwrapped;
+ # libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper.
+ libcxx = null;
extraPackages = [
- libstdcxxHook
targetLlvmLibraries.compiler-rt
];
- extraBuildCommands = ''
- echo "-target ${targetConfig}" >> $out/nix-support/cc-cflags
- echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-cflags
- echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags
- echo "-L${gcc.cc.lib}/${targetConfig}/lib" >> $out/nix-support/cc-ldflags
- '' + mkExtraBuildCommands cc;
+ extraBuildCommands = mkExtraBuildCommands cc;
};
libcxxClang = wrapCCWith rec {
cc = tools.clang-unwrapped;
libcxx = targetLlvmLibraries.libcxx;
extraPackages = [
- targetLlvmLibraries.libcxx
targetLlvmLibraries.libcxxabi
targetLlvmLibraries.compiler-rt
];
@@ -100,14 +98,12 @@ let
inherit (tools) bintools;
};
extraPackages = [
- targetLlvmLibraries.libcxx
targetLlvmLibraries.libcxxabi
targetLlvmLibraries.compiler-rt
] ++ stdenv.lib.optionals (!stdenv.targetPlatform.isWasm) [
targetLlvmLibraries.libunwind
];
extraBuildCommands = ''
- echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
echo "-rtlib=compiler-rt -Wno-unused-command-line-argument" >> $out/nix-support/cc-cflags
echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
'' + stdenv.lib.optionalString (!stdenv.targetPlatform.isWasm) ''
@@ -127,7 +123,6 @@ let
targetLlvmLibraries.compiler-rt
];
extraBuildCommands = ''
- echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags
echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
echo "-nostdlib++" >> $out/nix-support/cc-cflags
@@ -145,7 +140,6 @@ let
targetLlvmLibraries.compiler-rt
];
extraBuildCommands = ''
- echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags
echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
'' + mkExtraBuildCommands cc;
@@ -161,7 +155,6 @@ let
extraPackages = [ ];
extraBuildCommands = ''
echo "-nostartfiles" >> $out/nix-support/cc-cflags
- echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
'';
};
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/libc++/default.nix b/nixpkgs/pkgs/development/compilers/llvm/10/libc++/default.nix
index ed76ce77a8b..651f1887553 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/10/libc++/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/libc++/default.nix
@@ -5,7 +5,7 @@ stdenv.mkDerivation {
pname = "libc++";
inherit version;
- src = fetch "libcxx" "1isnj78diknh0nvd73mlq8p8g209f9bab2mbysq826bg2wzql3r7";
+ src = fetch "libcxx" "0v78bfr6h2zifvdqnj2wlfk4pvxzrqn3hg1v6lqk3y12bx9p9xny";
postUnpack = ''
unpackFile ${libcxxabi.src}
@@ -39,12 +39,9 @@ stdenv.mkDerivation {
enableParallelBuilding = true;
- linkCxxAbi = stdenv.isLinux;
-
- setupHooks = [
- ../../../../../build-support/setup-hooks/role.bash
- ./setup-hook.sh
- ];
+ passthru = {
+ isLLVM = true;
+ };
meta = {
homepage = "https://libcxx.llvm.org/";
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/libc++/setup-hook.sh b/nixpkgs/pkgs/development/compilers/llvm/10/libc++/setup-hook.sh
deleted file mode 100644
index 6611259165a..00000000000
--- a/nixpkgs/pkgs/development/compilers/llvm/10/libc++/setup-hook.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-# See pkgs/build-support/setup-hooks/role.bash
-getHostRole
-
-linkCxxAbi="@linkCxxAbi@"
-export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
-export NIX_${role_pre}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/libc++abi.nix b/nixpkgs/pkgs/development/compilers/llvm/10/libc++abi.nix
index ab45f27d24f..00371b862ad 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/10/libc++abi.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/libc++abi.nix
@@ -5,7 +5,7 @@ stdenv.mkDerivation {
pname = "libc++abi";
inherit version;
- src = fetch "libcxxabi" "1q8lrbh68a9v4lr88b8xsjpmwx5z96sa5wnkb92xx7ccm1ssq6z7";
+ src = fetch "libcxxabi" "0yqs722y76cwvmfsq0lb917r9m3fci7bf5z3yzl71yz9n88ghzm9";
nativeBuildInputs = [ cmake ];
buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/libunwind.nix b/nixpkgs/pkgs/development/compilers/llvm/10/libunwind.nix
index 4e55b28c243..b13bacb3638 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/10/libunwind.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/libunwind.nix
@@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
pname = "libunwind";
inherit version;
- src = fetch pname "09n66dl9cc17d81qflj5h1l4garmhvzfi2lhcb7rx00l8z65xp09";
+ src = fetch pname "09syx66idnm2pr46x2vmk0jn3iwdv0lkd04xy4zjbwmz3vn066bl";
nativeBuildInputs = [ cmake ];
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/lld.nix b/nixpkgs/pkgs/development/compilers/llvm/10/lld.nix
index 6a0032de2ac..5d513462820 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/10/lld.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/lld.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
pname = "lld";
inherit version;
- src = fetch pname "026pwcbczcg0j5c9h7hxxrn3ki81ia9m9sfn0sy0bvzffv2xg85r";
+ src = fetch pname "0ynzi35r4fckvp6842alpd43qr810j3728yfslc66fk2mbh4j52r";
nativeBuildInputs = [ cmake ];
buildInputs = [ llvm libxml2 ];
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/lldb.nix b/nixpkgs/pkgs/development/compilers/llvm/10/lldb.nix
index 90716f67f83..47215caa53e 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/10/lldb.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/lldb.nix
@@ -20,7 +20,7 @@ stdenv.mkDerivation (rec {
pname = "lldb";
inherit version;
- src = fetch pname "0ddikvc0kbqlqvsypsm9nhfwmyw4prp4rv49f0bgacyh5ssgq7yx";
+ src = fetch pname "051p5b04y6z3g730rmc2n2v71lipbw7k69riww3a6sl74myfiaq7";
patches = [ ./lldb-procfs.patch ];
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/llvm-extension-handling.patch b/nixpkgs/pkgs/development/compilers/llvm/10/llvm-extension-handling.patch
deleted file mode 100644
index cf4b1eaacf7..00000000000
--- a/nixpkgs/pkgs/development/compilers/llvm/10/llvm-extension-handling.patch
+++ /dev/null
@@ -1,146 +0,0 @@
-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)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/llvm.nix b/nixpkgs/pkgs/development/compilers/llvm/10/llvm.nix
index dd0728b40c9..7394d4033d2 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/10/llvm.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/llvm.nix
@@ -32,8 +32,8 @@ in stdenv.mkDerivation (rec {
pname = "llvm";
inherit version;
- src = fetch pname "1pwgm6cr0xr5a0hrbqs1zvsvvjvy0yq1y47c96804wcs795s90yz";
- polly_src = fetch "polly" "15sd3dq0w60jsb76pis09lkagj5iy43h9hg4kd9gx5l8cbnsdyrm";
+ src = fetch pname "1wydhbp9kyjp5y0rc627imxgkgqiv3dfirbqil9dgpnbaw5y7n65";
+ polly_src = fetch "polly" "0nm2d8niz47yjsa3r17v3p13b70igkd338ib8191znr1dfw0pyyj";
unpackPhase = ''
unpackFile $src
@@ -55,11 +55,6 @@ 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)" \
@@ -86,6 +81,7 @@ in stdenv.mkDerivation (rec {
rm test/DebugInfo/X86/convert-debugloc.ll
rm test/DebugInfo/X86/convert-inlined.ll
rm test/DebugInfo/X86/convert-linked.ll
+ rm test/DebugInfo/X86/debug_addr.ll
rm test/tools/dsymutil/X86/op-convert.test
'' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") ''
# Seems to require certain floating point hardware (NEON?)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/openmp.nix b/nixpkgs/pkgs/development/compilers/llvm/10/openmp.nix
index 624c99bc868..0927448d2b4 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/10/openmp.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/openmp.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
pname = "openmp";
inherit version;
- src = fetch pname "1ymd13gj07x0b0vxziygm0p41vrq6nsgx837jqg9ll6h8ndg57rv";
+ src = fetch pname "0i4bn84lkpm5w3qkpvwm5z6jdj8fynp7d3bcasa1xyq4is6757yi";
nativeBuildInputs = [ cmake perl ];
buildInputs = [ llvm ];