Globals with “available_externally” linkage should never be emitted into the object file corresponding to the LLVM module. However, AIX system assembler default print error for undefined reference . so AIX chose to emit the available externally symbols into .s, so that users won't run into errors in situations like: clang -target powerpc-ibm-aix -xc -<<<$'extern inline __attribute__((__gnu_inline__)) void foo() {}\nvoid bar() { foo(); }' -O -Xclang -disable-llvm-passes
Details
Details
- Reviewers
Xiangling_L DiggerLin sfertile hubert.reinterpretcast - Group Reviewers
Restricted Project - Commits
- rGb1509d067e42: [AIX] XFAIL CodeGen/Generic/externally_available.ll
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
It is not acceptable on AIX to emit references to symbols without declaring them unless if using as -u, which is less desirable than if the -u is not needed.
After:
$ clang -target powerpc-ibm-aix -xc -<<<$'extern inline __attribute__((__gnu_inline__)) void foo() {}\nvoid bar() { foo(); }' -O -Xclang -disable-llvm-passes -S -o - | grep -F foo bl .foo
Before:
bl .foo .extern .foo .extern foo[DS]
Comment Actions
Thanks for the background, given that this was done intentionally, mark the test XFAIL on AIX with comments.
Comment Actions
I think emitting only as a symbol table entry of a locally-undefined symbol is fine here. LGTM; thanks!