We want to generate coverage data for WebKit as input for our static analysis tool. Unfortunately, the script Tools/Scripts/generate-coverage-data fails on step 2 (calling "Tools/Scripts/build-webkit -- coverage --release"). The first issue occurs because $coverageIsEnabled is undefined when calling Tools/Scripts/check-for-weak-vtables-and-externals, as e.g. ___llvm_profile_filename has weak symbols. When explicitly defining $coverageIsEnabled in determineCoverageIsEnabled() in Tools/Scripts/webkitidirs.pm, the building continues until we hit another error when building JavaScriptCore: The following build commands failed: GenerateTAPI WebKit/WebKitBuild/Release/JavaScriptCore.framework/Versions/A/JavaScriptCore.tbd normal x86_64 (in target 'JavaScriptCore' from project 'JavaScriptCore') So we have the following questions regarding the generate-coverage-data script: 1. Is the script doing what we expect: generate coverage reports for WebKit? 2. Is the script expected to run on a MacBook (i9 or M2 MAX)? 3. Are we missing some requirements or how do we fix the issue(s) above? Best regards, Andreas
This script was last substantially updated in 2013, so I'm not sure if anyone would just know the answers. CC'ing some folks with an interest in this area though.
The mentioned issue also appears when enabling coverage for the WebKit schema in XCode. So itβs maybe a general question how coverage data is produced!?
You may want to disable tbd verification (see TAPI_VERIFY_MODE) to get past the GenerateTAPI error. Coverage must be adding exported symbols that are not part of API.
<rdar://problem/118270349>