rocmPackages.llvm: replace --replace with --replace-fail (cleanup)
This commit is contained in:
parent
e380b53037
commit
772dbad3d4
|
@ -150,7 +150,7 @@ in stdenv.mkDerivation (finalAttrs: {
|
|||
rm unittests/Support/Path.cpp
|
||||
|
||||
substituteInPlace unittests/Support/CMakeLists.txt \
|
||||
--replace "Path.cpp" ""
|
||||
--replace-fail "Path.cpp" ""
|
||||
'' + extraPostPatch;
|
||||
|
||||
doCheck = buildTests;
|
||||
|
|
|
@ -21,7 +21,7 @@ callPackage ../base.nix rec {
|
|||
ln -s ../cmake/Modules/FindLibEdit.cmake cmake/modules
|
||||
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace "include(CheckIncludeFile)" "include(CheckIncludeFile)''\nfind_package(LibEdit)"
|
||||
--replace-fail "include(CheckIncludeFile)" "include(CheckIncludeFile)''\nfind_package(LibEdit)"
|
||||
|
||||
# `No such file or directory: '/build/source/clang/tools/scan-build/bin/scan-build'`
|
||||
rm test/Analysis/scan-build/*.test
|
||||
|
|
|
@ -14,11 +14,11 @@ callPackage ../base.nix rec {
|
|||
# `Failed to match ... against ...` `Match value not within tolerance value of MPFR result:`
|
||||
# We need a better way, but I don't know enough sed magic and patching `CMakeLists.txt` isn't working...
|
||||
substituteInPlace ../libc/test/src/math/log10_test.cpp \
|
||||
--replace "i < N" "i < 0" \
|
||||
--replace "test(mpfr::RoundingMode::Nearest);" "" \
|
||||
--replace "test(mpfr::RoundingMode::Downward);" "" \
|
||||
--replace "test(mpfr::RoundingMode::Upward);" "" \
|
||||
--replace "test(mpfr::RoundingMode::TowardZero);" ""
|
||||
--replace-fail "i < N" "i < 0" \
|
||||
--replace-fail "test(mpfr::RoundingMode::Nearest);" "" \
|
||||
--replace-fail "test(mpfr::RoundingMode::Downward);" "" \
|
||||
--replace-fail "test(mpfr::RoundingMode::Upward);" "" \
|
||||
--replace-fail "test(mpfr::RoundingMode::TowardZero);" ""
|
||||
'';
|
||||
|
||||
checkTargets = [ "check-${targetName}" ];
|
||||
|
|
|
@ -68,6 +68,6 @@ wrapCCWith rec {
|
|||
|
||||
# GPU compilation uses builtin `lld`
|
||||
substituteInPlace $out/bin/{clang,clang++} \
|
||||
--replace "-MM) dontLink=1 ;;" "-MM | --cuda-device-only) dontLink=1 ;;''\n--cuda-host-only | --cuda-compile-host-device) dontLink=0 ;;"
|
||||
--replace-fail "-MM) dontLink=1 ;;" "-MM | --cuda-device-only) dontLink=1 ;;''\n--cuda-host-only | --cuda-compile-host-device) dontLink=0 ;;"
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -21,13 +21,13 @@ in callPackage ../base.nix rec {
|
|||
# `clspv` tests fail, unresolved calls
|
||||
extraPostPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace "find_program( LLVM_CLANG clang PATHS \''${LLVM_BINDIR} NO_DEFAULT_PATH )" \
|
||||
--replace-fail "find_program( LLVM_CLANG clang PATHS \''${LLVM_BINDIR} NO_DEFAULT_PATH )" \
|
||||
"find_program( LLVM_CLANG clang PATHS \"${clang}/bin\" NO_DEFAULT_PATH )" \
|
||||
--replace "find_program( LLVM_SPIRV llvm-spirv PATHS \''${LLVM_BINDIR} NO_DEFAULT_PATH )" \
|
||||
--replace-fail "find_program( LLVM_SPIRV llvm-spirv PATHS \''${LLVM_BINDIR} NO_DEFAULT_PATH )" \
|
||||
"find_program( LLVM_SPIRV llvm-spirv PATHS \"${spirv}/bin\" NO_DEFAULT_PATH )" \
|
||||
--replace " spirv-mesa3d-" "" \
|
||||
--replace " spirv64-mesa3d-" "" \
|
||||
--replace "NOT \''${t} MATCHES" \
|
||||
--replace-fail " spirv-mesa3d-" "" \
|
||||
--replace-fail " spirv64-mesa3d-" "" \
|
||||
--replace-fail "NOT \''${t} MATCHES" \
|
||||
"NOT \''${ARCH} STREQUAL \"clspv\" AND NOT \''${ARCH} STREQUAL \"clspv64\" AND NOT \''${t} MATCHES"
|
||||
'';
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ callPackage ../base.nix rec {
|
|||
extraPostPatch = ''
|
||||
# `add_library cannot create target "llvm_gtest" because an imported target with the same name already exists`
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace "EXISTS \''${UNITTEST_DIR}/googletest/include/gtest/gtest.h" "FALSE"
|
||||
--replace-fail "EXISTS \''${UNITTEST_DIR}/googletest/include/gtest/gtest.h" "FALSE"
|
||||
|
||||
# Mainly `No such file or directory`
|
||||
cat ${./1001-mlir-failing-tests.list} | xargs -d \\n rm
|
||||
|
|
|
@ -11,7 +11,7 @@ callPackage ../base.nix rec {
|
|||
extraPostPatch = ''
|
||||
# `add_library cannot create target "llvm_gtest" because an imported target with the same name already exists`
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace "NOT TARGET gtest" "FALSE"
|
||||
--replace-fail "NOT TARGET gtest" "FALSE"
|
||||
'';
|
||||
|
||||
checkTargets = [ "check-${targetName}" ];
|
||||
|
|
Loading…
Reference in New Issue