diff --git a/pkgs/development/compilers/llvm/10/llvm/default.nix b/pkgs/development/compilers/llvm/10/llvm/default.nix index c09ec676e9ea..534d38e86663 100644 --- a/pkgs/development/compilers/llvm/10/llvm/default.nix +++ b/pkgs/development/compilers/llvm/10/llvm/default.nix @@ -248,7 +248,7 @@ in stdenv.mkDerivation (rec { ] ++ optionals isDarwin [ "-DLLVM_ENABLE_LIBCXX=ON" "-DCAN_TARGET_i386=false" - ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [ "-DCMAKE_CROSSCOMPILING=True" "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen" ( diff --git a/pkgs/development/compilers/llvm/11/llvm/default.nix b/pkgs/development/compilers/llvm/11/llvm/default.nix index 01e6483ad640..423b08396666 100644 --- a/pkgs/development/compilers/llvm/11/llvm/default.nix +++ b/pkgs/development/compilers/llvm/11/llvm/default.nix @@ -256,7 +256,7 @@ in stdenv.mkDerivation (rec { ] ++ optionals isDarwin [ "-DLLVM_ENABLE_LIBCXX=ON" "-DCAN_TARGET_i386=false" - ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [ "-DCMAKE_CROSSCOMPILING=True" "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen" ( diff --git a/pkgs/development/compilers/llvm/12/llvm/default.nix b/pkgs/development/compilers/llvm/12/llvm/default.nix index 97d8f27672e3..3263c4ddaf35 100644 --- a/pkgs/development/compilers/llvm/12/llvm/default.nix +++ b/pkgs/development/compilers/llvm/12/llvm/default.nix @@ -244,7 +244,7 @@ in stdenv.mkDerivation (rec { ] ++ optionals isDarwin [ "-DLLVM_ENABLE_LIBCXX=ON" "-DCAN_TARGET_i386=false" - ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [ "-DCMAKE_CROSSCOMPILING=True" "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen" ( diff --git a/pkgs/development/compilers/llvm/13/llvm/default.nix b/pkgs/development/compilers/llvm/13/llvm/default.nix index 2a7c1c1867cb..1e71cdd89c6c 100644 --- a/pkgs/development/compilers/llvm/13/llvm/default.nix +++ b/pkgs/development/compilers/llvm/13/llvm/default.nix @@ -206,7 +206,7 @@ in stdenv.mkDerivation (rec { ] ++ optionals isDarwin [ "-DLLVM_ENABLE_LIBCXX=ON" "-DCAN_TARGET_i386=false" - ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [ "-DCMAKE_CROSSCOMPILING=True" "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen" ( diff --git a/pkgs/development/compilers/llvm/14/llvm/default.nix b/pkgs/development/compilers/llvm/14/llvm/default.nix index 6eec4c563f9c..eab49d326ad4 100644 --- a/pkgs/development/compilers/llvm/14/llvm/default.nix +++ b/pkgs/development/compilers/llvm/14/llvm/default.nix @@ -205,7 +205,7 @@ in stdenv.mkDerivation (rec { ] ++ optionals isDarwin [ "-DLLVM_ENABLE_LIBCXX=ON" "-DCAN_TARGET_i386=false" - ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [ "-DCMAKE_CROSSCOMPILING=True" "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen" ( diff --git a/pkgs/development/compilers/llvm/15/llvm/default.nix b/pkgs/development/compilers/llvm/15/llvm/default.nix index 0b9e83259b2c..4f17678ba14f 100644 --- a/pkgs/development/compilers/llvm/15/llvm/default.nix +++ b/pkgs/development/compilers/llvm/15/llvm/default.nix @@ -343,7 +343,7 @@ in stdenv.mkDerivation (rec { ] ++ optionals isDarwin [ "-DLLVM_ENABLE_LIBCXX=ON" "-DCAN_TARGET_i386=false" - ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [ "-DCMAKE_CROSSCOMPILING=True" "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen" ( diff --git a/pkgs/development/compilers/llvm/16/llvm/default.nix b/pkgs/development/compilers/llvm/16/llvm/default.nix index a6faf9fd635d..73fb6a785413 100644 --- a/pkgs/development/compilers/llvm/16/llvm/default.nix +++ b/pkgs/development/compilers/llvm/16/llvm/default.nix @@ -331,7 +331,7 @@ in ] ++ optionals isDarwin [ "-DLLVM_ENABLE_LIBCXX=ON" "-DCAN_TARGET_i386=false" - ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [ "-DCMAKE_CROSSCOMPILING=True" "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen" ( diff --git a/pkgs/development/compilers/llvm/17/llvm/default.nix b/pkgs/development/compilers/llvm/17/llvm/default.nix index b38fef333135..627679ce812f 100644 --- a/pkgs/development/compilers/llvm/17/llvm/default.nix +++ b/pkgs/development/compilers/llvm/17/llvm/default.nix @@ -330,7 +330,7 @@ stdenv.mkDerivation (rec { ] ++ optionals isDarwin [ "-DLLVM_ENABLE_LIBCXX=ON" "-DCAN_TARGET_i386=false" - ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [ "-DCMAKE_CROSSCOMPILING=True" "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen" ( diff --git a/pkgs/development/compilers/llvm/8/llvm/default.nix b/pkgs/development/compilers/llvm/8/llvm/default.nix index 7cef04347429..c2f924331098 100644 --- a/pkgs/development/compilers/llvm/8/llvm/default.nix +++ b/pkgs/development/compilers/llvm/8/llvm/default.nix @@ -222,7 +222,7 @@ in stdenv.mkDerivation (rec { ] ++ optionals (isDarwin) [ "-DLLVM_ENABLE_LIBCXX=ON" "-DCAN_TARGET_i386=false" - ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [ "-DCMAKE_CROSSCOMPILING=True" "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen" ( diff --git a/pkgs/development/compilers/llvm/9/llvm/default.nix b/pkgs/development/compilers/llvm/9/llvm/default.nix index 75c786855973..c0ef7801c348 100644 --- a/pkgs/development/compilers/llvm/9/llvm/default.nix +++ b/pkgs/development/compilers/llvm/9/llvm/default.nix @@ -237,7 +237,7 @@ in stdenv.mkDerivation (rec { ] ++ optionals (isDarwin) [ "-DLLVM_ENABLE_LIBCXX=ON" "-DCAN_TARGET_i386=false" - ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [ "-DCMAKE_CROSSCOMPILING=True" "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen" ( diff --git a/pkgs/development/compilers/llvm/git/llvm/default.nix b/pkgs/development/compilers/llvm/git/llvm/default.nix index 36edfee8a091..a6e9f9289d03 100644 --- a/pkgs/development/compilers/llvm/git/llvm/default.nix +++ b/pkgs/development/compilers/llvm/git/llvm/default.nix @@ -329,7 +329,7 @@ stdenv.mkDerivation (rec { ] ++ optionals isDarwin [ "-DLLVM_ENABLE_LIBCXX=ON" "-DCAN_TARGET_i386=false" - ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [ "-DCMAKE_CROSSCOMPILING=True" "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen" (