Bug 271055 - [Xcode] Simplify code coverage builds
Summary: [Xcode] Simplify code coverage builds
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords: InRadar
Depends on: 206686
Blocks:
  Show dependency treegraph
 
Reported: 2024-03-15 07:50 PDT by David Kilzer (:ddkilzer)
Modified: 2024-03-18 08:57 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2024-03-15 07:50:56 PDT
Simplify code coverage builds when using Xcode.

Instead of specifying a path to Tools/coverage/coverage.xcconfig when building, use the CLANG_COVERAGE_MAPPING=YES Xcode variable to enable code coverage.

This does the exact same thing as the prior contents of coverage.xcconfig, but Xcode "knows" that code coverage is enabled and can make better choices about interactions with other compiler settings.

Note that compiling $WEBKIT_BUILD/Release/DerivedSources/WebCore/InternalSettingsGenerated.cpp with code coverage enables causes clang to hang indefinitely (tracked by <rdar://124640196>), so COMPILER_FLAGS="-fno-profile-instr-generate -fno-coverage-mapping" is set for that one source file until this is fixed.

<rdar://124086420>
Comment 1 David Kilzer (:ddkilzer) 2024-03-15 08:01:12 PDT
Pull request: https://github.com/WebKit/WebKit/pull/25944
Comment 2 EWS 2024-03-18 08:57:50 PDT
Committed 276273@main (ee7e9fa11501): <https://commits.webkit.org/276273@main>

Reviewed commits have been landed. Closing PR #25944 and removing active labels.