diff --git a/build/build-clang/clang-8-android.json b/build/build-clang/clang-8-android.json index b8e8fa31832c..c3f1496a822b 100644 --- a/build/build-clang/clang-8-android.json +++ b/build/build-clang/clang-8-android.json @@ -47,6 +47,6 @@ "patches": [ "static-llvm-symbolizer.patch", "find_symbolizer_linux.patch", - "rename_gcov_flush_.patch" + "rename_gcov_flush.patch" ] } diff --git a/build/build-clang/clang-8-linux64.json b/build/build-clang/clang-8-linux64.json index 045de34d74c4..880bb12e7c47 100644 --- a/build/build-clang/clang-8-linux64.json +++ b/build/build-clang/clang-8-linux64.json @@ -18,7 +18,7 @@ "patches": [ "static-llvm-symbolizer.patch", "find_symbolizer_linux.patch", - "rename_gcov_flush_.patch", + "rename_gcov_flush.patch", "android-mangling-error.patch" ] } diff --git a/build/build-clang/clang-8-macosx64.json b/build/build-clang/clang-8-macosx64.json index 15743b4dad13..e81714d01318 100644 --- a/build/build-clang/clang-8-macosx64.json +++ b/build/build-clang/clang-8-macosx64.json @@ -22,6 +22,7 @@ "ld": "/builds/worker/workspace/build/src/clang/bin/clang", "patches": [ "static-llvm-symbolizer.patch", + "rename_gcov_flush.patch", "compiler-rt-cross-compile.patch", "compiler-rt-no-codesign.patch" ] diff --git a/build/build-clang/rename_gcov_flush_.patch b/build/build-clang/rename_gcov_flush.patch similarity index 65% rename from build/build-clang/rename_gcov_flush_.patch rename to build/build-clang/rename_gcov_flush.patch index 56b559d24ca6..803036da1def 100644 --- a/build/build-clang/rename_gcov_flush_.patch +++ b/build/build-clang/rename_gcov_flush.patch @@ -25,3 +25,16 @@ index 9af64ed332c..bcebe303ff4 100644 Builder.CreateCall(GCOVFlush); I->getParent()->splitBasicBlock(I); } +diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp +index e113f9a679..b3a07b18c0 100644 +--- a/clang/lib/Driver/ToolChains/Darwin.cpp ++++ b/clang/lib/Driver/ToolChains/Darwin.cpp +@@ -1058,7 +1058,7 @@ void Darwin::addProfileRTLibs(const ArgList &Args, + // runtime's functionality. + if (hasExportSymbolDirective(Args)) { + if (needsGCovInstrumentation(Args)) { +- addExportedSymbol(CmdArgs, "___gcov_flush"); ++ addExportedSymbol(CmdArgs, "___custom_llvm_gcov_flush"); + addExportedSymbol(CmdArgs, "_flush_fn_list"); + addExportedSymbol(CmdArgs, "_writeout_fn_list"); + } else {