[Webkit-unassigned] [Bug 206389] It should be possible to build JavaScriptCore with LLVM Source-based Code Coverage, run the tests and see the coverage data
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 22 02:48:46 PST 2020
https://bugs.webkit.org/show_bug.cgi?id=206389
--- Comment #14 from Tuomas Karkkainen <tuomas.webkit at apple.com> ---
(In reply to Alexey Proskuryakov from comment #12)
> > Should xcrun be replaced with xcrun --sdk macosx ?
>
> It should really be using xcodeSDK(). Even if this only supports macOS, its
> SDK can be macosx.internal. Having mismatches between macosx and
> macosx.internal was causing substantial pain for ASan in the past.
>
I made it use xcodeSDK() now. Because run-javascriptcore-tests is slightly different than the other scripts, it actually swallows --sdk <xyz> if --debug is also specified.
This solved one of the problems I was having on a specific machine with mismatched SDKs so thank you for pointing me in the right direction!
> > I'm unsure how to do that.
>
> You can add -showBuildSettings to xcodebuild invocation (as a local change
> to webkitdirs.pm) then build with and without the overrides in
> coverage.xcconfig. I expect that you'll find the coverage options added, but
> many others disappear.
>
> > The reasoning for using the ASAN_ one was because all the .xcconfig files perform "OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);"
>
> Right, ASAN adds options in this way to clearly guarantee that it is not
> overriding anything. But it's not OK to reuse the name, and also not OK to
> only do this for LDFLAGS, and not for C/C++ flags.
>
> Not all targets have it quite the way you quoted, there are multiple that
> have their own options even for LDFLAGS, and many more for C/C++.
>
> Source/ThirdParty/libwebrtc/Configurations/Base.xcconfig:OTHER_LDFLAGS =
> $(ASAN_OTHER_LDFLAGS) -fvisibility=default;
>
> Source/WebKit/Configurations/GPUService.xcconfig:OTHER_LDFLAGS =
> $(inherited) $(OTHER_LDFLAGS_VERSIONED_FRAMEWORK_PATH)
> $(WK_RELOCATABLE_FRAMEWORKS_LDFLAGS);
>
> Source/WebKit/Configurations/BaseXPCService.xcconfig:OTHER_LDFLAGS =
> $(inherited) $(OTHER_LDFLAGS_VERSIONED_FRAMEWORK_PATH)
> $(WK_RELOCATABLE_FRAMEWORKS_LDFLAGS);
>
> etc.
>
> I think that the way it works is that options are inherited for xcconfigs
> that are marked as inherited in the project, but those added on command line
> just override the variables. But I may be wrong.
I tried this and it seems to work just as it should, e.g.
> OTHER_CFLAGS = -fvisibility=default
becomes
> OTHER_CFLAGS = -fvisibility=default -fprofile-instr-generate -fcoverage-mapping
I also tried using LocalOverrides.xcconfig together with coverage and without coverage.
LocalOverrides.xcconfig does not work as I would want it to, that is, it overrides the variables, swallowing the original value completely. E.g. -fvisibility=default disappears from the above.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200122/7ab494df/attachment.htm>
More information about the webkit-unassigned
mailing list