From 5761727e21808f055606f976b6ce6c675b92a39d Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Fri, 11 Jan 2019 04:21:03 +0100 Subject: llvm: add patch to fix build with gcc8 --- pkgs/development/compilers/llvm/5/llvm.nix | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pkgs/development/compilers/llvm') diff --git a/pkgs/development/compilers/llvm/5/llvm.nix b/pkgs/development/compilers/llvm/5/llvm.nix index d6839f0f2909..b742e6863a5e 100644 --- a/pkgs/development/compilers/llvm/5/llvm.nix +++ b/pkgs/development/compilers/llvm/5/llvm.nix @@ -1,5 +1,6 @@ { stdenv , fetch +, fetchpatch , cmake , python , libffi @@ -43,6 +44,13 @@ stdenv.mkDerivation (rec { propagatedBuildInputs = [ ncurses zlib ]; + patches = [ + (fetchpatch { + url = "https://bugzilla.redhat.com/attachment.cgi?id=1389687"; + name = "llvm-gcc8-type-mismatch.patch"; + sha256 = "0ga2123aclq3x9w72d0rm0az12m8c1i4r1106vh701hf4cghgbch"; + }) + ]; postPatch = stdenv.lib.optionalString stdenv.isDarwin '' substituteInPlace cmake/modules/AddLLVM.cmake \ --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \ -- cgit 1.4.1 From e3434a3c36354328edae4893424fc313c96684b8 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Tue, 3 Sep 2019 21:24:40 +0200 Subject: llvm_4: fix build with gcc8 --- pkgs/development/compilers/llvm/4/llvm.nix | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pkgs/development/compilers/llvm') diff --git a/pkgs/development/compilers/llvm/4/llvm.nix b/pkgs/development/compilers/llvm/4/llvm.nix index ea70382d2ac7..8ba94bb12626 100644 --- a/pkgs/development/compilers/llvm/4/llvm.nix +++ b/pkgs/development/compilers/llvm/4/llvm.nix @@ -46,6 +46,14 @@ stdenv.mkDerivation (rec { propagatedBuildInputs = [ ncurses zlib ]; + patches = [ + (fetchpatch { + name = "0001-Fix-return-type-in-ORC-readMem-client-interface.patch"; + url = "https://bugzilla.redhat.com/attachment.cgi?id=1389687"; + sha256 = "0ga2123aclq3x9w72d0rm0az12m8c1i4r1106vh701hf4cghgbch"; + }) + ]; + # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra # can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd -- cgit 1.4.1 From be9901afe2ed5d33cd2cc4d2eb74357dd503b753 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Tue, 3 Sep 2019 22:04:44 +0200 Subject: llvm_38: drop since it doesn't build with gcc8 --- pkgs/development/compilers/llvm/3.8/D17533-1.patch | 60 ----------- .../compilers/llvm/3.8/clang/default.nix | 80 -------------- .../compilers/llvm/3.8/clang/purity.patch | 17 --- pkgs/development/compilers/llvm/3.8/default.nix | 59 ----------- .../compilers/llvm/3.8/fix-llvm-config.patch | 11 -- .../compilers/llvm/3.8/libc++/darwin.patch | 39 ------- .../compilers/llvm/3.8/libc++/default.nix | 52 ---------- .../compilers/llvm/3.8/libc++/setup-hook.sh | 6 -- pkgs/development/compilers/llvm/3.8/libc++abi.nix | 51 --------- pkgs/development/compilers/llvm/3.8/lldb.nix | 50 --------- pkgs/development/compilers/llvm/3.8/llvm.nix | 115 --------------------- pkgs/top-level/all-packages.nix | 10 -- 12 files changed, 550 deletions(-) delete mode 100644 pkgs/development/compilers/llvm/3.8/D17533-1.patch delete mode 100644 pkgs/development/compilers/llvm/3.8/clang/default.nix delete mode 100644 pkgs/development/compilers/llvm/3.8/clang/purity.patch delete mode 100644 pkgs/development/compilers/llvm/3.8/default.nix delete mode 100644 pkgs/development/compilers/llvm/3.8/fix-llvm-config.patch delete mode 100644 pkgs/development/compilers/llvm/3.8/libc++/darwin.patch delete mode 100644 pkgs/development/compilers/llvm/3.8/libc++/default.nix delete mode 100644 pkgs/development/compilers/llvm/3.8/libc++/setup-hook.sh delete mode 100644 pkgs/development/compilers/llvm/3.8/libc++abi.nix delete mode 100644 pkgs/development/compilers/llvm/3.8/lldb.nix delete mode 100644 pkgs/development/compilers/llvm/3.8/llvm.nix (limited to 'pkgs/development/compilers/llvm') diff --git a/pkgs/development/compilers/llvm/3.8/D17533-1.patch b/pkgs/development/compilers/llvm/3.8/D17533-1.patch deleted file mode 100644 index 79ca953d6e5b..000000000000 --- a/pkgs/development/compilers/llvm/3.8/D17533-1.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit eb92f5a745014532b83abfba04602fce87ca8393 -Author: Chuang-Yu Cheng -Date: Fri Apr 8 12:04:32 2016 +0000 - - CXX_FAST_TLS calling convention: performance improvement for PPC64 - - This is the same change on PPC64 as r255821 on AArch64. I have even borrowed - his commit message. - - The access function has a short entry and a short exit, the initialization - block is only run the first time. To improve the performance, we want to - have a short frame at the entry and exit. - - We explicitly handle most of the CSRs via copies. Only the CSRs that are not - handled via copies will be in CSR_SaveList. - - Frame lowering and prologue/epilogue insertion will generate a short frame - in the entry and exit according to CSR_SaveList. The majority of the CSRs will - be handled by register allcoator. Register allocator will try to spill and - reload them in the initialization block. - - We add CSRsViaCopy, it will be explicitly handled during lowering. - - 1> we first set FunctionLoweringInfo->SplitCSR if conditions are met (the target - supports it for the given machine function and the function has only return - exits). We also call TLI->initializeSplitCSR to perform initialization. - 2> we call TLI->insertCopiesSplitCSR to insert copies from CSRsViaCopy to - virtual registers at beginning of the entry block and copies from virtual - registers to CSRsViaCopy at beginning of the exit blocks. - 3> we also need to make sure the explicit copies will not be eliminated. - - Author: Tom Jablin (tjablin) - Reviewers: hfinkel kbarton cycheng - - http://reviews.llvm.org/D17533 - - git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265781 91177308-0d34-0410-b5e6-96231b3b80d8 - -diff --git a/lib/CodeGen/TargetFrameLoweringImpl.cpp b/lib/CodeGen/TargetFrameLoweringImpl.cpp -index 679ade1..0a0e079 100644 ---- a/lib/CodeGen/TargetFrameLoweringImpl.cpp -+++ b/lib/CodeGen/TargetFrameLoweringImpl.cpp -@@ -63,12 +63,15 @@ void TargetFrameLowering::determineCalleeSaves(MachineFunction &MF, - const TargetRegisterInfo &TRI = *MF.getSubtarget().getRegisterInfo(); - const MCPhysReg *CSRegs = TRI.getCalleeSavedRegs(&MF); - -+ // Resize before the early returns. Some backends expect that -+ // SavedRegs.size() == TRI.getNumRegs() after this call even if there are no -+ // saved registers. -+ SavedRegs.resize(TRI.getNumRegs()); -+ - // Early exit if there are no callee saved registers. - if (!CSRegs || CSRegs[0] == 0) - return; - -- SavedRegs.resize(TRI.getNumRegs()); -- - // In Naked functions we aren't going to save any registers. - if (MF.getFunction()->hasFnAttribute(Attribute::Naked)) - return; diff --git a/pkgs/development/compilers/llvm/3.8/clang/default.nix b/pkgs/development/compilers/llvm/3.8/clang/default.nix deleted file mode 100644 index 47a1bed126da..000000000000 --- a/pkgs/development/compilers/llvm/3.8/clang/default.nix +++ /dev/null @@ -1,80 +0,0 @@ -{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python }: - -let - gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc; - self = stdenv.mkDerivation { - name = "clang-${version}"; - - src = fetch "cfe" "1prc72xmkgx8wrzmrr337776676nhsp1qd3mw2bvb22bzdnq7lsc"; - - unpackPhase = '' - unpackFile $src - mv cfe-${version}.src clang - sourceRoot=$PWD/clang - unpackFile ${clang-tools-extra_src} - mv clang-tools-extra-* $sourceRoot/tools/extra - ''; - - nativeBuildInputs = [ cmake ]; - buildInputs = [ libxml2 llvm python ]; - - cmakeFlags = [ - "-DCMAKE_CXX_FLAGS=-std=c++11" - ] ++ - # Maybe with compiler-rt this won't be needed? - (stdenv.lib.optional stdenv.isLinux "-DGCC_INSTALL_PREFIX=${gcc}") ++ - (stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.cc.libc}/include"); - - patches = [ ./purity.patch ]; - - postPatch = '' - sed -i -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/Tools.cpp - sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/ToolChains.cpp - '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' - sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/Tools.cpp - ''; - - outputs = [ "out" "lib" "python" ]; - - # Clang expects to find LLVMgold in its own prefix - # Clang expects to find sanitizer libraries in its own prefix - postInstall = '' - if [ -e ${llvm}/lib/LLVMgold.so ]; then - ln -sv ${llvm}/lib/LLVMgold.so $out/lib - fi - - ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/ - ln -sv $out/bin/clang $out/bin/cpp - - # Move libclang to 'lib' output - moveToOutput "lib/libclang.*" "$lib" - substituteInPlace $out/share/clang/cmake/ClangTargets-release.cmake \ - --replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang." - - mkdir -p $python/bin $python/share/clang/ - mv $out/bin/{git-clang-format,scan-view} $python/bin - if [ -e $out/bin/set-xcode-analyzer ]; then - mv $out/bin/set-xcode-analyzer $python/bin - fi - mv $out/share/clang/*.py $python/share/clang - - rm $out/bin/c-index-test - ''; - - enableParallelBuilding = true; - - passthru = { - isClang = true; - inherit llvm; - } // stdenv.lib.optionalAttrs stdenv.isLinux { - inherit gcc; - }; - - meta = { - description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler"; - homepage = http://llvm.org/; - license = stdenv.lib.licenses.ncsa; - platforms = stdenv.lib.platforms.all; - }; - }; -in self diff --git a/pkgs/development/compilers/llvm/3.8/clang/purity.patch b/pkgs/development/compilers/llvm/3.8/clang/purity.patch deleted file mode 100644 index 2d1c68d865e6..000000000000 --- a/pkgs/development/compilers/llvm/3.8/clang/purity.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/lib/Driver/Tools.cpp 2016-02-12 15:51:41.000000000 -0700 -+++ b/lib/Driver/Tools.cpp 2016-03-08 15:39:06.790111122 -0700 -@@ -8833,15 +8833,6 @@ - CmdArgs.push_back("-shared"); - } - -- if (Arch == llvm::Triple::arm || Arch == llvm::Triple::armeb || -- Arch == llvm::Triple::thumb || Arch == llvm::Triple::thumbeb || -- (!Args.hasArg(options::OPT_static) && -- !Args.hasArg(options::OPT_shared))) { -- CmdArgs.push_back("-dynamic-linker"); -- CmdArgs.push_back(Args.MakeArgString( -- D.DyldPrefix + getLinuxDynamicLinker(Args, ToolChain))); -- } -- - CmdArgs.push_back("-o"); - CmdArgs.push_back(Output.getFilename()); diff --git a/pkgs/development/compilers/llvm/3.8/default.nix b/pkgs/development/compilers/llvm/3.8/default.nix deleted file mode 100644 index a848c8b9252b..000000000000 --- a/pkgs/development/compilers/llvm/3.8/default.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ newScope, stdenv, libstdcxxHook, isl, fetchurl, overrideCC, wrapCCWith -, buildLlvmTools # tools, but from the previous stage, for cross -, targetLlvmLibraries # libraries, but from the next stage, for cross -}: - -let - version = "3.8.1"; - - fetch = fetch_v version; - fetch_v = ver: name: sha256: fetchurl { - url = "https://releases.llvm.org/${ver}/${name}-${ver}.src.tar.xz"; - inherit sha256; - }; - - compiler-rt_src = fetch "compiler-rt" "0p0y85c7izndbpg2l816z7z7558axq11d5pwkm4h11sdw7d13w0d"; - clang-tools-extra_src = fetch "clang-tools-extra" "15n39r4ssphpaq4a0wzyjm7ilwxb0bch6nrapy8c5s8d49h5qjk6"; - - tools = stdenv.lib.makeExtensible (tools: let - callPackage = newScope (tools // { inherit stdenv isl version fetch; }); - in { - llvm = callPackage ./llvm.nix { - inherit compiler-rt_src; - }; - - clang-unwrapped = callPackage ./clang { - inherit clang-tools-extra_src; - }; - - libclang = tools.clang-unwrapped.lib; - - clang = if stdenv.cc.isGNU then tools.libstdcxxClang else tools.libcxxClang; - - libstdcxxClang = wrapCCWith { - cc = tools.clang-unwrapped; - extraPackages = [ libstdcxxHook ]; - }; - - libcxxClang = wrapCCWith { - cc = tools.clang-unwrapped; - extraPackages = [ targetLlvmLibraries.libcxx targetLlvmLibraries.libcxxabi ]; - }; - - lldb = callPackage ./lldb.nix {}; - }); - - libraries = stdenv.lib.makeExtensible (libraries: let - callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv isl version fetch; }); - in { - - stdenv = overrideCC stdenv buildLlvmTools.clang; - - libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang; - - libcxx = callPackage ./libc++ {}; - - libcxxabi = callPackage ./libc++abi.nix {}; - }); - -in { inherit tools libraries; } // libraries // tools diff --git a/pkgs/development/compilers/llvm/3.8/fix-llvm-config.patch b/pkgs/development/compilers/llvm/3.8/fix-llvm-config.patch deleted file mode 100644 index 6e56c67c8977..000000000000 --- a/pkgs/development/compilers/llvm/3.8/fix-llvm-config.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- llvm.org/utils/llvm-build/llvmbuild/main.py 2015-10-07 00:24:35.000000000 +0100 -+++ llvm/utils/llvm-build/llvmbuild/main.py 2017-06-16 17:08:39.866586578 +0100 -@@ -413,7 +413,7 @@ - if library_name is None: - library_name_as_cstr = 'nullptr' - else: -- library_name_as_cstr = '"lib%s.a"' % library_name -+ library_name_as_cstr = '"lib%s.so"' % library_name - if is_installed: - is_installed_as_cstr = 'true' - else: diff --git a/pkgs/development/compilers/llvm/3.8/libc++/darwin.patch b/pkgs/development/compilers/llvm/3.8/libc++/darwin.patch deleted file mode 100644 index 6dd756f01cc2..000000000000 --- a/pkgs/development/compilers/llvm/3.8/libc++/darwin.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- libcxx-3.8.0.src.org/lib/CMakeLists.txt 2015-12-16 15:41:05.000000000 -0800 -+++ libcxx-3.8.0.src/lib/CMakeLists.txt 2016-06-17 19:40:00.293394500 -0700 -@@ -94,30 +94,30 @@ - add_definitions(-D__STRICT_ANSI__) - add_link_flags( - "-compatibility_version 1" - "-current_version 1" -- "-install_name /usr/lib/libc++.1.dylib" -- "-Wl,-reexport_library,/usr/lib/libc++abi.dylib" -+ "-install_name ${LIBCXX_LIBCXXABI_LIB_PATH}/libc++.1.dylib" -+ "-Wl,-reexport_library,${LIBCXX_LIBCXXABI_LIB_PATH}/libc++abi.dylib" - "-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++unexp.exp" - "/usr/lib/libSystem.B.dylib") - else() - if ( ${CMAKE_OSX_SYSROOT} ) - list(FIND ${CMAKE_OSX_ARCHITECTURES} "armv7" OSX_HAS_ARMV7) - if (OSX_HAS_ARMV7) - set(OSX_RE_EXPORT_LINE -- "${CMAKE_OSX_SYSROOT}/usr/lib/libc++abi.dylib" -+ "${CMAKE_OSX_SYSROOT}${LIBCXX_LIBCXXABI_LIB_PATH}/libc++abi.dylib" - "-Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++sjlj-abi.exp") - else() - set(OSX_RE_EXPORT_LINE -- "-Wl,-reexport_library,${CMAKE_OSX_SYSROOT}/usr/lib/libc++abi.dylib") -+ "-Wl,-reexport_library,${CMAKE_OSX_SYSROOT}${LIBCXX_LIBCXXABI_LIB_PATH}/libc++abi.dylib") - endif() - else() -- set(OSX_RE_EXPORT_LINE "/usr/lib/libc++abi.dylib -Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++abi${LIBCXX_LIBCPPABI_VERSION}.exp") -+ set(OSX_RE_EXPORT_LINE "${LIBCXX_LIBCXXABI_LIB_PATH}/libc++abi.dylib -Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++abi${LIBCXX_LIBCPPABI_VERSION}.exp") - endif() - - add_link_flags( - "-compatibility_version 1" -- "-install_name /usr/lib/libc++.1.dylib" -+ "-install_name ${LIBCXX_LIBCXXABI_LIB_PATH}/libc++.1.dylib" - "-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++unexp.exp" - "${OSX_RE_EXPORT_LINE}" - "-Wl,-force_symbols_not_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/notweak.exp" - "-Wl,-force_symbols_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/weak.exp") diff --git a/pkgs/development/compilers/llvm/3.8/libc++/default.nix b/pkgs/development/compilers/llvm/3.8/libc++/default.nix deleted file mode 100644 index 5a0410302f2f..000000000000 --- a/pkgs/development/compilers/llvm/3.8/libc++/default.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ lib, stdenv, fetch, cmake, libcxxabi, fixDarwinDylibNames, version }: - -stdenv.mkDerivation rec { - name = "libc++-${version}"; - - src = fetch "libcxx" "1k7f9qk5bgwa02ksh6yr9hccwcbhmcdzl1fpbdw6s2c89iwg7mvp"; - - postUnpack = '' - unpackFile ${libcxxabi.src} - ''; - - preConfigure = '' - # Get headers from the cxxabi source so we can see private headers not installed by the cxxabi package - cmakeFlagsArray=($cmakeFlagsArray -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$NIX_BUILD_TOP/libcxxabi-${version}.src/include") - ''; - - patches = [ - # glibc 2.26 fix - ../../3.9/libc++/xlocale-glibc-2.26.patch - ] - ++ lib.optional stdenv.isDarwin ./darwin.patch - ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [ - ../../libcxx-0001-musl-hacks.patch - ../../libcxx-max_align_t.patch - ]; - - nativeBuildInputs = [ cmake ]; - - buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; - - cmakeFlags = [ - "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" - "-DLIBCXX_LIBCPPABI_VERSION=2" - "-DLIBCXX_CXX_ABI=libcxxabi" - ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "-DLIBCXX_HAS_MUSL_LIBC=1"; - - enableParallelBuilding = true; - - linkCxxAbi = stdenv.isLinux; - - setupHooks = [ - ../../../../../build-support/setup-hooks/role.bash - ./setup-hook.sh - ]; - - meta = { - homepage = http://libcxx.llvm.org/; - description = "A new implementation of the C++ standard library, targeting C++11"; - license = with stdenv.lib.licenses; [ ncsa mit ]; - platforms = stdenv.lib.platforms.unix; - }; -} diff --git a/pkgs/development/compilers/llvm/3.8/libc++/setup-hook.sh b/pkgs/development/compilers/llvm/3.8/libc++/setup-hook.sh deleted file mode 100644 index 6611259165ae..000000000000 --- a/pkgs/development/compilers/llvm/3.8/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/pkgs/development/compilers/llvm/3.8/libc++abi.nix b/pkgs/development/compilers/llvm/3.8/libc++abi.nix deleted file mode 100644 index 8b25681c2dbf..000000000000 --- a/pkgs/development/compilers/llvm/3.8/libc++abi.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ stdenv, cmake, fetch, libcxx, libunwind, llvm, version }: - -stdenv.mkDerivation { - name = "libc++abi-${version}"; - - src = fetch "libcxxabi" "1qfs2iis1i0ppv11jndc98cvd7s25pj46pq2sfyldmzswdxmzdg1"; - - nativeBuildInputs = [ cmake ]; - buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind; - - postUnpack = '' - unpackFile ${libcxx.src} - unpackFile ${llvm.src} - export NIX_CFLAGS_COMPILE+=" -I$PWD/include" - export cmakeFlags="-DLLVM_PATH=$PWD/$(ls -d llvm-*) -DLIBCXXABI_LIBCXX_INCLUDES=$PWD/$(ls -d libcxx-*)/include" - '' + stdenv.lib.optionalString stdenv.isDarwin '' - export TRIPLE=x86_64-apple-darwin - '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' - patch -p1 -d $(ls -d libcxx-*) -i ${../libcxx-0001-musl-hacks.patch} - patch -p1 -d $(ls -d libcxx-*) -i ${../libcxx-max_align_t.patch} - ''; - - installPhase = if stdenv.isDarwin - then '' - for file in lib/*.dylib; do - # this should be done in CMake, but having trouble figuring out - # the magic combination of necessary CMake variables - # if you fancy a try, take a look at - # http://www.cmake.org/Wiki/CMake_RPATH_handling - install_name_tool -id $out/$file $file - done - make install - install -d 755 $out/include - install -m 644 ../include/*.h $out/include - '' - else '' - install -d -m 755 $out/include $out/lib - install -m 644 lib/libc++abi.so.1.0 $out/lib - install -m 644 ../include/cxxabi.h $out/include - ln -s libc++abi.so.1.0 $out/lib/libc++abi.so - ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1 - ''; - - meta = { - homepage = http://libcxxabi.llvm.org/; - description = "A new implementation of low level support for a standard C++ library"; - license = with stdenv.lib.licenses; [ ncsa mit ]; - maintainers = with stdenv.lib.maintainers; [ vlstill ]; - platforms = stdenv.lib.platforms.unix; - }; -} diff --git a/pkgs/development/compilers/llvm/3.8/lldb.nix b/pkgs/development/compilers/llvm/3.8/lldb.nix deleted file mode 100644 index d27786464c05..000000000000 --- a/pkgs/development/compilers/llvm/3.8/lldb.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ stdenv -, fetch -, cmake -, zlib -, ncurses -, swig -, which -, libedit -, llvm -, clang-unwrapped -, python -, version -}: - -stdenv.mkDerivation { - name = "lldb-${version}"; - - src = fetch "lldb" "18z8vhfgh4m57hl66i83cp4d4mv3i86z2hjhbp5rvqs7d88li49l"; - - postUnpack = '' - # Hack around broken standalone builf as of 3.8 - unpackFile ${llvm.src} - srcDir="$(ls -d lldb-*.src)" - mkdir -p "$srcDir/tools/lib/Support" - cp "$(ls -d llvm-*.src)/lib/Support/regex_impl.h" "$srcDir/tools/lib/Support/" - ''; - - buildInputs = [ cmake python which swig ncurses zlib libedit llvm ]; - - hardeningDisable = [ "format" ]; - - cmakeFlags = [ - "-DLLDB_PATH_TO_LLVM_BUILD=${llvm}" - "-DLLVM_MAIN_INCLUDE_DIR=${llvm}/include" - "-DLLDB_PATH_TO_CLANG_BUILD=${clang-unwrapped}" - "-DCLANG_MAIN_INCLUDE_DIR=${clang-unwrapped}/include" - "-DPYTHON_VERSION_MAJOR=2" - "-DPYTHON_VERSION_MINOR=7" - "-DLLDB_DISABLE_LIBEDIT=1" # https://llvm.org/bugs/show_bug.cgi?id=28898 - ]; - - enableParallelBuilding = true; - - meta = { - description = "A next-generation high-performance debugger"; - homepage = http://llvm.org/; - license = stdenv.lib.licenses.ncsa; - platforms = stdenv.lib.platforms.all; - }; -} diff --git a/pkgs/development/compilers/llvm/3.8/llvm.nix b/pkgs/development/compilers/llvm/3.8/llvm.nix deleted file mode 100644 index a73b73137ddc..000000000000 --- a/pkgs/development/compilers/llvm/3.8/llvm.nix +++ /dev/null @@ -1,115 +0,0 @@ -{ stdenv -, fetch -, fetchpatch -, perl -, groff -, cmake -, python -, libffi -, libbfd -, libxml2 -, ncurses -, version -, zlib -, compiler-rt_src -, debugVersion ? false -, enableSharedLibraries ? true -}: - -stdenv.mkDerivation rec { - name = "llvm-${version}"; - - src = fetch "llvm" "1ybmnid4pw2hxn12ax5qa5kl1ldfns0njg8533y3mzslvd5cx0kf"; - - unpackPhase = '' - unpackFile $src - mv llvm-${version}.src llvm - sourceRoot=$PWD/llvm - unpackFile ${compiler-rt_src} - mv compiler-rt-* $sourceRoot/projects/compiler-rt - ''; - - buildInputs = [ perl groff cmake libxml2 python libffi ]; - - propagatedBuildInputs = [ ncurses zlib ]; - - # Fix a segfault in llc - # See http://lists.llvm.org/pipermail/llvm-dev/2016-October/106500.html - patches = [ ./D17533-1.patch ] - ++ stdenv.lib.optional (!stdenv.isDarwin) ./fix-llvm-config.patch - ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [ - ../TLI-musl.patch - ../dynamiclibrary-musl.patch - ]; - - # hacky fix: New LLVM releases require a newer macOS SDK than - # 10.9. This is a temporary measure until nixpkgs darwin support is - # updated. - postPatch = stdenv.lib.optionalString stdenv.isDarwin '' - sed -i 's/os_trace(\(.*\)");$/printf(\1\\n");/g' ./projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc - - substituteInPlace CMakeLists.txt \ - --replace 'set(CMAKE_INSTALL_NAME_DIR "@rpath")' "set(CMAKE_INSTALL_NAME_DIR "$out/lib")" \ - --replace 'set(CMAKE_INSTALL_RPATH "@executable_path/../lib")' "" - '' - + '' - ( - cd projects/compiler-rt - patch -p1 < ${ - fetchpatch { - name = "sigaltstack.patch"; # for glibc-2.26 - url = https://github.com/llvm-mirror/compiler-rt/commit/8a5e425a68d.diff; - sha256 = "0h4y5vl74qaa7dl54b1fcyqalvlpd8zban2d1jxfkxpzyi7m8ifi"; - } - } - ) - ''; - - # hacky fix: created binaries need to be run before installation - preBuild = '' - mkdir -p $out/ - ln -sv $PWD/lib $out - ''; - - cmakeFlags = with stdenv; [ - "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}" - "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc - "-DLLVM_BUILD_TESTS=ON" - "-DLLVM_ENABLE_FFI=ON" - "-DLLVM_ENABLE_RTTI=ON" - - "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" - "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}" - "-DTARGET_TRIPLE=${stdenv.hostPlatform.config}" - ] ++ stdenv.lib.optional enableSharedLibraries [ - "-DLLVM_LINK_LLVM_DYLIB=ON" - ] ++ stdenv.lib.optional (!isDarwin) - "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" - ++ stdenv.lib.optionals ( isDarwin) [ - "-DLLVM_ENABLE_LIBCXX=ON" - "-DCAN_TARGET_i386=false" - ] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [ - # Not yet supported - "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" - "-DCOMPILER_RT_BUILD_XRAY=OFF" - - ]; - - postBuild = '' - rm -fR $out - ''; - - postInstall = stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) '' - ln -s $out/lib/libLLVM.dylib $out/lib/libLLVM-${version}.dylib - ''; - - enableParallelBuilding = true; - - meta = { - description = "Collection of modular and reusable compiler and toolchain technologies"; - homepage = http://llvm.org/; - license = stdenv.lib.licenses.ncsa; - maintainers = with stdenv.lib.maintainers; [ lovek323 raskin ]; - platforms = stdenv.lib.platforms.all; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3164266ff6ec..82a940b5d381 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7405,7 +7405,6 @@ in clang_5 = llvmPackages_5.clang; clang_4 = llvmPackages_4.clang; clang_39 = llvmPackages_39.clang; - clang_38 = llvmPackages_38.clang; clang_35 = wrapCC llvmPackages_35.clang; clang-tools = callPackage ../development/tools/clang-tools { @@ -8108,7 +8107,6 @@ in llvm_5 = llvmPackages_5.llvm; llvm_4 = llvmPackages_4.llvm; llvm_39 = llvmPackages_39.llvm; - llvm_38 = llvmPackages_38.llvm; llvm_35 = llvmPackages_35.llvm; llvmPackages = recurseIntoAttrs llvmPackages_7; @@ -8119,14 +8117,6 @@ in stdenv = gcc6Stdenv; }); - llvmPackages_38 = callPackage ../development/compilers/llvm/3.8 ({ - inherit (stdenvAdapters) overrideCC; - buildLlvmTools = buildPackages.llvmPackages_38.tools; - targetLlvmLibraries = targetPackages.llvmPackages_38.libraries; - } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = gcc6Stdenv; - }); - llvmPackages_39 = callPackage ../development/compilers/llvm/3.9 ({ inherit (stdenvAdapters) overrideCC; buildLlvmTools = buildPackages.llvmPackages_39.tools; -- cgit 1.4.1