From 6efa75f3ddeaad0729a4e846a98fc1726e42f0e0 Mon Sep 17 00:00:00 2001 From: Valiantsin Dzerakh Date: Tue, 17 Nov 2026 20:12:56 +0300 Subject: [PATCH] romfs_shapes_check.py links its harness with lld, which MSYS2 UCRT64 Clang needs for LTO objects Co-Authored-By: Claude Opus 5.5 --- tests/romfs_shapes_check.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/romfs_shapes_check.py b/tests/romfs_shapes_check.py index 0a19d31e..5529a28f 100644 --- a/tests/romfs_shapes_check.py +++ b/tests/romfs_shapes_check.py @@ -164,7 +164,8 @@ def main(): source = folder / 'harness.c' source.write_text(HARNESS) exe = folder / ('harness.exe' if os.name == 'nt' else 'harness') - command = [args.cc, '-O2', '-flto', '-ffunction-sections', '-fdata-sections', '-Wl,--gc-sections', + # lld links the LTO objects: MSYS2 UCRT64 Clang's default linker (GNU ld) cannot take LLVM bitcode + command = [args.cc, '-O2', '-flto', '-fuse-ld=lld', '-ffunction-sections', '-fdata-sections', '-Wl,--gc-sections', '-I', str(folder), '-I', str(ROOT / 'runtime'), str(source), '-o', str(exe)] subprocess.run(command, check=True, cwd=ROOT) env = os.environ.copy()