Skip to content

Conversation

dtellenbach
Copy link
Member

ld64 issues a warning about section alignment which was counted as an unexpected exported symbol and the test failed.

Fixed by disabling all linker warnings using -Wl,-w.

ld64 issues a warning about section alignment which was counted as an
unexpected exported symbol and the test failed.

Fixed by disabling all linker warnings using -Wl,-w.
@dtellenbach dtellenbach requested a review from jroelofs March 15, 2025 03:52
@llvmbot llvmbot added compiler-rt PGO Profile Guided Optimizations labels Mar 15, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 15, 2025

@llvm/pr-subscribers-pgo

Author: David Tellenbach (dtellenbach)

Changes

ld64 issues a warning about section alignment which was counted as an unexpected exported symbol and the test failed.

Fixed by disabling all linker warnings using -Wl,-w.


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

1 Files Affected:

  • (modified) compiler-rt/test/profile/instrprof-darwin-exports.c (+3-3)
diff --git a/compiler-rt/test/profile/instrprof-darwin-exports.c b/compiler-rt/test/profile/instrprof-darwin-exports.c
index 079d5d28ed24d..1a2ac8c813272 100644
--- a/compiler-rt/test/profile/instrprof-darwin-exports.c
+++ b/compiler-rt/test/profile/instrprof-darwin-exports.c
@@ -7,13 +7,13 @@
 // just "_main" produces no warnings or errors.
 //
 // RUN: echo "_main" > %t.exports
-// RUN: %clang_pgogen -Werror -Wl,-exported_symbols_list,%t.exports -o %t %s 2>&1 | tee %t.log
-// RUN: %clang_profgen -Werror -fcoverage-mapping -Wl,-exported_symbols_list,%t.exports -o %t %s 2>&1 | tee -a %t.log
+// RUN: %clang_pgogen -Werror -Wl,-exported_symbols_list,%t.exports -Wl,-w -o %t %s 2>&1 | tee %t.log
+// RUN: %clang_profgen -Werror -fcoverage-mapping -Wl,-exported_symbols_list,%t.exports -Wl,-w -o %t %s 2>&1 | tee -a %t.log
 // RUN: cat %t.log | count 0
 
 // 2) Ditto (1), but for GCOV.
 //
-// RUN: %clang -Werror -Wl,-exported_symbols_list,%t.exports --coverage -o %t.gcov %s | tee -a %t.gcov.log
+// RUN: %clang -Werror -Wl,-exported_symbols_list,%t.exports -Wl,-w --coverage -o %t.gcov %s | tee -a %t.gcov.log
 // RUN: cat %t.gcov.log | count 0
 
 // 3) The default set of weak external symbols should match the set of symbols

@dtellenbach
Copy link
Member Author

Failing GreenDragon bot: https://green.lab.llvm.org/job/llvm.org/job/clang-stage1-RA/

@dtellenbach dtellenbach merged commit 94426df into llvm:main Mar 18, 2025
13 checks passed
@dtellenbach dtellenbach deleted the fix_instrprof-darwin-exports_x86 branch March 18, 2025 00:24
j-hui pushed a commit to j-hui/llvm-project that referenced this pull request Mar 22, 2025
…1425)

ld64 issues a warning about section alignment which was counted as an
unexpected exported symbol and the test failed.

Fixed by disabling all linker warnings using -Wl,-w.
swift-ci pushed a commit to swiftlang/llvm-project that referenced this pull request Mar 25, 2025
…1425)

ld64 issues a warning about section alignment which was counted as an
unexpected exported symbol and the test failed.

Fixed by disabling all linker warnings using -Wl,-w.

(cherry picked from commit 94426df)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler-rt PGO Profile Guided Optimizations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants