lol
fork

Configure Feed

Select the types of activity you want to include in your feed.

llvmPackages_git: update to 19.0.0-unstable-2024-03-16

+37 -166
-3
pkgs/development/compilers/llvm/git/clang/default.nix
··· 70 70 postInstall = '' 71 71 ln -sv $out/bin/clang $out/bin/cpp 72 72 73 - mkdir -p $lib/lib/clang 74 - mv $lib/lib/${lib.versions.major version} $lib/lib/clang/${lib.versions.major version} 75 - 76 73 # Move libclang to 'lib' output 77 74 moveToOutput "lib/libclang.*" "$lib" 78 75 moveToOutput "lib/libclang-cpp.*" "$lib"
+1 -28
pkgs/development/compilers/llvm/git/clang/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index f7936d72e088..a362fa49b534 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -31,7 +31,21 @@ if(CLANG_BUILT_STANDALONE) 6 - find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}") 7 - list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}") 8 - 9 - - # Turn into CACHE PATHs for overwritting 10 - + # We can't check LLVM_CONFIG here, because find_package(LLVM ...) also sets 11 - + # LLVM_CONFIG. 12 - + if (NOT LLVM_CONFIG_FOUND) 13 - + # Pull values from LLVMConfig.cmake. We can drop this once the llvm-config 14 - + # path is removed. 15 - + set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS}) 16 - + set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}") 17 - + # N.B. this is just a default value, the CACHE PATHs below can be overriden. 18 - + set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm") 19 - + set(TOOLS_BINARY_DIR "${LLVM_TOOLS_BINARY_DIR}") 20 - + set(LIBRARY_DIR "${LLVM_LIBRARY_DIR}") 21 - + else() 22 - + set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}") 23 - + endif() 24 - + 25 - set(LLVM_INCLUDE_DIRS ${LLVM_INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed") 26 - set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}" CACHE PATH "Path to LLVM build tree") 27 - set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree") 28 1 diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake 29 2 index 75b0080f6715..c895b884cd27 100644 30 3 --- a/cmake/modules/AddClang.cmake ··· 48 21 add_header_target("utility-resource-headers" ${utility_files}) 49 22 50 23 get_clang_resource_dir(header_install_dir SUBDIR include) 51 - +set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${CLANG_VERSION_MAJOR}/include) 24 + +set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION_MAJOR}/include) 52 25 53 26 ############################################################# 54 27 # Install rules for the catch-all clang-resource-headers target
+2 -3
pkgs/development/compilers/llvm/git/compiler-rt/default.nix
··· 87 87 88 88 patches = [ 89 89 ./X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config 90 - ./gnu-install-dirs.patch 91 90 # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the 92 91 # extra `/`. 93 92 ./normalize-var.patch 94 - # Prevent a compilation error on darwin 95 - ./darwin-targetconditionals.patch 96 93 # See: https://github.com/NixOS/nixpkgs/pull/186575 97 94 ../../common/compiler-rt/darwin-plistbuddy-workaround.patch 98 95 # See: https://github.com/NixOS/nixpkgs/pull/194634#discussion_r999829893 ··· 111 108 substituteInPlace cmake/config-ix.cmake \ 112 109 --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' 113 110 '' + lib.optionalString (useLLVM && !haveLibc) '' 111 + substituteInPlace lib/builtins/aarch64/sme-libc-routines.c \ 112 + --replace "<stdlib.h>" "<stddef.h>" 114 113 substituteInPlace lib/builtins/int_util.c \ 115 114 --replace "#include <stdlib.h>" "" 116 115 substituteInPlace lib/builtins/clear_cache.c \
-20
pkgs/development/compilers/llvm/git/compiler-rt/gnu-install-dirs.patch
··· 1 - diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake 2 - index 8a6219568b3f..30ee68a47ccf 100644 3 - --- a/cmake/base-config-ix.cmake 4 - +++ b/cmake/base-config-ix.cmake 5 - @@ -100,13 +100,13 @@ endif() 6 - if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) 7 - set(COMPILER_RT_OUTPUT_LIBRARY_DIR 8 - ${COMPILER_RT_OUTPUT_DIR}/lib) 9 - - extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" lib) 10 - + extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}") 11 - set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH 12 - "Path where built compiler-rt libraries should be installed.") 13 - else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) 14 - set(COMPILER_RT_OUTPUT_LIBRARY_DIR 15 - ${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR}) 16 - - extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "lib/${COMPILER_RT_OS_DIR}") 17 - + extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}/${COMPILER_RT_OS_DIR}") 18 - set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH 19 - "Path where built compiler-rt libraries should be installed.") 20 - endif()
+8 -3
pkgs/development/compilers/llvm/git/default.nix
··· 17 17 else pkgs.bintools 18 18 , darwin 19 19 # LLVM release information; specify one of these but not both: 20 - , gitRelease ? null 20 + , gitRelease ? { 21 + version = "19.0.0-git"; 22 + rev = "65058a8d732c3c41664a4dad1a1ae2a504d5c98e"; 23 + rev-version = "19.0.0-unstable-2024-03-16"; 24 + sha256 = "sha256-xV33kx/8OZ2KLtaz25RmudDrlIX7nScauTykf87jyTE="; 25 + } 21 26 # i.e.: 22 27 # { 23 28 # version = /* i.e. "15.0.0" */; 24 29 # rev = /* commit SHA */; 25 - # rev-version = /* human readable version; i.e. "unstable-2022-26-07" */; 30 + # rev-version = /* human readable version; i.e. "15.0.0-unstable-2022-07-26" */; 26 31 # sha256 = /* checksum for this release, can omit if specifying your own `monorepoSrc` */; 27 32 # } 28 - , officialRelease ? { version = "18.1.0-rc4"; sha256 = "sha256-fVpwewbjoPMPslIEZ+WAtaQ+YKc0XWGl8EbP/TbQb8o="; } 33 + , officialRelease ? null 29 34 # i.e.: 30 35 # { 31 36 # version = /* i.e. "15.0.0" */;
+5 -17
pkgs/development/compilers/llvm/git/libcxx/default.nix
··· 1 1 { lib, stdenv, llvm_meta 2 - , monorepoSrc, runCommand, fetchpatch 2 + , monorepoSrc, runCommand 3 3 , cmake, lndir, ninja, python3, fixDarwinDylibNames, version 4 4 , cxxabi ? if stdenv.hostPlatform.isFreeBSD then libcxxrt else null 5 5 , libcxxrt, libunwind ··· 19 19 # Note: useLLVM is likely false for Darwin but true under pkgsLLVM 20 20 useLLVM = stdenv.hostPlatform.useLLVM or false; 21 21 22 - cxxabiCMakeFlags = lib.optionals (useLLVM && !stdenv.hostPlatform.isWasm) [ 23 - "-DLIBCXXABI_USE_COMPILER_RT=ON" 24 - "-DLIBCXXABI_USE_LLVM_UNWINDER=ON" 25 - ] ++ lib.optionals (lib.versionAtLeast version "18" && !(useLLVM && !stdenv.hostPlatform.isWasm)) [ 22 + cxxabiCMakeFlags = [ 26 23 "-DLIBCXXABI_USE_LLVM_UNWINDER=OFF" 24 + ] ++ lib.optionals (useLLVM && !stdenv.hostPlatform.isWasm) [ 25 + "-DLIBCXXABI_ADDITIONAL_LIBRARIES=unwind" 26 + "-DLIBCXXABI_USE_COMPILER_RT=ON" 27 27 ] ++ lib.optionals stdenv.hostPlatform.isWasm [ 28 28 "-DLIBCXXABI_ENABLE_THREADS=OFF" 29 29 "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF" ··· 87 87 patches = lib.optionals (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13") [ 88 88 # https://github.com/llvm/llvm-project/issues/64226 89 89 ./0001-darwin-10.12-mbstate_t-fix.patch 90 - ] ++ lib.optionals (cxxabi == null && lib.versionAtLeast version "18") [ 91 - # Allow building libcxxabi alone when using LLVM unwinder 92 - (fetchpatch { 93 - url = "https://github.com/llvm/llvm-project/commit/77610dd10454e87bb387040d2b51100a17ac5755.patch"; 94 - revert = true; 95 - hash = "sha256-jFbC3vBY3nKfjknJ7UzaPyoy0iSYdD3+jUmOFeOaVcA="; 96 - }) 97 - (fetchpatch { 98 - url = "https://github.com/llvm/llvm-project/commit/48e5b5ea92674ded69b998cf35724d9012c0f57d.patch"; 99 - revert = true; 100 - hash = "sha256-WN63L4T3GxVozPZb6kx21AgNe4rwwSUOeeryIGsvQYY="; 101 - }) 102 90 ]; 103 91 104 92 postPatch = ''
-9
pkgs/development/compilers/llvm/git/libunwind/default.nix
··· 27 27 28 28 sourceRoot = "${src.name}/runtimes"; 29 29 30 - prePatch = '' 31 - cd ../${pname} 32 - chmod -R u+w . 33 - ''; 34 - 35 - postPatch = '' 36 - cd ../runtimes 37 - ''; 38 - 39 30 postInstall = lib.optionalString (enableShared && !stdenv.hostPlatform.isDarwin) '' 40 31 # libcxxabi wants to link to libunwind_shared.so (?). 41 32 ln -s $out/lib/libunwind.so $out/lib/libunwind_shared.so
+3 -3
pkgs/development/compilers/llvm/git/lld/default.nix
··· 24 24 25 25 sourceRoot = "${src.name}/${pname}"; 26 26 27 + nativeBuildInputs = [ cmake ninja ]; 28 + buildInputs = [ libllvm libxml2 ]; 29 + 27 30 patches = [ 28 31 ./gnu-install-dirs.patch 29 32 ]; 30 - 31 - nativeBuildInputs = [ cmake ninja ]; 32 - buildInputs = [ libllvm libxml2 ]; 33 33 34 34 cmakeFlags = [ 35 35 "-DLLD_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/lld"
-31
pkgs/development/compilers/llvm/git/lld/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index 3d6225646fe6..9b5d0b15af13 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -33,10 +33,22 @@ if(LLD_BUILT_STANDALONE) 6 - find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}") 7 - list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}") 8 - 9 - - # Turn into CACHE PATHs for overwriting 10 - - set(LLVM_INCLUDE_DIRS ${LLVM_INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed") 11 - - set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}" CACHE PATH "Path to LLVM build tree") 12 - - set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree") 13 - + # We can't check LLVM_CONFIG here, because find_package(LLVM ...) also sets 14 - + # LLVM_CONFIG. 15 - + if (NOT LLVM_CONFIG_FOUND) 16 - + # Pull values from LLVMConfig.cmake. We can drop this once the llvm-config 17 - + # path is removed. 18 - + set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS}) 19 - + set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}") 20 - + # N.B. this is just a default value, the CACHE PATHs below can be overridden. 21 - + set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm") 22 - + else() 23 - + set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}") 24 - + endif() 25 - + 26 - + set(LLVM_INCLUDE_DIRS ${INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed") 27 - + set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree") 28 - + set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree") 29 - 30 - find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR} 31 - NO_DEFAULT_PATH) 32 1 diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake 33 2 index d3924f7243d4..42a7cd62281c 100644 34 3 --- a/cmake/modules/AddLLD.cmake
+4 -1
pkgs/development/compilers/llvm/git/llvm/default.nix
··· 179 179 substituteInPlace test/ExecutionEngine/Interpreter/intrinsics.ll \ 180 180 --replace "%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)" "" \ 181 181 --replace "%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)" "" 182 + 183 + # fails when run in sandbox 184 + substituteInPlace unittests/Support/VirtualFileSystemTest.cpp \ 185 + --replace "PhysicalFileSystemWorkingDirFailure" "DISABLED_PhysicalFileSystemWorkingDirFailure" 182 186 '' + optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86) '' 183 187 # This test fails on darwin x86_64 because `sw_vers` reports a different 184 188 # macOS version than what LLVM finds by reading ··· 382 386 --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "'"$lib"'")' 383 387 '' 384 388 + optionalString (stdenv.isDarwin && enableSharedLibraries) '' 385 - ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib 386 389 ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib 387 390 '' 388 391 + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+3 -9
pkgs/development/compilers/llvm/git/llvm/gnu-install-dirs-polly.patch
··· 1 - This is the one remaining Polly install dirs related change that hasn't made it 2 - into upstream yet; previously this patch file also included: 3 - https://reviews.llvm.org/D117541 4 - 5 - diff --git a/tools/polly/cmake/polly_macros.cmake b/tools/polly/cmake/polly_macros.cmake 6 - index 518a09b45a42..bd9d6f5542ad 100644 7 - --- a/tools/polly/cmake/polly_macros.cmake 8 - +++ b/tools/polly/cmake/polly_macros.cmake 9 - @@ -45,8 +45,8 @@ macro(add_polly_library name) 1 + --- a/tools/polly/cmake/polly_macros.cmake 2024-03-15 17:36:20.550893344 -0700 2 + +++ b/tools/polly/cmake/polly_macros.cmake 2024-03-15 17:37:06.277332960 -0700 3 + @@ -45,8 +45,8 @@ 10 4 install(TARGETS ${name} 11 5 COMPONENT ${name} 12 6 EXPORT LLVMExports
+5 -5
pkgs/development/compilers/llvm/git/llvm/gnu-install-dirs.patch
··· 40 40 if (APPLE) 41 41 set(_install_name_dir INSTALL_NAME_DIR "@rpath") 42 42 - set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 43 - + set(_install_rpath "@loader_path/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 43 + + set(_install_rpath ${extra_libdir}) 44 44 elseif(${CMAKE_SYSTEM_NAME} MATCHES "AIX" AND BUILD_SHARED_LIBS) 45 45 # $ORIGIN is not interpreted at link time by aix ld. 46 46 # Since BUILD_SHARED_LIBS is only recommended for use by developers, ··· 72 72 + # As noted in the differential above, an alternative solution is to have 73 73 + # all rdeps of nixpkgs' LLVM (that use the AddLLVM.cmake machinery) set 74 74 + # `CMAKE_INSTALL_RPATH`. 75 - + set(_build_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 76 - + set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 75 + + set(_build_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 76 + + set(_install_rpath ${extra_libdir}) 77 77 if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)") 78 78 set_property(TARGET ${name} APPEND_STRING PROPERTY 79 79 LINK_FLAGS " -Wl,-z,origin ") ··· 86 86 87 87 if( APPLE ) 88 88 - set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}") 89 - + set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}") 89 + + set(ocaml_rpath ${LLVM_LIBRARY_DIR}) 90 90 elseif( UNIX ) 91 91 - set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}") 92 - + set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}") 92 + + set(ocaml_rpath ${LLVM_LIBRARY_DIR}) 93 93 endif() 94 94 list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}") 95 95
+6 -11
pkgs/development/compilers/llvm/git/llvm/lit-shell-script-runner-set-dyld-library-path.patch
··· 1 - diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py 2 - index 0242e0b75af3..d732011306f7 100644 3 - --- a/utils/lit/lit/TestRunner.py 4 - +++ b/utils/lit/lit/TestRunner.py 5 - @@ -1029,6 +1029,12 @@ def executeScript(test, litConfig, tmpBase, commands, cwd): 6 - f.write('@echo off\n') 7 - f.write('\n@if %ERRORLEVEL% NEQ 0 EXIT\n'.join(commands)) 1 + --- a/utils/lit/lit/TestRunner.py 2024-03-15 17:27:53.170780798 -0700 2 + +++ b/utils/lit/lit/TestRunner.py 2024-03-15 17:28:43.277447791 -0700 3 + @@ -1183,6 +1183,9 @@ 4 + f.write("@echo on\n") 5 + f.write("\n@if %ERRORLEVEL% NEQ 0 EXIT\n".join(commands)) 8 6 else: 9 - + # This env var is *purged* when invoking subprocesses so we have to 10 - + # manually set it from within the bash script in order for the commands 11 - + # in run lines to see this var: 12 7 + if "DYLD_LIBRARY_PATH" in test.config.environment: 13 8 + f.write(f'export DYLD_LIBRARY_PATH="{test.config.environment["DYLD_LIBRARY_PATH"]}"\n') 14 9 + 15 10 for i, ln in enumerate(commands): 16 - match = re.match(kPdbgRegex, ln) 11 + match = re.fullmatch(kPdbgRegex, ln) 17 12 if match:
-1
pkgs/development/compilers/llvm/git/openmp/default.nix
··· 29 29 30 30 patches = [ 31 31 ./fix-find-tool.patch 32 - ./gnu-install-dirs.patch 33 32 ./run-lit-directly.patch 34 33 ]; 35 34
-22
pkgs/development/compilers/llvm/git/openmp/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index b6ddbe90516d..311ab1d50e7f 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -29,7 +29,7 @@ if (OPENMP_STANDALONE_BUILD) 6 - set(OPENMP_LIBDIR_SUFFIX "" CACHE STRING 7 - "Suffix of lib installation directory, e.g. 64 => lib64") 8 - # Do not use OPENMP_LIBDIR_SUFFIX directly, use OPENMP_INSTALL_LIBDIR. 9 - - set(OPENMP_INSTALL_LIBDIR "lib${OPENMP_LIBDIR_SUFFIX}" CACHE STRING 10 - + set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${OPENMP_LIBDIR_SUFFIX}" CACHE STRING 11 - "Path where built OpenMP libraries should be installed.") 12 - 13 - # Group test settings. 14 - @@ -47,7 +47,7 @@ if (OPENMP_STANDALONE_BUILD) 15 - else() 16 - set(OPENMP_ENABLE_WERROR ${LLVM_ENABLE_WERROR}) 17 - # If building in tree, we honor the same install suffix LLVM uses. 18 - - set(OPENMP_INSTALL_LIBDIR "lib${LLVM_LIBDIR_SUFFIX}" CACHE STRING 19 - + set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" CACHE STRING 20 - "Path where built OpenMP libraries should be installed.") 21 - 22 - if (NOT MSVC)