https://github.com/j-hui created 
https://github.com/llvm/llvm-project/pull/132500

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 94426df66a8d7c2321f9e197e5ef9636b0d5ce70

>From b03be06b732890f7e9fb445d9d71aec33408ea90 Mon Sep 17 00:00:00 2001
From: David Tellenbach <dtellenb...@apple.com>
Date: Mon, 17 Mar 2025 17:23:58 -0700
Subject: [PATCH] [compiler-rt][Darwin][x86] Fix instrprof-darwin-exports test
 (#131425)

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.
---
 compiler-rt/test/profile/instrprof-darwin-exports.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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

_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to