[Webkit-unassigned] [Bug 251989] New: Cocoa availability macros are not working for non-WebKit sources on buildbots
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Feb 9 07:05:28 PST 2023
https://bugs.webkit.org/show_bug.cgi?id=251989
Bug ID: 251989
Summary: Cocoa availability macros are not working for
non-WebKit sources on buildbots
Product: WebKit
Version: Safari Technology Preview
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Tools / Tests
Assignee: webkit-unassigned at lists.webkit.org
Reporter: kkinnunen at apple.com
CC: ap at webkit.org, jbedard at apple.com
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
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230209/28d79f0b/attachment-0001.htm>
More information about the webkit-unassigned
mailing list