Skip to content

Commit

Permalink
Revert #201485: llvmPackages_14: Fix build on aarch64-linux
Browse files Browse the repository at this point in the history
This reverts commits 7496574 and 38c793c.
llvm_14 wouldn't even build on aarch64-linux (test phase).
  • Loading branch information
vcunat committed Dec 13, 2022
1 parent eddcc4a commit e53d160
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 17 deletions.
3 changes: 0 additions & 3 deletions pkgs/development/compilers/llvm/14/clang/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ let

buildInputs = [ libxml2 libllvm ];

# workaround https://github.com/NixOS/nixpkgs/issues/201254
NIX_LDFLAGS = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then "-lgcc" else null;

cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++14"
"-DCLANGD_BUILD_XPC=OFF"
Expand Down
3 changes: 0 additions & 3 deletions pkgs/development/compilers/llvm/14/compiler-rt/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ stdenv.mkDerivation {
"-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
];

# workaround https://github.com/NixOS/nixpkgs/issues/201254
NIX_LDFLAGS = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then "-lgcc" else null;

cmakeFlags = [
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
Expand Down
3 changes: 0 additions & 3 deletions pkgs/development/compilers/llvm/14/lld/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
buildInputs = [ libllvm libxml2 ];

# workaround https://github.com/NixOS/nixpkgs/issues/201254
NIX_LDFLAGS = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then "-lgcc" else null;

cmakeFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
];
Expand Down
3 changes: 0 additions & 3 deletions pkgs/development/compilers/llvm/14/lldb/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ stdenv.mkDerivation (rec {

hardeningDisable = [ "format" ];

# workaround https://github.com/NixOS/nixpkgs/issues/201254
NIX_LDFLAGS = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then "-lgcc" else null;

cmakeFlags = [
"-DLLDB_INCLUDE_TESTS=${if doCheck then "YES" else "NO"}"
"-DLLVM_ENABLE_RTTI=OFF"
Expand Down
3 changes: 0 additions & 3 deletions pkgs/development/compilers/llvm/14/llvm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,6 @@ in stdenv.mkDerivation (rec {
# E.g. mesa.drivers use the build-id as a cache key (see #93946):
LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1";

# workaround https://github.com/NixOS/nixpkgs/issues/201254
NIX_LDFLAGS = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then "-lgcc" else null;

cmakeFlags = with stdenv; let
# These flags influence llvm-config's BuildVariables.inc in addition to the
# general build. We need to make sure these are also passed via
Expand Down
2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14931,8 +14931,6 @@ with pkgs;
buildLlvmTools = buildPackages.llvmPackages_14.tools;
targetLlvmLibraries = targetPackages.llvmPackages_14.libraries or llvmPackages_14.libraries;
targetLlvm = targetPackages.llvmPackages_14.llvm or llvmPackages_14.llvm;
} // lib.optionalAttrs (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux && buildPackages.stdenv.cc.isGNU) {
stdenv = gcc11Stdenv;
}));

llvmPackages_latest = llvmPackages_14;
Expand Down

0 comments on commit e53d160

Please sign in to comment.