Skip to content

[orc] Add the name of static archives to the name of their member objects #99407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

benlangmuir
Copy link
Collaborator

Changes "MyObj.o" to "/path/to/libMyLib.a(MyObj.o)".

This allows us to differentiate between objects that have the same basename but came from different archives. It also fixes a bug where if two such objects were both linked and both have initializer sections their initializer symbol would cause a duplicate symbol error.

rdar://131782514

…ects

Changes "MyObj.o" to "/path/to/libMyLib.a(MyObj.o)".

This allows us to differentiate between objects that have the same
basename but came from different archives. It also fixes a bug where if
two such objects were both linked and both have initializer sections
their initializer symbol would cause a duplicate symbol error.

rdar://131782514
@benlangmuir benlangmuir requested a review from lhames July 17, 2024 23:49
Copy link
Contributor

@lhames lhames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @benlangmuir!

@benlangmuir benlangmuir merged commit 342bd4b into llvm:main Jul 18, 2024
8 checks passed
@benlangmuir benlangmuir deleted the archive-member-duplicate-symbol branch July 18, 2024 15:54
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 18, 2024

LLVM Buildbot has detected a new failure on builder lld-x86_64-ubuntu-fast running on as-builder-4 while building llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/33/builds/947

Here is the relevant piece of the build log for the reference:

Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/RISCV/rvv/fixed-vectors-vwmul.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llc -mtriple=riscv32 -mattr=+v -verify-machineinstrs < /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vwmul.ll | /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/FileCheck /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vwmul.ll --check-prefixes=CHECK,RV32
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llc -mtriple=riscv32 -mattr=+v -verify-machineinstrs
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/FileCheck /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vwmul.ll --check-prefixes=CHECK,RV32
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vwmul.ll:890:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: vle8.v v8, (a1)
              ^
<stdin>:850:36: note: scanning from here
 vsetivli zero, 2, e16, mf4, ta, ma
                                   ^
<stdin>:851:2: note: possible intended match here
 vle8.v v8, (a0)
 ^

Input file: <stdin>
Check file: /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vwmul.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            .
            .
            .
          845:  .type vwmul_v2i16_multiuse,@function 
          846:  .variant_cc vwmul_v2i16_multiuse 
          847: vwmul_v2i16_multiuse: # @vwmul_v2i16_multiuse 
          848:  .cfi_startproc 
          849: # %bb.0: 
          850:  vsetivli zero, 2, e16, mf4, ta, ma 
next:890'0                                        X error: no match found
          851:  vle8.v v8, (a0) 
next:890'0     ~~~~~~~~~~~~~~~~~
next:890'1      ?                possible intended match
          852:  vle8.v v9, (a1) 
next:890'0     ~~~~~~~~~~~~~~~~~
          853:  vle8.v v10, (a2) 
next:890'0     ~~~~~~~~~~~~~~~~~~
          854:  vle8.v v11, (a3) 
next:890'0     ~~~~~~~~~~~~~~~~~~
          855:  vsext.vf2 v12, v8 
next:890'0     ~~~~~~~~~~~~~~~~~~~
          856:  vsext.vf2 v8, v9 
next:890'0     ~~~~~~~~~~~~~~~~~~
            .
            .
...

yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
…ects (#99407)

Changes "MyObj.o" to "/path/to/libMyLib.a(MyObj.o)".

This allows us to differentiate between objects that have the same
basename but came from different archives. It also fixes a bug where if
two such objects were both linked and both have initializer sections
their initializer symbol would cause a duplicate symbol error.

rdar://131782514
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants