[lld] a257616 - [LLD][MachO] Do not run Mach-O tests on big-endian hosts
Ulrich Weigand via llvm-commits
llvm-commits at lists.llvm.org
Tue May 2 00:35:11 PDT 2023
Author: Ulrich Weigand
Date: 2023-05-02T09:33:16+02:00
New Revision: a257616bce1ebb2b2071ee01d7d437074a63dacc
URL: https://github.com/llvm/llvm-project/commit/a257616bce1ebb2b2071ee01d7d437074a63dacc
DIFF: https://github.com/llvm/llvm-project/commit/a257616bce1ebb2b2071ee01d7d437074a63dacc.diff
LOG: [LLD][MachO] Do not run Mach-O tests on big-endian hosts
Currently, most Mach-O tests fail when executed on a big-endian host. This is
because the Mach-O back-end does not perform the necessary byte swaps when
accessing the (little-endian) binary file format.
For now, simply consider all Mach-O tests unsupported on big-endian hosts,
to enable running the test suite at all on such hosts.
Reviewed by: oontvoo
Differential Revision: https://reviews.llvm.org/D149270
Added:
Modified:
lld/test/MachO/lit.local.cfg
Removed:
################################################################################
diff --git a/lld/test/MachO/lit.local.cfg b/lld/test/MachO/lit.local.cfg
index 929160d0c001f..08bec0a1aff19 100644
--- a/lld/test/MachO/lit.local.cfg
+++ b/lld/test/MachO/lit.local.cfg
@@ -2,6 +2,12 @@
import os
+# FIXME: The MachO back-end currently does not respect endianness when
+# accessing binary data structures, and therefore only works correctly
+# on little-endian host systems. Skip all tests on big-endian hosts.
+if sys.byteorder == 'big':
+ config.unsupported = True
+
# We specify the most commonly-used archs and platform versions in our tests
# here. Tests which need
diff erent settings can just append to this, as only
# the last value will be used.
More information about the llvm-commits
mailing list