summaryrefslogtreecommitdiffstats
path: root/build/build-clang/rename_gcov_flush_clang_10.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /build/build-clang/rename_gcov_flush_clang_10.patch
parentInitial commit. (diff)
downloadfirefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz
firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'build/build-clang/rename_gcov_flush_clang_10.patch')
-rw-r--r--build/build-clang/rename_gcov_flush_clang_10.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/build/build-clang/rename_gcov_flush_clang_10.patch b/build/build-clang/rename_gcov_flush_clang_10.patch
new file mode 100644
index 0000000000..1da3b653a5
--- /dev/null
+++ b/build/build-clang/rename_gcov_flush_clang_10.patch
@@ -0,0 +1,42 @@
+diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp
+index 220bc8f9835..4f7ce485777 100644
+--- a/clang/lib/Driver/ToolChains/Darwin.cpp
++++ b/clang/lib/Driver/ToolChains/Darwin.cpp
+@@ -1143,7 +1143,7 @@ void Darwin::addProfileRTLibs(const ArgList &Args,
+ // runtime's functionality.
+ if (hasExportSymbolDirective(Args)) {
+ if (ForGCOV) {
+- addExportedSymbol(CmdArgs, "___gcov_flush");
++ addExportedSymbol(CmdArgs, "___custom_llvm_gcov_flush");
+ addExportedSymbol(CmdArgs, "_flush_fn_list");
+ addExportedSymbol(CmdArgs, "_writeout_fn_list");
+ } else {
+diff --git a/compiler-rt/lib/profile/GCDAProfiling.c b/compiler-rt/lib/profile/GCDAProfiling.c
+index 498c05900bf..b7257db10e7 100644
+--- a/compiler-rt/lib/profile/GCDAProfiling.c
++++ b/compiler-rt/lib/profile/GCDAProfiling.c
+@@ -619,7 +619,7 @@ void llvm_register_flush_function(fn_ptr fn) {
+ fn_list_insert(&flush_fn_list, fn);
+ }
+
+-void __gcov_flush() {
++void __custom_llvm_gcov_flush() {
+ struct fn_node* curr = flush_fn_list.head;
+
+ while (curr) {
+diff --git a/compiler-rt/test/tsan/pthread_atfork_deadlock2.c b/compiler-rt/test/tsan/pthread_atfork_deadlock2.c
+new file mode 100644
+index 00000000000..e69de29bb2d
+diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
+index bf3e4ed3e31..37bdcfaeab8 100644
+--- a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
++++ b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
+@@ -656,7 +656,7 @@ void GCOVProfiler::AddFlushBeforeForkAndExec() {
+ for (auto I : ForkAndExecs) {
+ IRBuilder<> Builder(I);
+ FunctionType *FTy = FunctionType::get(Builder.getVoidTy(), {}, false);
+- FunctionCallee GCOVFlush = M->getOrInsertFunction("__gcov_flush", FTy);
++ FunctionCallee GCOVFlush = M->getOrInsertFunction("__custom_llvm_gcov_flush", FTy);
+ Builder.CreateCall(GCOVFlush);
+ I->getParent()->splitBasicBlock(I);
+ }