Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5dd2ff367918
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0ce86880ccc0
Choose a head ref
  • 4 commits
  • 3 files changed
  • 1 contributor

Commits on Oct 1, 2019

  1. llvm/compiler-rt: fix on i686

    Only turn on cross related flags when useLLVM = true.
    
    Fixes #66693
    matthewbauer committed Oct 1, 2019

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    tonistiigi Tõnis Tiigi
    Copy the full SHA
    d303a2f View commit details
  2. llvm/compiler: preserve hashes

    Don’t require a mass rebuild for this fix.
    matthewbauer committed Oct 1, 2019

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    tonistiigi Tõnis Tiigi
    Copy the full SHA
    a7dc5c6 View commit details
  3. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    tonistiigi Tõnis Tiigi
    Copy the full SHA
    1f95c9c View commit details
  4. Merge pull request #69908 from matthewbauer/fix-clang-i686

    llvm/compiler-rt: fix on i686
    matthewbauer authored Oct 1, 2019

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    tonistiigi Tõnis Tiigi
    Copy the full SHA
    0ce8688 View commit details
10 changes: 5 additions & 5 deletions pkgs/development/compilers/llvm/7/compiler-rt.nix
Original file line number Diff line number Diff line change
@@ -7,11 +7,11 @@ stdenv.mkDerivation {
nativeBuildInputs = [ cmake python llvm ];
buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi;

cmakeFlags = [
cmakeFlags = stdenv.lib.optionals (stdenv.hostPlatform.useLLVM or false || stdenv.isDarwin) [
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
] ++ stdenv.lib.optionals (stdenv.hostPlatform.useLLVM or false) [
"-DCMAKE_C_FLAGS=-nodefaultlibs"
"-DCMAKE_CXX_COMPILER_WORKS=ON"
"-DCOMPILER_RT_BUILD_BUILTINS=ON"
@@ -26,7 +26,7 @@ stdenv.mkDerivation {

patches = [
./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch
] ++ stdenv.lib.optional (stdenv.hostPlatform.useLLVM or false) ./crtbegin-and-end.patch
++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch;

# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
@@ -37,7 +37,7 @@ stdenv.mkDerivation {
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace cmake/config-ix.cmake \
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
'' + stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
'' + stdenv.lib.optionalString (stdenv.hostPlatform.useLLVM or false) ''
substituteInPlace lib/builtins/int_util.c \
--replace "#include <stdlib.h>" ""
substituteInPlace lib/builtins/clear_cache.c \
@@ -49,7 +49,7 @@ stdenv.mkDerivation {
# Hack around weird upsream RPATH bug
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
ln -s "$out/lib"/*/* "$out/lib"
'' + stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
'' + stdenv.lib.optionalString (stdenv.hostPlatform.useLLVM or false) ''
ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/linux/crtbegin.o
ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/linux/crtend.o
ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/linux/crtbeginS.o
7 changes: 3 additions & 4 deletions pkgs/development/compilers/llvm/8/compiler-rt.nix
Original file line number Diff line number Diff line change
@@ -7,11 +7,10 @@ stdenv.mkDerivation {
nativeBuildInputs = [ cmake python llvm ];
buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi;

cmakeFlags = [
cmakeFlags = stdenv.lib.optionals (stdenv.hostPlatform.useLLVM or false) [
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"-DCMAKE_C_FLAGS=-nodefaultlibs"
"-DCMAKE_CXX_COMPILER_WORKS=ON"
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
@@ -37,7 +36,7 @@ stdenv.mkDerivation {
patches = [
./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
]# ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch;
++ stdenv.lib.optional (stdenv.hostPlatform.useLLVM or false) ./crtbegin-and-end.patch;

# 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
@@ -47,7 +46,7 @@ stdenv.mkDerivation {
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace cmake/config-ix.cmake \
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
'' + stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
'' + stdenv.lib.optionalString (stdenv.hostPlatform.useLLVM or false) ''
substituteInPlace lib/builtins/int_util.c \
--replace "#include <stdlib.h>" ""
substituteInPlace lib/builtins/clear_cache.c \
5 changes: 2 additions & 3 deletions pkgs/development/compilers/llvm/9/compiler-rt.nix
Original file line number Diff line number Diff line change
@@ -7,11 +7,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake python llvm ];
buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi;

cmakeFlags = [
cmakeFlags = stdenv.lib.optionals (stdenv.hostPlatform.useLLVM or false) [
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"-DCMAKE_C_FLAGS=-nodefaultlibs"
"-DCMAKE_CXX_COMPILER_WORKS=ON"
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
@@ -46,7 +45,7 @@ stdenv.mkDerivation rec {
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace cmake/config-ix.cmake \
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
'' + stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
'' + stdenv.lib.optionalString (stdenv.hostPlatform.useLLVM or false) ''
substituteInPlace lib/builtins/int_util.c \
--replace "#include <stdlib.h>" ""
substituteInPlace lib/builtins/clear_cache.c \