lol
0
fork

Configure Feed

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

llvmPackages_18: init

+36 -60
-27
pkgs/development/compilers/llvm/18/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
-2
pkgs/development/compilers/llvm/18/compiler-rt/default.nix
··· 90 90 # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the 91 91 # extra `/`. 92 92 ./normalize-var.patch 93 - # Prevent a compilation error on darwin 94 - ./darwin-targetconditionals.patch 95 93 # See: https://github.com/NixOS/nixpkgs/pull/186575 96 94 ../../common/compiler-rt/darwin-plistbuddy-workaround.patch 97 95 # See: https://github.com/NixOS/nixpkgs/pull/194634#discussion_r999829893
+5 -17
pkgs/development/compilers/llvm/18/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/18/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
+4
pkgs/development/compilers/llvm/18/lld/default.nix
··· 27 27 nativeBuildInputs = [ cmake ninja ]; 28 28 buildInputs = [ libllvm libxml2 ]; 29 29 30 + patches = [ 31 + ./gnu-install-dirs.patch 32 + ]; 33 + 30 34 cmakeFlags = [ 31 35 "-DLLD_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/lld" 32 36 ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+15
pkgs/development/compilers/llvm/18/lld/gnu-install-dirs.patch
··· 1 + diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake 2 + index d3924f7243d4..42a7cd62281c 100644 3 + --- a/cmake/modules/AddLLD.cmake 4 + +++ b/cmake/modules/AddLLD.cmake 5 + @@ -18,8 +18,8 @@ macro(add_lld_library name) 6 + install(TARGETS ${name} 7 + COMPONENT ${name} 8 + ${export_to_lldtargets} 9 + - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} 10 + - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} 11 + + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" 12 + + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" 13 + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") 14 + 15 + if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
+7
pkgs/development/compilers/llvm/18/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 ··· 380 384 --replace "$out/bin/llvm-config" "$dev/bin/llvm-config" 381 385 substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \ 382 386 --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "'"$lib"'")' 387 + '' 388 + + optionalString (stdenv.isDarwin && enableSharedLibraries) '' 389 + ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib 383 390 '' 384 391 + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' 385 392 cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
+5 -5
pkgs/development/compilers/llvm/18/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