Title: [278536] trunk/Tools
- Revision
- 278536
- Author
- [email protected]
- Date
- 2021-06-06 07:47:34 -0700 (Sun, 06 Jun 2021)
Log Message
Unexport llvm coverage symbols to fix build
<https://webkit.org/b/226684>
<rdar://problem/78906691>
Reviewed by Darin Adler.
* Scripts/check-for-weak-vtables-and-externals:
- Revert change from r278444. That fixes errors when
this script is run, but the Generate TAPI build phase
for some projects still fails due to the new weak
external symbols.
* coverage/coverage.xcconfig:
(UNEXPORTED_SYMBOL_LDFLAGS_FOR_COVERAGE): Add.
- Linker flags to unexport llvm symbols added by the
compiler for coverage.
(OTHER_LDFLAGS):
- Add $(UNEXPORTED_SYMBOL_LDFLAGS_FOR_COVERAGE) to list
of switches to unexport the symbols during linking.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (278535 => 278536)
--- trunk/Tools/ChangeLog 2021-06-06 14:44:44 UTC (rev 278535)
+++ trunk/Tools/ChangeLog 2021-06-06 14:47:34 UTC (rev 278536)
@@ -1,3 +1,24 @@
+2021-06-06 David Kilzer <[email protected]>
+
+ Unexport llvm coverage symbols to fix build
+ <https://webkit.org/b/226684>
+ <rdar://problem/78906691>
+
+ Reviewed by Darin Adler.
+
+ * Scripts/check-for-weak-vtables-and-externals:
+ - Revert change from r278444. That fixes errors when
+ this script is run, but the Generate TAPI build phase
+ for some projects still fails due to the new weak
+ external symbols.
+ * coverage/coverage.xcconfig:
+ (UNEXPORTED_SYMBOL_LDFLAGS_FOR_COVERAGE): Add.
+ - Linker flags to unexport llvm symbols added by the
+ compiler for coverage.
+ (OTHER_LDFLAGS):
+ - Add $(UNEXPORTED_SYMBOL_LDFLAGS_FOR_COVERAGE) to list
+ of switches to unexport the symbols during linking.
+
2021-06-04 Chris Dumez <[email protected]>
FileSystem::readFromFile() should return data as `void*`
Modified: trunk/Tools/Scripts/check-for-weak-vtables-and-externals (278535 => 278536)
--- trunk/Tools/Scripts/check-for-weak-vtables-and-externals 2021-06-06 14:44:44 UTC (rev 278535)
+++ trunk/Tools/Scripts/check-for-weak-vtables-and-externals 2021-06-06 14:47:34 UTC (rev 278536)
@@ -68,9 +68,6 @@
# ASan compiler-rt calls into __asan_mapping_offset and __asan_mapping_scale
next if /\b___asan/;
- # Ignore weak symbols present when compiling with coverage enabled.
- next if /\b(___llvm_profile_filename|___llvm_profile_raw_version|_lprofDirMode)/ && coverageIsEnabled();
-
if (/weak external vtable for (.*)$/) {
push @weakVTableClasses, $1;
} elsif (/weak external (.*)$/) {
Modified: trunk/Tools/coverage/coverage.xcconfig (278535 => 278536)
--- trunk/Tools/coverage/coverage.xcconfig 2021-06-06 14:44:44 UTC (rev 278535)
+++ trunk/Tools/coverage/coverage.xcconfig 2021-06-06 14:47:34 UTC (rev 278536)
@@ -1,2 +1,5 @@
+# Unexport weak external symbols from llvm coverage.
+UNEXPORTED_SYMBOL_LDFLAGS_FOR_COVERAGE = -Wl,-unexported_symbol -Wl,___llvm_profile_filename -Wl,-unexported_symbol -Wl,___llvm_profile_raw_version -Wl,-unexported_symbol -Wl,_lprofDirMode;
+
OTHER_CFLAGS = $(inherited) -fprofile-instr-generate -fcoverage-mapping;
-OTHER_LDFLAGS = $(inherited) -fprofile-instr-generate;
+OTHER_LDFLAGS = $(inherited) -fprofile-instr-generate $(UNEXPORTED_SYMBOL_LDFLAGS_FOR_COVERAGE);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes