Summary: | Do not link with OpenGL on Apple platforms | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Keith Rollin <krollin> | ||||
Component: | ANGLE | Assignee: | Keith Rollin <krollin> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | dino, ews-watchlist, fred.wang, graouts, kbr, kondapallykalyan, sam, simon.fraser, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 209890 | ||||||
Attachments: |
|
Description
Keith Rollin
2020-04-02 19:12:59 PDT
Created attachment 395337 [details]
Patch
Note that there are important steps to take when updating ANGLE. See http://trac.webkit.org/wiki/UpdatingANGLE Committed r259475: <https://trac.webkit.org/changeset/259475> All reviewed patches have been landed. Closing bug and clearing flags on attachment 395337 [details]. How are references to functions like CGLCreateContext resolved after this patch? (In reply to Kenneth Russell from comment #5) > How are references to functions like CGLCreateContext resolved after this > patch? Yeah. ANGLE only dynamically loads /System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib All the CGL stuff is in /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL So how did this pass tests? Oh. It's because it is linked into WebCore which links OpenGL. However, this change shouldn't have been necessary. If the new build system can't link against OpenGL, it can't build WebCore or WebKit. Did you find out what was actually causing the compiler warning? Because if it was unused functions when linking, then we also have a bunch of those in other projects. e.g. ld: warning: linking with (/System/Library/Frameworks/CoreAudio.framework/CoreAudio) but not using any symbols from it ld: warning: linking with (/System/Library/Frameworks/VideoToolbox.framework/VideoToolbox) but not using any symbols from it ld: warning: linking with (/System/Library/Frameworks/CoreMedia.framework/CoreMedia) but not using any symbols from it ld: warning: linking with (/System/Library/PrivateFrameworks/URLFormatting.framework/URLFormatting) but not using any symbols from it ld: warning: linking with (/usr/lib/libAccessibility.dylib) but not using any symbols from it (In reply to Dean Jackson from comment #8) > However, this change shouldn't have been necessary. If the new build system > can't link against OpenGL, it can't build WebCore or WebKit. It's not that it can't link against OpenGL. I'm pretty sure that it's because it can't link against an OpenGL that doesn't exist. OpenGL.framework is not in the iphonesimulator SDK. That's where the error was occurring. WebCore is able to link because it only links against OpenGL on the macOS: WebCore.xcconfig 108:WK_OPENGL_LDFLAGS_iphoneos = -framework OpenGLES; 109:WK_OPENGL_LDFLAGS_iphonesimulator = -framework OpenGLES; 114:WK_OPENGL_LDFLAGS_maccatalyst = -framework OpenGL; 115:WK_OPENGL_LDFLAGS_macosx = -framework OpenGL; Thanks for clarifying all of this. I was going crazy today trying to figure out how macOS was linking! |