Skip to content

[BOLT] Pass -Wl,--build-id=none to linker in tests #122886

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
Jan 17, 2025

Conversation

nikic
Copy link
Contributor

@nikic nikic commented Jan 14, 2025

This fixes the following tests:

BOLT :: AArch64/check-init-not-moved.s
BOLT :: X86/dwarf5-dwarf4-types-backward-forward-cross-reference.test
BOLT :: X86/dwarf5-locexpr-referrence.test

When clang is compiled with -DENABLE_LINKER_BUILD_ID=ON.

This fixes the following tests:

    BOLT :: AArch64/check-init-not-moved.s
    BOLT :: X86/dwarf5-dwarf4-types-backward-forward-cross-reference.test
    BOLT :: X86/dwarf5-locexpr-referrence.test

When clang is compiled with `-DENABLE_LINKER_BUILD_ID=ON`.
@llvmbot
Copy link
Member

llvmbot commented Jan 14, 2025

@llvm/pr-subscribers-bolt

Author: Nikita Popov (nikic)

Changes

This fixes the following tests:

BOLT :: AArch64/check-init-not-moved.s
BOLT :: X86/dwarf5-dwarf4-types-backward-forward-cross-reference.test
BOLT :: X86/dwarf5-locexpr-referrence.test

When clang is compiled with -DENABLE_LINKER_BUILD_ID=ON.


Full diff: https://github.com/llvm/llvm-project/pull/122886.diff

1 Files Affected:

  • (modified) bolt/test/lit.local.cfg (+1-1)
diff --git a/bolt/test/lit.local.cfg b/bolt/test/lit.local.cfg
index e2fa0a4a2210f6..d5a6849b27a771 100644
--- a/bolt/test/lit.local.cfg
+++ b/bolt/test/lit.local.cfg
@@ -1,5 +1,5 @@
 host_linux_triple = config.target_triple.split("-")[0] + "-unknown-linux-gnu"
-common_linker_flags = "-fuse-ld=lld -Wl,--unresolved-symbols=ignore-all -pie"
+common_linker_flags = "-fuse-ld=lld -Wl,--unresolved-symbols=ignore-all -Wl,--build-id=none -pie"
 flags = f"--target={host_linux_triple} -fPIE {common_linker_flags}"
 
 config.substitutions.insert(0, ("%cflags", f"%cflags {flags}"))

Copy link
Contributor

@kwk kwk left a comment

Choose a reason for hiding this comment

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

LGTM. And it fixes the tests for me. Thank you!

@nikic nikic merged commit 320c2ee into llvm:main Jan 17, 2025
9 checks passed
@nikic nikic deleted the bolt-build-id-fixes branch January 17, 2025 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants