WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
251989
Cocoa availability macros are not working for non-WebKit sources on buildbots
https://bugs.webkit.org/show_bug.cgi?id=251989
Summary
Cocoa availability macros are not working for non-WebKit sources on buildbots
Kimmo Kinnunen
Reported
2023-02-09 07:05:28 PST
Cocoa availability macros are not working for non-WebKit sources on buildbots After running configure-xcode-for-embedded-development, the Cocoa WebKit OpenSource SDK is left in following state: - Correct code does not build with the WebKit OpenSource SDK - Incorrect code builds with the SDK, but does not build on real, unmodified SDK This is because WebKit erases the availability macros from the SDK. Consider case: enum A { CommonOption, MacOSOption API_UNAVAILABLE(ios) }; bool correctFunc(A a) { switch (a) { case CommonOption: return true; #if defined(TARGET_OS_MAC) case MacOSOption: return false; #endif } } bool incorrectFunc(A a) { switch (a) { case CommonOption: return true; case MacOSOption: return false; } } bool incorrectAndConfusingButCompilingFunc(A a) { switch (a) { case CommonOption: return true; #if defined(TARGET_OS_MAC) case MacOSOption: return false; #endif default: UNREACHABLE(); return false; } } - correctFunc does not compile on WebKit SDK. This the bug we want to fix. - WebKit code needs to use incorrectFunc. This is the bug we want to fix. - incorrectFunc does not compile on unmodified SDK. This is the feature we want to preserve. This becomes a problem when contributing to ANGLE: - If we contribute incorrect code to ANGLE, it doesn't compile for the rest of the world. - If we contribute correct code to ANGLE, it doesn't compile for WebKit. - Currently we have to use the workaround incorrectAndConfusingButCompilingFunc
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-02-09 07:07:25 PST
<
rdar://problem/105221617
>
Kimmo Kinnunen
Comment 2
2023-02-09 07:28:05 PST
Pull request:
https://github.com/WebKit/WebKit/pull/9869
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug