llvmPackages_*.libllvm: only build tests if doCheck
To make the value of doCheck in the argument attribute set accurate we also need to include the condition for cross compilation which normally is added by stdenv.mkDerivation.
This commit is contained in:
parent
6b1ea4c5bd
commit
e5ccc412d2
10 changed files with 34 additions and 24 deletions
|
@ -174,7 +174,7 @@ in stdenv.mkDerivation (rec {
|
|||
in flagsForLlvmConfig ++ [
|
||||
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
|
||||
"-DLLVM_INSTALL_UTILS=ON" # Needed by rustc
|
||||
"-DLLVM_BUILD_TESTS=ON"
|
||||
"-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
|
||||
"-DLLVM_ENABLE_FFI=ON"
|
||||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
|
@ -248,7 +248,8 @@ in stdenv.mkDerivation (rec {
|
|||
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
|
||||
'';
|
||||
|
||||
doCheck = stdenv.isLinux && (!stdenv.isx86_32);
|
||||
doCheck = stdenv.isLinux && (!stdenv.isx86_32)
|
||||
&& (stdenv.hostPlatform == stdenv.buildPlatform);
|
||||
|
||||
checkTarget = "check-all";
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ in stdenv.mkDerivation (rec {
|
|||
in flagsForLlvmConfig ++ [
|
||||
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
|
||||
"-DLLVM_INSTALL_UTILS=ON" # Needed by rustc
|
||||
"-DLLVM_BUILD_TESTS=ON"
|
||||
"-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
|
||||
"-DLLVM_ENABLE_FFI=ON"
|
||||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
|
@ -249,7 +249,8 @@ in stdenv.mkDerivation (rec {
|
|||
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
|
||||
'';
|
||||
|
||||
doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl) && (!stdenv.hostPlatform.isRiscV);
|
||||
doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl) && (!stdenv.hostPlatform.isRiscV)
|
||||
&& (stdenv.hostPlatform == stdenv.buildPlatform);
|
||||
|
||||
checkTarget = "check-all";
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@ in stdenv.mkDerivation (rec {
|
|||
in flagsForLlvmConfig ++ [
|
||||
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
|
||||
"-DLLVM_INSTALL_UTILS=ON" # Needed by rustc
|
||||
"-DLLVM_BUILD_TESTS=ON"
|
||||
"-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
|
||||
"-DLLVM_ENABLE_FFI=ON"
|
||||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
|
@ -235,7 +235,8 @@ in stdenv.mkDerivation (rec {
|
|||
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
|
||||
'';
|
||||
|
||||
doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl);
|
||||
doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl)
|
||||
&& (stdenv.hostPlatform == stdenv.buildPlatform);
|
||||
|
||||
checkTarget = "check-all";
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ in stdenv.mkDerivation (rec {
|
|||
in flagsForLlvmConfig ++ [
|
||||
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
|
||||
"-DLLVM_INSTALL_UTILS=ON" # Needed by rustc
|
||||
"-DLLVM_BUILD_TESTS=ON"
|
||||
"-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
|
||||
"-DLLVM_ENABLE_FFI=ON"
|
||||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
|
@ -201,7 +201,8 @@ in stdenv.mkDerivation (rec {
|
|||
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
|
||||
'';
|
||||
|
||||
doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl);
|
||||
doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl)
|
||||
&& (stdenv.hostPlatform == stdenv.buildPlatform);
|
||||
|
||||
checkTarget = "check-all";
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ let
|
|||
imap (i: _: concatStringsSep "." (take i parts)) parts;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
stdenv.mkDerivation (rec {
|
||||
pname = "llvm";
|
||||
inherit version;
|
||||
|
||||
|
@ -148,7 +148,7 @@ stdenv.mkDerivation ({
|
|||
in flagsForLlvmConfig ++ [
|
||||
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
|
||||
"-DLLVM_INSTALL_UTILS=ON" # Needed by rustc
|
||||
"-DLLVM_BUILD_TESTS=ON"
|
||||
"-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
|
||||
"-DLLVM_ENABLE_FFI=ON"
|
||||
|
||||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
|
@ -226,7 +226,8 @@ stdenv.mkDerivation ({
|
|||
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
|
||||
'';
|
||||
|
||||
doCheck = stdenv.isLinux && (!stdenv.isi686);
|
||||
doCheck = stdenv.isLinux && (!stdenv.isi686)
|
||||
&& (stdenv.hostPlatform == stdenv.buildPlatform);
|
||||
|
||||
checkTarget = "check-all";
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ let
|
|||
imap (i: _: concatStringsSep "." (take i parts)) parts;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
stdenv.mkDerivation (rec {
|
||||
pname = "llvm";
|
||||
inherit version;
|
||||
|
||||
|
@ -143,7 +143,7 @@ stdenv.mkDerivation ({
|
|||
in flagsForLlvmConfig ++ [
|
||||
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
|
||||
"-DLLVM_INSTALL_UTILS=ON" # Needed by rustc
|
||||
"-DLLVM_BUILD_TESTS=ON"
|
||||
"-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
|
||||
"-DLLVM_ENABLE_FFI=ON"
|
||||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
|
@ -219,7 +219,8 @@ stdenv.mkDerivation ({
|
|||
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
|
||||
'';
|
||||
|
||||
doCheck = stdenv.isLinux && (!stdenv.isi686);
|
||||
doCheck = stdenv.isLinux && (!stdenv.isi686)
|
||||
&& (stdenv.hostPlatform == stdenv.buildPlatform);
|
||||
|
||||
checkTarget = "check-all";
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ let
|
|||
let parts = splitVersion release_version; in
|
||||
imap (i: _: concatStringsSep "." (take i parts)) parts;
|
||||
|
||||
in stdenv.mkDerivation ({
|
||||
in stdenv.mkDerivation (rec {
|
||||
pname = "llvm";
|
||||
inherit version;
|
||||
|
||||
|
@ -162,7 +162,7 @@ in stdenv.mkDerivation ({
|
|||
in flagsForLlvmConfig ++ [
|
||||
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
|
||||
"-DLLVM_INSTALL_UTILS=ON" # Needed by rustc
|
||||
"-DLLVM_BUILD_TESTS=ON"
|
||||
"-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
|
||||
"-DLLVM_ENABLE_FFI=ON"
|
||||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
|
@ -238,7 +238,8 @@ in stdenv.mkDerivation ({
|
|||
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
|
||||
'';
|
||||
|
||||
doCheck = stdenv.isLinux && (!stdenv.isx86_32);
|
||||
doCheck = stdenv.isLinux && (!stdenv.isx86_32)
|
||||
&& (stdenv.hostPlatform == stdenv.buildPlatform);
|
||||
|
||||
checkTarget = "check-all";
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ let
|
|||
shortVersion = with lib;
|
||||
concatStringsSep "." (take 1 (splitVersion release_version));
|
||||
|
||||
in stdenv.mkDerivation ({
|
||||
in stdenv.mkDerivation (rec {
|
||||
pname = "llvm";
|
||||
inherit version;
|
||||
|
||||
|
@ -156,7 +156,7 @@ in stdenv.mkDerivation ({
|
|||
in flagsForLlvmConfig ++ [
|
||||
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
|
||||
"-DLLVM_INSTALL_UTILS=ON" # Needed by rustc
|
||||
"-DLLVM_BUILD_TESTS=ON"
|
||||
"-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
|
||||
"-DLLVM_ENABLE_FFI=ON"
|
||||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
|
@ -230,7 +230,8 @@ in stdenv.mkDerivation ({
|
|||
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
|
||||
'';
|
||||
|
||||
doCheck = stdenv.isLinux && (!stdenv.isx86_32);
|
||||
doCheck = stdenv.isLinux && (!stdenv.isx86_32)
|
||||
&& (stdenv.hostPlatform == stdenv.buildPlatform);
|
||||
|
||||
checkTarget = "check-all";
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ in stdenv.mkDerivation (rec {
|
|||
in flagsForLlvmConfig ++ [
|
||||
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
|
||||
"-DLLVM_INSTALL_UTILS=ON" # Needed by rustc
|
||||
"-DLLVM_BUILD_TESTS=ON"
|
||||
"-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
|
||||
"-DLLVM_ENABLE_FFI=ON"
|
||||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
|
@ -245,7 +245,8 @@ in stdenv.mkDerivation (rec {
|
|||
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
|
||||
'';
|
||||
|
||||
doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isRiscV);
|
||||
doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isRiscV)
|
||||
&& (stdenv.hostPlatform == stdenv.buildPlatform);
|
||||
|
||||
checkTarget = "check-all";
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ in stdenv.mkDerivation (rec {
|
|||
in flagsForLlvmConfig ++ [
|
||||
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
|
||||
"-DLLVM_INSTALL_UTILS=ON" # Needed by rustc
|
||||
"-DLLVM_BUILD_TESTS=ON"
|
||||
"-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
|
||||
"-DLLVM_ENABLE_FFI=ON"
|
||||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
|
@ -193,7 +193,8 @@ in stdenv.mkDerivation (rec {
|
|||
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
|
||||
'';
|
||||
|
||||
doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl);
|
||||
doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl)
|
||||
&& (stdenv.hostPlatform == stdenv.buildPlatform);
|
||||
|
||||
checkTarget = "check-all";
|
||||
|
||||
|
|
Loading…
Reference in a new issue