Bug 238971

Summary: [Xcode] Avoid targeting 32-bit iOS and Mac architectures
Product: WebKit Reporter: Elliott Williams <emw>
Component: New BugsAssignee: Elliott Williams <emw>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, cdumez, dino, emw, eric.carlson, ews-watchlist, hi, jbedard, kbr, keith_miller, kondapallykalyan, mark.lam, msaboff, pangle, repstein, rniwa, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch ews-feeder: commit-queue-

Description Elliott Williams 2022-04-07 16:31:09 PDT
[Xcode] Avoid targeting 32-bit iOS and Mac architectures
Comment 1 Elliott Williams 2022-04-07 17:00:06 PDT
Created attachment 456992 [details]
Patch
Comment 2 EWS Watchlist 2022-04-07 17:01:46 PDT
Note that there are important steps to take when updating ANGLE. See https://trac.webkit.org/wiki/UpdatingANGLE
Comment 3 Radar WebKit Bug Importer 2022-04-07 17:54:24 PDT
<rdar://problem/91456235>
Comment 4 Alexey Proskuryakov 2022-04-08 09:24:48 PDT
Comment on attachment 456992 [details]
Patch

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

> Source/JavaScriptCore/ChangeLog:8
> +        Modern Xcode supports building armv7 iOS and i386 macOS, but only when targeting older OSes.

I don't think that's accurate. Looking at AppKit.tbd in the SDK of our Monterey builder, I see:

targets:         [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, 
                   arm64e-macos, arm64e-maccatalyst ]

Same with lower level stubs in the SDK, like libc++.tbd.

It does sound like there is something weird with ARCHS_STANDARD_32_64_BIT, but I feel like I'm missing most of the story.
Comment 5 Elliott Williams 2022-04-08 11:59:42 PDT
(In reply to Alexey Proskuryakov from comment #4)
> I don't think that's accurate. Looking at AppKit.tbd in the SDK of our
> Monterey builder, I see:
> 
> targets:         [ x86_64-macos, x86_64-maccatalyst, arm64-macos,
> arm64-maccatalyst, 
>                    arm64e-macos, arm64e-maccatalyst ]
> 
> Same with lower level stubs in the SDK, like libc++.tbd.
>
> It does sound like there is something weird with ARCHS_STANDARD_32_64_BIT,
> but I feel like I'm missing most of the story.

Hm...I see that _iOS_ has armv7 targets. For example, iPhoneOS15.4/System/Library/Frameworks/Foundation.framework/Foundation.tbd:

    --- !tapi-tbd
    tbd-version:     4
    targets:         [ armv7-ios, armv7s-ios, arm64-ios, arm64e-ios ]
    ...

But I'm not sure about macOS. `MacOSX Architectures.xcspec` in Xcode's Contents/PlugIns/XCBSpecifications.ideplugin bundle shows that ARCHS_STANDARD_32_64_BIT includes i386, though I'm not sure why that doesn't appear to make it into $(ARCHS) when I build locally from the workspace.
Comment 6 Alexey Proskuryakov 2022-04-08 14:53:13 PDT
Comment on attachment 456992 [details]
Patch

Building is better than failing to build though, so rs=me.

For the history, the goal here is to fix building from a workspace.
Comment 7 EWS 2022-04-08 15:57:39 PDT
Committed r292640 (249460@main): <https://commits.webkit.org/249460@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 456992 [details].