summaryrefslogtreecommitdiff
path: root/lld
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2023-05-05 13:57:59 +0200
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2023-05-05 13:57:59 +0200
commit95bb95ebe44882854aeb47f8b3a6a38e775d8232 (patch)
treeeb2c9ca4b2fd84b9433b7485a320a6b4d7e717fc /lld
parent5b7f8d9da563aafc486dad6936af18489cbee880 (diff)
downloadllvm-95bb95ebe44882854aeb47f8b3a6a38e775d8232.tar.gz
[LLD][ELF] Fix compressed-debug-level test on SystemZ
The libz compression library on SystemZ by default makes use of the platform's hardware-accelerated compression facility. This is much faster than the regular software implementation, but often results in slightly different outputs. This causes failures with the compressed-debug-level test case. To fix this, set the DFLTCC environment variable to zero while running tests on SystemZ, which prevents use of hardware compression and falls back to the software implementation. Reviewed by: MaskRay Differential Revision: https://reviews.llvm.org/D149273
Diffstat (limited to 'lld')
-rw-r--r--lld/test/ELF/lit.local.cfg7
-rw-r--r--lld/test/lit.site.cfg.py.in1
2 files changed, 8 insertions, 0 deletions
diff --git a/lld/test/ELF/lit.local.cfg b/lld/test/ELF/lit.local.cfg
index 98c97b66afba..ad2cf48e40f0 100644
--- a/lld/test/ELF/lit.local.cfg
+++ b/lld/test/ELF/lit.local.cfg
@@ -1 +1,8 @@
config.suffixes = ['.test', '.s', '.ll', '.bat']
+
+# The environment variable DFLTCC=0 disables use of the hardware compression
+# facility on SystemZ. When this facility is enabled, slightly different
+# compression results can be seen, which can cause spurious failures in the
+# compressed-debug-level.test test case.
+if 's390x' in config.host_triple:
+ config.environment['DFLTCC'] = '0'
diff --git a/lld/test/lit.site.cfg.py.in b/lld/test/lit.site.cfg.py.in
index e0998ab87d47..c324b53021a1 100644
--- a/lld/test/lit.site.cfg.py.in
+++ b/lld/test/lit.site.cfg.py.in
@@ -15,6 +15,7 @@ config.errc_messages = "@LLVM_LIT_ERRC_MESSAGES@"
config.lld_obj_root = "@LLD_BINARY_DIR@"
config.lld_libs_dir = lit_config.substitute("@CURRENT_LIBS_DIR@")
config.lld_tools_dir = lit_config.substitute("@CURRENT_TOOLS_DIR@")
+config.host_triple = "@LLVM_HOST_TRIPLE@"
config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_executable = "@Python3_EXECUTABLE@"
config.have_zlib = @LLVM_ENABLE_ZLIB@