romfs_shapes_check.py links its harness with lld, which MSYS2 UCRT64 Clang needs for LTO objects

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Valiantsin DzerakhandClaude Opus 5.5 committed 2026-11-17 20:12:56 +03:00
1 parent c781238d6d
commit 6efa75f3dd
1 file changed
+2 -1
+2 -1
View File
@@ -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()