llvm*: Fix core usage in tests
lit (LLVM Integrated Tester) [0] by default uses as many threads as the build host
has cores, ignoring the user's core settings for the build.
This passes the configured core count on to lit, along with LLVM's default
settings for it which we otherwise override in the process [1].
[0]: https://www.llvm.org/docs/CommandGuide/lit.html
[1]: 329fda39c5/llvm/CMakeLists.txt (L559-L565)
This commit is contained in:
parent
cef50cde2b
commit
6c6f4a9724
11 changed files with 11 additions and 0 deletions
|
@ -179,6 +179,7 @@ in stdenv.mkDerivation (rec {
|
|||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_ENABLE_DUMP=ON"
|
||||
"-DLLVM_LIT_ARGS=-svj\${NIX_BUILD_CORES}"
|
||||
] ++ optionals enableManpages [
|
||||
"-DLLVM_BUILD_DOCS=ON"
|
||||
"-DLLVM_ENABLE_SPHINX=ON"
|
||||
|
|
|
@ -181,6 +181,7 @@ in stdenv.mkDerivation (rec {
|
|||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_ENABLE_DUMP=ON"
|
||||
"-DLLVM_LIT_ARGS=-svj\${NIX_BUILD_CORES}"
|
||||
] ++ optionals stdenv.hostPlatform.isStatic [
|
||||
# Disables building of shared libs, -fPIC is still injected by cc-wrapper
|
||||
"-DLLVM_ENABLE_PIC=OFF"
|
||||
|
|
|
@ -171,6 +171,7 @@ in stdenv.mkDerivation (rec {
|
|||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_ENABLE_DUMP=ON"
|
||||
"-DLLVM_LIT_ARGS=-svj\${NIX_BUILD_CORES}"
|
||||
] ++ optionals stdenv.hostPlatform.isStatic [
|
||||
# Disables building of shared libs, -fPIC is still injected by cc-wrapper
|
||||
"-DLLVM_ENABLE_PIC=OFF"
|
||||
|
|
|
@ -133,6 +133,7 @@ in stdenv.mkDerivation (rec {
|
|||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_ENABLE_DUMP=ON"
|
||||
"-DLLVM_LIT_ARGS=-svj\${NIX_BUILD_CORES}"
|
||||
] ++ optionals stdenv.hostPlatform.isStatic [
|
||||
# Disables building of shared libs, -fPIC is still injected by cc-wrapper
|
||||
"-DLLVM_ENABLE_PIC=OFF"
|
||||
|
|
|
@ -144,6 +144,7 @@ in stdenv.mkDerivation (rec {
|
|||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_ENABLE_DUMP=ON"
|
||||
"-DLLVM_LIT_ARGS=-svj\${NIX_BUILD_CORES}"
|
||||
] ++ optionals stdenv.hostPlatform.isStatic [
|
||||
# Disables building of shared libs, -fPIC is still injected by cc-wrapper
|
||||
"-DLLVM_ENABLE_PIC=OFF"
|
||||
|
|
|
@ -154,6 +154,7 @@ stdenv.mkDerivation (rec {
|
|||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DTARGET_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_LIT_ARGS=-svj\${NIX_BUILD_CORES}"
|
||||
]
|
||||
++ lib.optionals enableManpages [
|
||||
"-DLLVM_BUILD_DOCS=ON"
|
||||
|
|
|
@ -149,6 +149,7 @@ stdenv.mkDerivation (rec {
|
|||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly"
|
||||
"-DLLVM_ENABLE_DUMP=ON"
|
||||
"-DLLVM_LIT_ARGS=-svj\${NIX_BUILD_CORES}"
|
||||
] ++ optionals enableManpages [
|
||||
"-DLLVM_BUILD_DOCS=ON"
|
||||
"-DLLVM_ENABLE_SPHINX=ON"
|
||||
|
|
|
@ -168,6 +168,7 @@ in stdenv.mkDerivation (rec {
|
|||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly"
|
||||
"-DLLVM_ENABLE_DUMP=ON"
|
||||
"-DLLVM_LIT_ARGS=-svj\${NIX_BUILD_CORES}"
|
||||
] ++ optionals enableManpages [
|
||||
"-DLLVM_BUILD_DOCS=ON"
|
||||
"-DLLVM_ENABLE_SPHINX=ON"
|
||||
|
|
|
@ -161,6 +161,7 @@ in stdenv.mkDerivation (rec {
|
|||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_ENABLE_DUMP=ON"
|
||||
"-DLLVM_LIT_ARGS=-svj\${NIX_BUILD_CORES}"
|
||||
] ++ optionals enableManpages [
|
||||
"-DLLVM_BUILD_DOCS=ON"
|
||||
"-DLLVM_ENABLE_SPHINX=ON"
|
||||
|
|
|
@ -176,6 +176,7 @@ in stdenv.mkDerivation (rec {
|
|||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_ENABLE_DUMP=ON"
|
||||
"-DLLVM_LIT_ARGS=-svj\${NIX_BUILD_CORES}"
|
||||
] ++ optionals enableManpages [
|
||||
"-DLLVM_BUILD_DOCS=ON"
|
||||
"-DLLVM_ENABLE_SPHINX=ON"
|
||||
|
|
|
@ -130,6 +130,7 @@ in stdenv.mkDerivation (rec {
|
|||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_ENABLE_DUMP=ON"
|
||||
"-DLLVM_LIT_ARGS=-svj\${NIX_BUILD_CORES}"
|
||||
] ++ optionals stdenv.hostPlatform.isStatic [
|
||||
# Disables building of shared libs, -fPIC is still injected by cc-wrapper
|
||||
"-DLLVM_ENABLE_PIC=OFF"
|
||||
|
|
Loading…
Reference in a new issue