Bug 189362 - [Xcode] Prefer system frameworks built into $(BUILT_PRODUCTS_DIR)/System/Library/Frameworks
Summary: [Xcode] Prefer system frameworks built into $(BUILT_PRODUCTS_DIR)/System/Libr...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-06 11:32 PDT by Daniel Bates
Modified: 2019-05-16 10:56 PDT (History)
7 users (show)

See Also:


Attachments
Patch (8.55 KB, patch)
2018-09-06 11:41 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (Does not work) (8.40 KB, patch)
2018-09-06 15:13 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.