Skip to content

[Clang][NFC] Fix a test failure with mold linker #122587

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 11, 2025

Conversation

zyn0217
Copy link
Contributor

@zyn0217 zyn0217 commented Jan 11, 2025

Mold prefers the suffix '$' for symbols like PLT and GOT entries, so exclude these symbols as well. Otherwise, this test will fail for developers using mold-linked Clang.

Closes #76982

Mold prefers the suffix '$' for symbols like PLT and GOT entries,
so exclude these symbols as well. Otherwise, this test will fail
for developers using mold-linked Clang
@zyn0217 zyn0217 requested a review from MaskRay January 11, 2025 09:51
@zyn0217 zyn0217 marked this pull request as ready for review January 11, 2025 09:51
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:as-a-library libclang and C++ API labels Jan 11, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 11, 2025

@llvm/pr-subscribers-clang

Author: Younan Zhang (zyn0217)

Changes

Mold prefers the suffix '$' for symbols like PLT and GOT entries, so exclude these symbols as well. Otherwise, this test will fail for developers using mold-linked Clang.

Closes #76982


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

1 Files Affected:

  • (modified) clang/test/LibClang/symbols.test (+2-2)
diff --git a/clang/test/LibClang/symbols.test b/clang/test/LibClang/symbols.test
index fd2ff8bc6cd423..e12b4c9991b811 100644
--- a/clang/test/LibClang/symbols.test
+++ b/clang/test/LibClang/symbols.test
@@ -1,6 +1,6 @@
 # Check that there are no unversioned clang symbols in libclang.so
 RUN: llvm-nm -Dj --defined-only %libclang | grep -v -e '@@LLVM_[0-9]\+$' | not grep '^clang'
 
-# Check that here are no local clang_ symbols (ignoring symbols with .cold or
+# Check that there are no local clang_ symbols (ignoring symbols with .cold or
 # .localalias suffxies.)
-RUN: llvm-nm %libclang | not grep '[a-z] clang_[^.]\+$'
+RUN: llvm-nm %libclang | not grep '[a-z] clang_[^.$]\+$'

@zyn0217 zyn0217 merged commit 77ef5a6 into llvm:main Jan 11, 2025
13 checks passed
@zyn0217 zyn0217 deleted the fix-test-for-mold branch January 11, 2025 11:17
BaiXilin pushed a commit to BaiXilin/llvm-fix-vnni-instr-types that referenced this pull request Jan 12, 2025
Mold prefers the suffix '$' for symbols like PLT and GOT entries, so
exclude these symbols as well. Otherwise, this test will fail for
developers using mold-linked Clang.

Closes llvm#76982
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:as-a-library libclang and C++ API clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Libclang/symbols.test fails on Linux when using the mold linker
3 participants