Title: [280021] trunk/Tools
Revision
280021
Author
[email protected]
Date
2021-07-18 15:59:28 -0700 (Sun, 18 Jul 2021)

Log Message

Ignore weak external symbols in clang coverage builds using check-for-weak-vtables-and-externals
<https://webkit.org/b/228063>
<rdar://problem/80477138>

Reviewed by Alexey Proskuryakov.

* Scripts/check-for-weak-vtables-and-externals:
- Ignore weak symbols from llvm when building with
  coverage enabled.  This fixes the build.
* coverage/coverage.xcconfig:
(UNEXPORTED_SYMBOL_LDFLAGS_FOR_COVERAGE): Remove.
- Can't use -unexported_symbol and -exported_symbol
  together, so remove this.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (280020 => 280021)


--- trunk/Tools/ChangeLog	2021-07-18 19:18:20 UTC (rev 280020)
+++ trunk/Tools/ChangeLog	2021-07-18 22:59:28 UTC (rev 280021)
@@ -1,3 +1,19 @@
+2021-07-18  David Kilzer  <[email protected]>
+
+        Ignore weak external symbols in clang coverage builds using check-for-weak-vtables-and-externals
+        <https://webkit.org/b/228063>
+        <rdar://problem/80477138>
+
+        Reviewed by Alexey Proskuryakov.
+
+        * Scripts/check-for-weak-vtables-and-externals:
+        - Ignore weak symbols from llvm when building with
+          coverage enabled.  This fixes the build.
+        * coverage/coverage.xcconfig:
+        (UNEXPORTED_SYMBOL_LDFLAGS_FOR_COVERAGE): Remove.
+        - Can't use -unexported_symbol and -exported_symbol
+          together, so remove this.
+
 2021-07-16  Kate Cheney  <[email protected]>
 
         WKWebView _javascript_ injection doesn't work if app includes WKAppBoundDomains

Modified: trunk/Tools/Scripts/check-for-weak-vtables-and-externals (280020 => 280021)


--- trunk/Tools/Scripts/check-for-weak-vtables-and-externals	2021-07-18 19:18:20 UTC (rev 280020)
+++ trunk/Tools/Scripts/check-for-weak-vtables-and-externals	2021-07-18 22:59:28 UTC (rev 280021)
@@ -68,6 +68,9 @@
             # 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 (280020 => 280021)


--- trunk/Tools/coverage/coverage.xcconfig	2021-07-18 19:18:20 UTC (rev 280020)
+++ trunk/Tools/coverage/coverage.xcconfig	2021-07-18 22:59:28 UTC (rev 280021)
@@ -1,5 +1,2 @@
-// 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 $(UNEXPORTED_SYMBOL_LDFLAGS_FOR_COVERAGE);
+OTHER_LDFLAGS = $(inherited) -fprofile-instr-generate;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to