Bug 189362

Summary: [Xcode] Prefer system frameworks built into $(BUILT_PRODUCTS_DIR)/System/Library/Frameworks
Product: WebKit Reporter: Daniel Bates <dbates>
Component: Tools / TestsAssignee: Daniel Bates <dbates>
Status: RESOLVED WONTFIX    
Severity: Normal CC: aestes, ap, graouts, jer.noble, lforschler, mitz, thorton
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch (Does not work) none

Description Daniel Bates 2018-09-06 11:32:14 PDT
Every so often I find myself wanting to debug UIKit and other system frameworks as part of tracking down an issue originally reported in WebKit. Although it is possible to build such system frameworks into the same build products directory as WebKit, subsequent builds of WebKit may fail due to compiler warnings (WebKit treats warnings as errors) when using headers from these frameworks. This is because Xcode treats all frameworks found in the build products directory as normal frameworks as opposed to system frameworks. I propose we establish a convention that frameworks placed under $(BUILT_PRODUCTS_DIR)/System/Library/Frameworks are treated as system frameworks and are preferred when building WebKit as a way to make it straightforward to build and debug WebKit with debug versions of other system frameworks.
Comment 1 Daniel Bates 2018-09-06 11:41:51 PDT
Created attachment 349047 [details]
Patch
Comment 2 Tim Horton 2018-09-06 14:45:14 PDT
Who builds things into $(BUILT_PRODUCTS_DIR)/System/Library/Frameworks? That's rather odd.
Comment 3 Daniel Bates 2018-09-06 15:13:33 PDT
Even better, treat all frameworks in the built product directory as system frameworks.
Comment 4 Daniel Bates 2018-09-06 15:13:54 PDT
Created attachment 349081 [details]
Patch (Does not work)
Comment 5 Daniel Bates 2018-09-06 15:39:19 PDT
(In reply to Daniel Bates from comment #3)
> Even better, treat all frameworks in the built product directory as system
> frameworks.

This does not work out :( WebKit's additional error options, such as -Wundef, are applied to headers included from other frameworks built into the build products directory.
Comment 6 Daniel Bates 2018-09-18 10:13:48 PDT
I also tried passing --system-header-prefix=< instead of adding $(BUILT_PRODUCTS_DIR)/System/Library/Frameworks to SYSTEM_FRAMEWORK_SEARCH_PATHS. This did to work.
Comment 7 Daniel Bates 2018-09-18 10:14:09 PDT
(In reply to Daniel Bates from comment #6)
> I also tried passing --system-header-prefix=< instead of adding
> $(BUILT_PRODUCTS_DIR)/System/Library/Frameworks to
> SYSTEM_FRAMEWORK_SEARCH_PATHS. This did to work.

*This did not work.
Comment 8 Daniel Bates 2019-05-15 23:04:46 PDT
I'll try to pester the LLDB folks (if I remember) to fix this issue.