[lld] [lld-macho] Sort LC_LINKER_OPTIONS before processing (PR #201604)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 4 08:08:50 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 3130 tests passed
* 66 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### lld
<details>
<summary>lld.MachO/lc-linker-option-sort.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
rm -rf C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp; split-file C:\_work\llvm-project\llvm-project\lld\test\MachO\lc-linker-option-sort.ll C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp
# executed command: rm -rf 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp'
# note: command had no output on stdout or stderr
# executed command: split-file 'C:\_work\llvm-project\llvm-project\lld\test\MachO\lc-linker-option-sort.ll' 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 4
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -filetype=obj C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/root-a.ll -o C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/root-a.o
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -filetype=obj 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/root-a.ll' -o 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/root-a.o'
# note: command had no output on stdout or stderr
# RUN: at line 5
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -filetype=obj C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/root-b.ll -o C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/root-b.o
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -filetype=obj 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/root-b.ll' -o 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/root-b.o'
# note: command had no output on stdout or stderr
# RUN: at line 7
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -filetype=obj C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/alpha-framework.ll -o C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/alpha-framework.o
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -filetype=obj 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/alpha-framework.ll' -o 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/alpha-framework.o'
# note: command had no output on stdout or stderr
# RUN: at line 8
mkdir -p C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/Alpha.framework
# executed command: mkdir -p 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/Alpha.framework'
# note: command had no output on stdout or stderr
# RUN: at line 9
llvm-ar rcs C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/Alpha.framework/Alpha C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/alpha-framework.o
# executed command: llvm-ar rcs 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/Alpha.framework/Alpha' 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/alpha-framework.o'
# note: command had no output on stdout or stderr
# RUN: at line 11
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -filetype=obj C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/zed-framework.ll -o C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/zed-framework.o
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -filetype=obj 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/zed-framework.ll' -o 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/zed-framework.o'
# note: command had no output on stdout or stderr
# RUN: at line 12
mkdir -p C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/Zed.framework
# executed command: mkdir -p 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/Zed.framework'
# note: command had no output on stdout or stderr
# RUN: at line 13
llvm-ar rcs C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/Zed.framework/Zed C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/zed-framework.o
# executed command: llvm-ar rcs 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/Zed.framework/Zed' 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/zed-framework.o'
# note: command had no output on stdout or stderr
# RUN: at line 15
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -filetype=obj C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/mid-framework.ll -o C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/mid-framework.o
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -filetype=obj 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/mid-framework.ll' -o 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/mid-framework.o'
# note: command had no output on stdout or stderr
# RUN: at line 16
mkdir -p C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/Mid.framework
# executed command: mkdir -p 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/Mid.framework'
# note: command had no output on stdout or stderr
# RUN: at line 17
llvm-ar rcs C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/Mid.framework/Mid C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/mid-framework.o
# executed command: llvm-ar rcs 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/Mid.framework/Mid' 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/mid-framework.o'
# note: command had no output on stdout or stderr
# RUN: at line 19
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -filetype=obj C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/alib.ll -o C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/alib.o
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -filetype=obj 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/alib.ll' -o 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/alib.o'
# note: command had no output on stdout or stderr
# RUN: at line 20
llvm-ar rcs C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/libalib.a C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/alib.o
# executed command: llvm-ar rcs 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/libalib.a' 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/alib.o'
# note: command had no output on stdout or stderr
# RUN: at line 22
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -filetype=obj C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/zlib.ll -o C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/zlib.o
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -filetype=obj 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/zlib.ll' -o 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/zlib.o'
# note: command had no output on stdout or stderr
# RUN: at line 23
llvm-ar rcs C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/libzlib.a C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/zlib.o
# executed command: llvm-ar rcs 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/libzlib.a' 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/zlib.o'
# note: command had no output on stdout or stderr
# RUN: at line 25
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -filetype=obj C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/mlib.ll -o C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/mlib.o
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -filetype=obj 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/mlib.ll' -o 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/mlib.o'
# note: command had no output on stdout or stderr
# RUN: at line 26
llvm-ar rcs C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/libmlib.a C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/mlib.o
# executed command: llvm-ar rcs 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/libmlib.a' 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/mlib.o'
# note: command had no output on stdout or stderr
# RUN: at line 28
ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot C:\_work\llvm-project\llvm-project\lld\test\MachO\Inputs\MacOSX.sdk -lSystem -fatal_warnings -dylib -lSystem -FC:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp -LC:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/root-a.o C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/root-b.o -map C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/map -o C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/out
# executed command: ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot 'C:\_work\llvm-project\llvm-project\lld\test\MachO\Inputs\MacOSX.sdk' -lSystem -fatal_warnings -dylib -lSystem '-FC:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp' '-LC:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp' 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/root-a.o' 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/root-b.o' -map 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/map' -o 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/out'
# note: command had no output on stdout or stderr
# RUN: at line 30
c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\lld\test\MachO\lc-linker-option-sort.ll < C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/map
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\lld\test\MachO\lc-linker-option-sort.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\lld\test\MachO\lc-linker-option-sort.ll:37:10: error: CHECK: expected string not found in input
# | ; CHECK: Alpha.framework/Alpha(alpha-framework.o)
# | ^
# | <stdin>:7:112: note: scanning from here
# | [ 3] C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/root-b.o
# | ^
# | <stdin>:8:104: note: possible intended match here
# | [ 4] C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp\Alpha.framework\Alpha(alpha-framework.o)
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\lld\test\MachO\lc-linker-option-sort.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: # Path: C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/out
# | 2: # Arch: x86_64
# | 3: # Object files:
# | 4: [ 0] linker synthesized
# | 5: [ 1] C:\_work\llvm-project\llvm-project\lld\test\MachO\Inputs\MacOSX.sdk/usr/lib\libSystem.tbd
# | 6: [ 2] C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/root-a.o
# | 7: [ 3] C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp/root-b.o
# | check:37'0 X error: no match found
# | 8: [ 4] C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp\Alpha.framework\Alpha(alpha-framework.o)
# | check:37'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:37'1 ? possible intended match
# | 9: [ 5] C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp\Mid.framework\Mid(mid-framework.o)
# | check:37'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 10: [ 6] C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp\Zed.framework\Zed(zed-framework.o)
# | check:37'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 11: [ 7] C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp\libalib.a(alib.o)
# | check:37'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 12: [ 8] C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp\libmlib.a(mlib.o)
# | check:37'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 13: [ 9] C:\_work\llvm-project\llvm-project\build\tools\lld\test\MachO\Output\lc-linker-option-sort.ll.tmp\libzlib.a(zlib.o)
# | check:37'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/201604
More information about the llvm-commits
mailing list