3
0
Fork 0
forked from mirrors/nixpkgs

llvmPackages_10: 10.0.0 -> 10.0.1

This is a purely bugfix release.

See: http://lists.llvm.org/pipermail/release-testers/2020-July/001297.html
This commit is contained in:
Gabor Greif 2020-05-20 07:29:24 +02:00
parent 479db270fb
commit e51d3a0399
12 changed files with 13 additions and 185 deletions

View file

@ -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(

View file

@ -8,7 +8,7 @@ let
pname = "clang";
inherit version;
src = fetch "clang" "08fbxa2a0kr3ni35ckppj0kyvlcyaywrhpqwcdrdy0z900mhcnw8";
src = fetch "clang" "091bvcny2lh32zy8f3m9viayyhb2zannrndni7325rl85cwgr6pr";
unpackPhase = ''
unpackFile $src
@ -36,9 +36,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

View file

@ -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;

View file

@ -5,8 +5,8 @@
}:
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 +14,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; });

View file

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

View file

@ -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;

View file

@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
pname = "libunwind";
inherit version;
src = fetch pname "09n66dl9cc17d81qflj5h1l4garmhvzfi2lhcb7rx00l8z65xp09";
src = fetch pname "09syx66idnm2pr46x2vmk0jn3iwdv0lkd04xy4zjbwmz3vn066bl";
nativeBuildInputs = [ cmake ];

View file

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

View file

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

View file

@ -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)

View file

@ -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)" \

View file

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