Bug 212428 - Update MobileMiniBrowser project settings to current Xcode
Summary: Update MobileMiniBrowser project settings to current Xcode
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kenneth Russell
URL:
Keywords: InRadar
Depends on:
Blocks: 212448 212444
  Show dependency treegraph
 
Reported: 2020-05-27 13:08 PDT by Kenneth Russell
Modified: 2020-05-27 17:29 PDT (History)
6 users (show)

See Also:


Attachments
Patch (3.80 KB, patch)
2020-05-27 13:09 PDT, Kenneth Russell
no flags Details | Formatted Diff | Diff
Patch (2.64 KB, patch)
2020-05-27 14:06 PDT, Kenneth Russell
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Russell 2020-05-27 13:08:08 PDT
Attempting to build the MobileMiniBrowser inside Xcode, after having built with:

Tools/Scripts/build-webkit --release --ios-simulator

and switching the "Run" scheme for MobileMiniBrowser to "Release", fails primarily because the legacy build system is still enabled.

Upgrading the project as recommended by Xcode resulted in some undesirable edits, such as changing the "LastUpgradeCheck" from 1000 to 1140, but there are some which look like they should be checked in.
Comment 1 Kenneth Russell 2020-05-27 13:09:54 PDT
Created attachment 400371 [details]
Patch
Comment 2 Kenneth Russell 2020-05-27 13:12:47 PDT
Without these changes, attempting to build MobileMiniBrowser in Xcode 11.4 yielded over a thousand errors trying to build JavaScriptCore:

---
Build target JavaScriptCore of project JavaScriptCore with configuration Release
Check dependencies
Processing header files with build rules is not supported by the legacy build system.
---

This is a subset of the Xcode project changes that were necessary locally to make this build successfully (had to change the SDK from "macosx.internal" to "macosx"  in a few places), but it seems these should probably be made because WebKit doesn't build in Xcode without them.
Comment 3 Dean Jackson 2020-05-27 13:17:37 PDT
Comment on attachment 400371 [details]
Patch

I think we can do all the changes to the .pbxproj file by editing the Tools/MobileMiniBrowser/Configurations/Base.xcconfig file

Add the lines

CODE_SIGN_IDENTITY = "-";
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;


Hmmm... CODE_SIGN_IDENTITY is already there. I wonder why you needed it.
Comment 4 Dean Jackson 2020-05-27 13:19:01 PDT
I also think the Base.xcconfig should have:

SDKROOT = $(SDKROOT_$(USE_INTERNAL_SDK));
SDKROOT_ = macosx;
SDKROOT_YES = macosx.internal;
Comment 5 Darin Adler 2020-05-27 13:19:11 PDT
Comment on attachment 400371 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=400371&action=review

> Tools/ChangeLog:10
> +        Take some of Xcode's recommended project changes, specifically
> +        enabling code signing, and enabling a couple of warnings and
> +        features.

Since all other build settings are in the .xcconfig file it’s a bit strange to have these in the project file. I know Xcode puts them there.

Especially the GCC_WARN_64_TO_32_BIT_CONVERSION one, which is quite like many others in Base.xcconfig.
Comment 6 Dean Jackson 2020-05-27 13:21:33 PDT
Although that SDKROOT doesn't make sense anyway, since this target is iOS only.
Comment 7 Dean Jackson 2020-05-27 13:23:26 PDT
(In reply to Darin Adler from comment #5)
> Comment on attachment 400371 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=400371&action=review
> 
> > Tools/ChangeLog:10
> > +        Take some of Xcode's recommended project changes, specifically
> > +        enabling code signing, and enabling a couple of warnings and
> > +        features.
> 
> Since all other build settings are in the .xcconfig file it’s a bit strange
> to have these in the project file. I know Xcode puts them there.
> 
> Especially the GCC_WARN_64_TO_32_BIT_CONVERSION one, which is quite like
> many others in Base.xcconfig.

Yeah. I think the important change is in the workspace settings (to use the new build system). The changes in the pbxproj that Xcode provided should all be made in Base.xcconfig.

(Although I'm still confused as to why it changed the CODE_SIGNING_IDENTITY)
Comment 8 Kenneth Russell 2020-05-27 14:06:00 PDT
Created attachment 400378 [details]
Patch
Comment 9 Kenneth Russell 2020-05-27 14:07:05 PDT
Thanks for your suggestions. Revised the patch to modify Base.xcconfig explicitly. It seems to be working - the build's proceeding on my machine.
Comment 10 EWS 2020-05-27 15:21:25 PDT
Committed r262220: <https://trac.webkit.org/changeset/262220>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 400378 [details].
Comment 11 Radar WebKit Bug Importer 2020-05-27 15:22:17 PDT
<rdar://problem/63692812>