Build ANGLE as a dynamic library
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Jan 2020 02:00:00 +0000 (02:00 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Jan 2020 02:00:00 +0000 (02:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=204708
rdar://57349384

Rolling this out for the 2nd time.

Source/ThirdParty/ANGLE:

- it caused issues with the shared dyld cache, because the
cache doesn't know to include the libary until it already
exists in the build
- probably related to the above, we saw some performance
regressions directly related to this change

* ANGLE.xcodeproj/project.pbxproj:
* Configurations/ANGLE.xcconfig:
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* include/CMakeLists.txt:
* include/GLSLANG/ShaderLang.h:
* include/GLSLANG/ShaderVars.h:
* src/libANGLE/renderer/gl/cgl/DisplayCGL.mm:
(rx::DisplayCGL::isValidNativeWindow const):
* src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm:
(rx::WindowSurfaceCGL::WindowSurfaceCGL):
(rx::WindowSurfaceCGL::~WindowSurfaceCGL):
* src/libANGLE/renderer/gl/eagl/DisplayEAGL.mm:
(rx::DisplayEAGL::terminate):
(rx::DisplayEAGL::isValidNativeWindow const):
(rx::WorkerContextEAGL::~WorkerContextEAGL):
* src/libANGLE/renderer/gl/eagl/WindowSurfaceEAGL.mm:
(rx::WindowSurfaceEAGL::WindowSurfaceEAGL):
(rx::WindowSurfaceEAGL::~WindowSurfaceEAGL):

Source/WebCore:

* Configurations/WebCore.xcconfig:
* Configurations/WebCoreTestSupport.xcconfig:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/ANGLEWebKitBridge.cpp:
(WebCore::ANGLEWebKitBridge::ANGLEWebKitBridge):
(WebCore::ANGLEWebKitBridge::cleanupCompilers):
(WebCore::ANGLEWebKitBridge::compileShaderSource):
(WebCore::ANGLEWebKitBridge::angleAvailable): Deleted.
* platform/graphics/ANGLEWebKitBridge.h:
* platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254551 268f45cc-cd09-0410-ab3c-d52691b4dbfc

19 files changed:
Source/ThirdParty/ANGLE/ANGLE.xcodeproj/project.pbxproj
Source/ThirdParty/ANGLE/ChangeLog
Source/ThirdParty/ANGLE/Configurations/ANGLE.xcconfig
Source/ThirdParty/ANGLE/Configurations/Base.xcconfig
Source/ThirdParty/ANGLE/Configurations/DebugRelease.xcconfig
Source/ThirdParty/ANGLE/include/CMakeLists.txt
Source/ThirdParty/ANGLE/include/GLSLANG/ShaderLang.h
Source/ThirdParty/ANGLE/include/GLSLANG/ShaderVars.h
Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/cgl/DisplayCGL.mm
Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm
Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/eagl/DisplayEAGL.mm
Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/eagl/WindowSurfaceEAGL.mm
Source/WebCore/ChangeLog
Source/WebCore/Configurations/WebCore.xcconfig
Source/WebCore/Configurations/WebCoreTestSupport.xcconfig
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp
Source/WebCore/platform/graphics/ANGLEWebKitBridge.h
Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm

index 2021ec2..ce18072 100644 (file)
                5CB301461DE39F1A00D2C405 /* VertexArrayGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CB301131DE39F1A00D2C405 /* VertexArrayGL.h */; };
                5CB3014F1DE39F4700D2C405 /* DisplayCGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CB301491DE39F4700D2C405 /* DisplayCGL.h */; };
                5CB301511DE39F4700D2C405 /* PbufferSurfaceCGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CB3014B1DE39F4700D2C405 /* PbufferSurfaceCGL.h */; };
+               5CB304921DE4156200D2C405 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CB3048D1DE4144400D2C405 /* OpenGL.framework */; };
                5CB304931DE4156B00D2C405 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CB3048F1DE4145500D2C405 /* QuartzCore.framework */; };
                5CB304941DE4157200D2C405 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CB3048B1DE4143500D2C405 /* CoreGraphics.framework */; };
                5CB304961DE4157B00D2C405 /* entry_points_egl_ext.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CB300BC1DE39E7500D2C405 /* entry_points_egl_ext.h */; settings = {ATTRIBUTES = (Public, ); }; };
                313BCE532361133900FC39E5 /* DisplayEAGL.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DisplayEAGL.mm; sourceTree = "<group>"; };
                3153ACFE239071D900D51DD8 /* WebKitTargetConditionals.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = WebKitTargetConditionals.xcconfig; sourceTree = "<group>"; };
                3153ACFF239071D900D51DD8 /* Version.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Version.xcconfig; sourceTree = "<group>"; };
-               3153AD002390C2EA00D51DD8 /* IOSurface.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOSurface.framework; path = System/Library/Frameworks/IOSurface.framework; sourceTree = SDKROOT; };
-               3153AD022390C32100D51DD8 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
                315EBD3E1FCE43BD00AC7A89 /* uniform_type_info_autogen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = uniform_type_info_autogen.cpp; sourceTree = "<group>"; };
                315EBD401FCE442600AC7A89 /* TranslatorVulkan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TranslatorVulkan.cpp; sourceTree = "<group>"; };
                315EBD431FCE442700AC7A89 /* UtilsHLSL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UtilsHLSL.cpp; sourceTree = "<group>"; };
                A3694FC423202C5100A83D8F /* BuiltinsWorkaroundGLSL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BuiltinsWorkaroundGLSL.cpp; sourceTree = "<group>"; };
                A3694FC523202C5200A83D8F /* BuiltinsWorkaroundGLSL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuiltinsWorkaroundGLSL.h; sourceTree = "<group>"; };
                A3E827A8230CAE2C00E76682 /* commit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = commit.h; sourceTree = "<group>"; };
-               FB39D0D11200F0E300088E69 /* libANGLE-shared.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libANGLE-shared.dylib"; sourceTree = BUILT_PRODUCTS_DIR; };
+               FB39D0D11200F0E300088E69 /* libANGLE.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libANGLE.a; sourceTree = BUILT_PRODUCTS_DIR; };
                FB39D2BF1200F3E600088E69 /* ShaderLang.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = ShaderLang.h; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
                        buildActionMask = 2147483647;
                        files = (
                                5CB304941DE4157200D2C405 /* CoreGraphics.framework in Frameworks */,
+                               5CB304921DE4156200D2C405 /* OpenGL.framework in Frameworks */,
                                5CB304931DE4156B00D2C405 /* QuartzCore.framework in Frameworks */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                        isa = PBXGroup;
                        children = (
                                5CB3048B1DE4143500D2C405 /* CoreGraphics.framework */,
-                               3153AD022390C32100D51DD8 /* IOKit.framework */,
-                               3153AD002390C2EA00D51DD8 /* IOSurface.framework */,
                                5CB3048D1DE4144400D2C405 /* OpenGL.framework */,
                                5CB3048F1DE4145500D2C405 /* QuartzCore.framework */,
                        );
                FB39D0CC1200EF9B00088E69 /* Products */ = {
                        isa = PBXGroup;
                        children = (
-                               FB39D0D11200F0E300088E69 /* libANGLE-shared.dylib */,
+                               FB39D0D11200F0E300088E69 /* libANGLE.a */,
                        );
                        name = Products;
                        sourceTree = "<group>";
                                312BDB0B15FECAB00097EBC7 /* CopyFiles */,
                                312BDB0D15FECACE0097EBC7 /* CopyFiles */,
                                6E28B8742294DD8000717E69 /* ShellScript */,
-                               313DE867239FFF91008FC47B /* Attempt to fool Apple Test Platform */,
                        );
                        buildRules = (
                                53E934DB230609D800DE060C /* PBXBuildRule */,
                        );
                        name = ANGLE;
                        productName = angle;
-                       productReference = FB39D0D11200F0E300088E69 /* libANGLE-shared.dylib */;
-                       productType = "com.apple.product-type.library.dynamic";
+                       productReference = FB39D0D11200F0E300088E69 /* libANGLE.a */;
+                       productType = "com.apple.product-type.library.static";
                };
 /* End PBXNativeTarget section */
 
 /* End PBXProject section */
 
 /* Begin PBXShellScriptBuildPhase section */
-               313DE867239FFF91008FC47B /* Attempt to fool Apple Test Platform */ = {
-                       isa = PBXShellScriptBuildPhase;
-                       buildActionMask = 2147483647;
-                       files = (
-                       );
-                       inputFileListPaths = (
-                       );
-                       inputPaths = (
-                       );
-                       name = "Attempt to fool Apple Test Platform";
-                       outputFileListPaths = (
-                       );
-                       outputPaths = (
-                       );
-                       runOnlyForDeploymentPostprocessing = 0;
-                       shellPath = /bin/sh;
-                       shellScript = "if [ \"$DEPLOYMENT_LOCATION\" == \"YES\" ] ; then\n    # Apple-internal build.\n    output_dir=${DSTROOT}${WK_ALTERNATE_FRAMEWORKS_DIR}/usr/local/lib\nelse\n    # External build.\n    output_dir=${BUILT_PRODUCTS_DIR}/usr/local/lib\nfi\n\nmkdir -p $output_dir\necho \"Fake file to fool Apple's test system\" > $output_dir/libANGLE.a\n";
-               };
                6E28B8742294DD8000717E69 /* ShellScript */ = {
                        isa = PBXShellScriptBuildPhase;
                        buildActionMask = 2147483647;
                        isa = XCBuildConfiguration;
                        baseConfigurationReference = 5D7C59C51208C68B001C873E /* ANGLE.xcconfig */;
                        buildSettings = {
+                               GCC_PREPROCESSOR_DEFINITIONS = (
+                                       ANGLE_ENABLE_OPENGL,
+                                       ANGLE_ENABLE_GLSL,
+                                       ANGLE_ENABLE_ESSL,
+                                       GL_SILENCE_DEPRECATION,
+                               );
+                               HEADER_SEARCH_PATHS = (
+                                       include,
+                                       src,
+                                       third_party/base,
+                                       src/common/third_party/base,
+                               );
+                               OTHER_CPLUSPLUSFLAGS = "$(ASAN_OTHER_CPLUSPLUSFLAGS)";
                        };
                        name = Production;
                };
                        isa = XCBuildConfiguration;
                        baseConfigurationReference = 5D7C59C51208C68B001C873E /* ANGLE.xcconfig */;
                        buildSettings = {
+                               GCC_PREPROCESSOR_DEFINITIONS = (
+                                       ANGLE_ENABLE_OPENGL,
+                                       ANGLE_ENABLE_GLSL,
+                                       ANGLE_ENABLE_ESSL,
+                                       GL_SILENCE_DEPRECATION,
+                               );
+                               HEADER_SEARCH_PATHS = (
+                                       include,
+                                       src,
+                                       third_party/base,
+                                       src/common/third_party/base,
+                               );
+                               OTHER_CPLUSPLUSFLAGS = "$(ASAN_OTHER_CPLUSPLUSFLAGS)";
                        };
                        name = Debug;
                };
                        isa = XCBuildConfiguration;
                        baseConfigurationReference = 5D7C59C51208C68B001C873E /* ANGLE.xcconfig */;
                        buildSettings = {
+                               GCC_PREPROCESSOR_DEFINITIONS = (
+                                       ANGLE_ENABLE_OPENGL,
+                                       ANGLE_ENABLE_GLSL,
+                                       ANGLE_ENABLE_ESSL,
+                                       GL_SILENCE_DEPRECATION,
+                               );
+                               HEADER_SEARCH_PATHS = (
+                                       include,
+                                       src,
+                                       third_party/base,
+                                       src/common/third_party/base,
+                               );
+                               OTHER_CPLUSPLUSFLAGS = "$(ASAN_OTHER_CPLUSPLUSFLAGS)";
                        };
                        name = Release;
                };
index becd4ee..6668a8c 100644 (file)
@@ -1,3 +1,37 @@
+2020-01-14  Dean Jackson  <dino@apple.com>
+
+        Build ANGLE as a dynamic library
+        https://bugs.webkit.org/show_bug.cgi?id=204708
+        rdar://57349384
+
+        Rolling this out for the 2nd time.
+
+        - it caused issues with the shared dyld cache, because the
+        cache doesn't know to include the libary until it already
+        exists in the build
+        - probably related to the above, we saw some performance
+        regressions directly related to this change
+
+        * ANGLE.xcodeproj/project.pbxproj:
+        * Configurations/ANGLE.xcconfig:
+        * Configurations/Base.xcconfig:
+        * Configurations/DebugRelease.xcconfig:
+        * include/CMakeLists.txt:
+        * include/GLSLANG/ShaderLang.h:
+        * include/GLSLANG/ShaderVars.h:
+        * src/libANGLE/renderer/gl/cgl/DisplayCGL.mm:
+        (rx::DisplayCGL::isValidNativeWindow const):
+        * src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm:
+        (rx::WindowSurfaceCGL::WindowSurfaceCGL):
+        (rx::WindowSurfaceCGL::~WindowSurfaceCGL):
+        * src/libANGLE/renderer/gl/eagl/DisplayEAGL.mm:
+        (rx::DisplayEAGL::terminate):
+        (rx::DisplayEAGL::isValidNativeWindow const):
+        (rx::WorkerContextEAGL::~WorkerContextEAGL):
+        * src/libANGLE/renderer/gl/eagl/WindowSurfaceEAGL.mm:
+        (rx::WindowSurfaceEAGL::WindowSurfaceEAGL):
+        (rx::WindowSurfaceEAGL::~WindowSurfaceEAGL):
+
 2020-01-14  Kenneth Russell  <kbr@chromium.org>
 
         Need workaround for crash in Intel OpenGL driver related to texture copying feedback loops
index 92475dc..52cd271 100644 (file)
@@ -1,44 +1,14 @@
 #include "Version.xcconfig"
 #include "WebKitTargetConditionals.xcconfig"
 
-PRODUCT_NAME = ANGLE-shared;
-
-EXECUTABLE_PREFIX = lib;
-
-ANGLE_OTHER_LDFLAGS = -allowable_client WebCore -allowable_client WebCoreTestSupport $(ANGLE_OTHER_LDFLAGS_$(WK_PLATFORM_NAME));
-ANGLE_OTHER_LDFLAGS_iphoneos = -framework IOSurface -framework OpenGLES;
-ANGLE_OTHER_LDFLAGS_iphonesimulator = $(ANGLE_OTHER_LDFLAGS_iphoneos);
-ANGLE_OTHER_LDFLAGS_watchos = $(ANGLE_OTHER_LDFLAGS_iphoneos);
-ANGLE_OTHER_LDFLAGS_watchsimulator = $(ANGLE_OTHER_LDFLAGS_iphonesimulator);
-ANGLE_OTHER_LDFLAGS_appletvos = $(ANGLE_OTHER_LDFLAGS_iphoneos);
-ANGLE_OTHER_LDFLAGS_appletvsimulator = $(ANGLE_OTHER_LDFLAGS_iphonesimulator);
-ANGLE_OTHER_LDFLAGS_maccatalyst = -framework IOKit -framework IOSurface -framework OpenGL;
-ANGLE_OTHER_LDFLAGS_macosx = -framework IOKit -framework IOSurface -framework OpenGL;
-
-INSTALL_PATH = $(NORMAL_WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Frameworks;
-INSTALL_PATH[sdk=macosx*] = $(INSTALL_PATH_USE_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
-INSTALL_PATH_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(NORMAL_WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Versions/A/Frameworks;
-INSTALL_PATH_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR);
-
-DYLIB_INSTALL_NAME_BASE[sdk=macosx*] = $(DYLIB_INSTALL_NAME_BASE_USE_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
-DYLIB_INSTALL_NAME_BASE_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(DYLIB_INSTALL_NAME_BASE_WK_RELOCATABLE_FRAMEWORKS_$(WK_RELOCATABLE_FRAMEWORKS));
-DYLIB_INSTALL_NAME_BASE_USE_OVERRIDE_FRAMEWORKS_DIR_YES = @loader_path/../../../;
-DYLIB_INSTALL_NAME_BASE_WK_RELOCATABLE_FRAMEWORKS_ = $(DYLIB_INSTALL_NAME_BASE);
-DYLIB_INSTALL_NAME_BASE_WK_RELOCATABLE_FRAMEWORKS_YES = @loader_path/../../../;
-
-HEADER_SEARCH_PATHS = include src src/common/third_party/numerics third_party/base src/common/third_party/base;
-
-ANGLE_HEADERS_FOLDER_PATH = /usr/local/include/ANGLE;
-
-PUBLIC_HEADERS_FOLDER_PATH = $(ANGLE_HEADERS_FOLDER_PATH);
-PUBLIC_HEADERS_FOLDER_PATH[sdk=macosx*] = $(PUBLIC_HEADERS_FOLDER_PATH_$(WK_PLATFORM_NAME));
-PUBLIC_HEADERS_FOLDER_PATH_macosx = $(ANGLE_HEADERS_FOLDER_PATH);
-PUBLIC_HEADERS_FOLDER_PATH_maccatalyst = $(WK_ALTERNATE_FRAMEWORKS_DIR)/$(ANGLE_HEADERS_FOLDER_PATH);
-
-USE_HEADERMAP = NO;
-
-GCC_PREPROCESSOR_DEFINITIONS = LIBGLESV2_IMPLEMENTATION LIBANGLE_IMPLEMENTATION ANGLE_ENABLE_OPENGL ANGLE_ENABLE_GLSL ANGLE_ENABLE_ESSL GL_SILENCE_DEPRECATION;
-
-INSTALLHDRS_SCRIPT_PHASE = YES;
+PRODUCT_NAME = ANGLE;
 
 APPLY_RULES_IN_COPY_HEADERS = $(USE_NEW_BUILD_SYSTEM);
+CLANG_WARN_BOOL_CONVERSION = YES;
+CLANG_WARN_ENUM_CONVERSION = YES;
+CLANG_WARN_INT_CONVERSION = YES;
+COMBINE_HIDPI_IMAGES = NO;
+ENABLE_STRICT_OBJC_MSGSEND = YES;
+HEADER_SEARCH_PATHS = include src src/common/third_party/numerics;
+INSTALL_PATH = $(ANGLE_INSTALL_PATH_PREFIX)/usr/local/lib;
+PUBLIC_HEADERS_FOLDER_PATH = $(ANGLE_INSTALL_PATH_PREFIX)/usr/local/include/ANGLE;
index a24e002..0ae54e3 100644 (file)
@@ -1,12 +1,8 @@
 #include? "../../../../../Internal/Configurations/HaveInternalSDK.xcconfig"
-#include? "<DEVELOPER_DIR>/AppleInternal/XcodeConfig/PlatformSupport.xcconfig"
 #include "SDKVariant.xcconfig"
-#include "WebKitTargetConditionals.xcconfig"
 
 CODE_SIGN_IDENTITY = -;
 
-SDKROOT = macosx.internal;
-
 USE_INTERNAL_SDK = $(USE_INTERNAL_SDK_$(CONFIGURATION));
 USE_INTERNAL_SDK_Production = YES;
 USE_INTERNAL_SDK_Debug = $(HAVE_INTERNAL_SDK);
@@ -14,33 +10,33 @@ USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
 
 ALWAYS_SEARCH_USER_PATHS = NO;
 
-CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
 CLANG_CXX_LANGUAGE_STANDARD = gnu++1z;
 CLANG_CXX_LIBRARY = libc++;
-CLANG_ENABLE_OBJC_ARC = YES;
 CLANG_ENABLE_OBJC_WEAK = YES;
 CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
 CLANG_WARN_BOOL_CONVERSION = YES;
 CLANG_WARN_COMMA = YES;
 CLANG_WARN_CONSTANT_CONVERSION = YES;
-CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
 CLANG_WARN_EMPTY_BODY = YES;
 CLANG_WARN_ENUM_CONVERSION = YES;
 CLANG_WARN_INFINITE_RECURSION = YES;
 CLANG_WARN_INT_CONVERSION = YES;
 CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
-CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
 CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
 CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
-CLANG_WARN_STRICT_PROTOTYPES = YES;
 CLANG_WARN_SUSPICIOUS_MOVE = YES;
+CLANG_WARN_STRICT_PROTOTYPES = YES;
 CLANG_WARN_UNREACHABLE_CODE = YES;
-
+CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+DEAD_CODE_STRIPPING = YES;
+DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
 GCC_C_LANGUAGE_STANDARD = gnu99;
 GCC_DEBUGGING_SYMBOLS = default;
 GCC_ENABLE_CPP_EXCEPTIONS = NO;
 GCC_ENABLE_CPP_RTTI = NO;
 GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ENABLE_STRICT_OBJC_MSGSEND = YES;
 GCC_ENABLE_SYMBOL_SEPARATION = NO;
 GCC_FAST_OBJC_DISPATCH = YES;
 GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
@@ -49,26 +45,22 @@ GCC_OBJC_CALL_CXX_CDTORS = YES;
 GCC_OPTIMIZATION_LEVEL = s;
 GCC_PRECOMPILE_PREFIX_HEADER = NO;
 GCC_SYMBOLS_PRIVATE_EXTERN = YES;
-GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 GCC_THREADSAFE_STATICS = NO;
 GCC_TREAT_WARNINGS_AS_ERRORS = YES;
 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
 GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
 GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
-GCC_WARN_ABOUT_MISSING_NEWLINE = NO;
+GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
 GCC_WARN_ABOUT_RETURN_TYPE = YES;
 GCC_WARN_UNDECLARED_SELECTOR = YES;
+CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
 GCC_WARN_UNINITIALIZED_AUTOS = YES;
 GCC_WARN_UNUSED_FUNCTION = YES;
 GCC_WARN_UNUSED_VARIABLE = YES;
-
-DEAD_CODE_STRIPPING = YES;
-DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
-ENABLE_STRICT_OBJC_MSGSEND = YES;
-
 PREBINDING = NO;
 STRIP_INSTALLED_PRODUCT = NO;
-WARNING_CFLAGS = -Wglobal-constructors -Wno-inconsistent-missing-override;
+WARNING_CFLAGS = -Wglobal-constructors -Wno-newline-eof -Wno-inconsistent-missing-override;
 
 SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx appletvos appletvsimulator watchos watchsimulator;
 
@@ -80,24 +72,11 @@ TARGET_MAC_OS_X_VERSION_MAJOR_16 = 101600;
 
 OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
 OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
-OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS) $(ANGLE_OTHER_LDFLAGS);
+OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
 
 ANGLE_INSTALL_PATH_PREFIX = $(ANGLE_INSTALL_PATH_PREFIX_DEPLOYMENT_$(DEPLOYMENT_LOCATION));
 ANGLE_INSTALL_PATH_PREFIX_DEPLOYMENT_YES = $(ANGLE_INSTALL_PATH_PREFIX_DEPLOYMENT_YES_USE_ALTERNATE_$(WK_USE_ALTERNATE_FRAMEWORKS_DIR));
-ANGLE_INSTALL_PATH_PREFIX_DEPLOYMENT_YES_USE_ALTERNATE_YES = $(WK_ALTERNATE_FRAMEWORKS_DIR);
-
-NORMAL_WEBCORE_FRAMEWORKS_DIR = $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
-NORMAL_WEBCORE_FRAMEWORKS_DIR[sdk=macosx*] = $(NORMAL_WEBCORE_FRAMEWORKS_DIR_$(WK_PLATFORM_NAME));
-NORMAL_WEBCORE_FRAMEWORKS_DIR_macosx = $(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks;
-NORMAL_WEBCORE_FRAMEWORKS_DIR_maccatalyst = $(WK_ALTERNATE_FRAMEWORKS_DIR)/$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
-
-WK_USE_OVERRIDE_FRAMEWORKS_DIR = $(WK_NOT_$(WK_EMPTY_$(WK_OVERRIDE_FRAMEWORKS_DIR)));
-
-WK_OVERRIDE_FRAMEWORKS_DIR = $(WK_OVERRIDE_FRAMEWORKS_DIR_USE_STAGING_INSTALL_PATH_$(USE_STAGING_INSTALL_PATH));
-WK_OVERRIDE_FRAMEWORKS_DIR_USE_STAGING_INSTALL_PATH_YES = $(WK_INSTALL_PATH_PREFIX)$(SYSTEM_LIBRARY_DIR)/StagedFrameworks/Safari;
-
-WK_INSTALL_PATH_PREFIX = $(WK_INSTALL_PATH_PREFIX_DEPLOYMENT_$(DEPLOYMENT_LOCATION)$(WK_MACOS_1015)_USE_STAGING_INSTALL_PATH_$(USE_STAGING_INSTALL_PATH));
-WK_INSTALL_PATH_PREFIX_DEPLOYMENT_YES_MACOS_SINCE_1015_USE_STAGING_INSTALL_PATH_YES = $(PLATFORM_OOB_SYSTEM_CONTENT_DIR);
+ANGLE_INSTALL_PATH_PREFIX_DEPLOYMENT_YES_USE_ALTERNATE_YES = $(WK_ALTERNATE_FRAMEWORKS_DIR)/;
 
 // Disable on all platforms other than macOS, due to <rdar://problem/49013399>.
 LLVM_LTO = NO;
index 48ad5ca..486b914 100644 (file)
@@ -20,8 +20,6 @@ SDKROOT = $(SDKROOT_$(USE_INTERNAL_SDK));
 SDKROOT_ = macosx;
 SDKROOT_YES = macosx.internal;
 
-WK_RELOCATABLE_FRAMEWORKS = YES;
-
 WK_DEFAULT_LTO_MODE = $(WK_USER_LTO_MODE_none);
 
 WK_CCACHE_DIR = $(SRCROOT)/../../../Tools/ccache;
index 2f6d5f7..dcea392 100644 (file)
@@ -16,7 +16,6 @@ set(khr_headers ${includes})
 list(FILTER khr_headers INCLUDE REGEX "KHR/.*")
 
 set(glslang_headers
-    export.h
     GLSLANG/ShaderLang.h
     GLSLANG/ShaderVars.h
 )
index 12b1e1a..964e937 100644 (file)
@@ -525,26 +525,26 @@ namespace sh
 // Driver must call this first, once, before doing any other compiler operations.
 // If the function succeeds, the return value is true, else false.
 //
-ANGLE_EXPORT bool Initialize();
+bool Initialize();
 //
 // Driver should call this at shutdown.
 // If the function succeeds, the return value is true, else false.
 //
-ANGLE_EXPORT bool Finalize();
+bool Finalize();
 
 //
 // Initialize built-in resources with minimum expected values.
 // Parameters:
 // resources: The object to initialize. Will be comparable with memcmp.
 //
-ANGLE_EXPORT void InitBuiltInResources(ShBuiltInResources *resources);
+void InitBuiltInResources(ShBuiltInResources *resources);
 
 //
 // Returns the a concatenated list of the items in ShBuiltInResources as a null-terminated string.
 // This function must be updated whenever ShBuiltInResources is changed.
 // Parameters:
 // handle: Specifies the handle of the compiler to be used.
-ANGLE_EXPORT const std::string &GetBuiltInResourcesString(const ShHandle handle);
+const std::string &GetBuiltInResourcesString(const ShHandle handle);
 
 //
 // Driver calls these to create and destroy compiler objects.
@@ -557,11 +557,11 @@ ANGLE_EXPORT const std::string &GetBuiltInResourcesString(const ShHandle handle)
 //         SH_HLSL_3_0_OUTPUT or SH_HLSL_4_1_OUTPUT. Note: Each output type may only
 //         be supported in some configurations.
 // resources: Specifies the built-in resources.
-ANGLE_EXPORT ShHandle ConstructCompiler(sh::GLenum type,
-                                        ShShaderSpec spec,
-                                        ShShaderOutput output,
-                                        const ShBuiltInResources *resources);
-ANGLE_EXPORT void Destruct(ShHandle handle);
+ShHandle ConstructCompiler(sh::GLenum type,
+                           ShShaderSpec spec,
+                           ShShaderOutput output,
+                           const ShBuiltInResources *resources);
+void Destruct(ShHandle handle);
 
 //
 // Compiles the given shader source.
@@ -587,35 +587,35 @@ ANGLE_EXPORT void Destruct(ShHandle handle);
 // SH_VARIABLES: Extracts attributes, uniforms, and varyings.
 //               Can be queried by calling ShGetVariableInfo().
 //
-ANGLE_EXPORT bool Compile(const ShHandle handle,
+bool Compile(const ShHandle handle,
              const char *const shaderStrings[],
              size_t numStrings,
              ShCompileOptions compileOptions);
 
 // Clears the results from the previous compilation.
-ANGLE_EXPORT void ClearResults(const ShHandle handle);
+void ClearResults(const ShHandle handle);
 
 // Return the version of the shader language.
-ANGLE_EXPORT int GetShaderVersion(const ShHandle handle);
+int GetShaderVersion(const ShHandle handle);
 
 // Return the currently set language output type.
-ANGLE_EXPORT ShShaderOutput GetShaderOutputType(const ShHandle handle);
+ShShaderOutput GetShaderOutputType(const ShHandle handle);
 
 // Returns null-terminated information log for a compiled shader.
 // Parameters:
 // handle: Specifies the compiler
-ANGLE_EXPORT const std::string &GetInfoLog(const ShHandle handle);
+const std::string &GetInfoLog(const ShHandle handle);
 
 // Returns null-terminated object code for a compiled shader.
 // Parameters:
 // handle: Specifies the compiler
-ANGLE_EXPORT const std::string &GetObjectCode(const ShHandle handle);
+const std::string &GetObjectCode(const ShHandle handle);
 
 // Returns a (original_name, hash) map containing all the user defined names in the shader,
 // including variable names, function names, struct names, and struct field names.
 // Parameters:
 // handle: Specifies the compiler
-ANGLE_EXPORT const std::map<std::string, std::string> *GetNameHashingMap(const ShHandle handle);
+const std::map<std::string, std::string> *GetNameHashingMap(const ShHandle handle);
 
 // Shader variable inspection.
 // Returns a pointer to a list of variables of the designated type.
@@ -623,19 +623,19 @@ ANGLE_EXPORT const std::map<std::string, std::string> *GetNameHashingMap(const S
 // Returns NULL on failure.
 // Parameters:
 // handle: Specifies the compiler
-ANGLE_EXPORT const std::vector<sh::ShaderVariable> *GetUniforms(const ShHandle handle);
-ANGLE_EXPORT const std::vector<sh::ShaderVariable> *GetVaryings(const ShHandle handle);
-ANGLE_EXPORT const std::vector<sh::ShaderVariable> *GetInputVaryings(const ShHandle handle);
-ANGLE_EXPORT const std::vector<sh::ShaderVariable> *GetOutputVaryings(const ShHandle handle);
-ANGLE_EXPORT const std::vector<sh::ShaderVariable> *GetAttributes(const ShHandle handle);
-ANGLE_EXPORT const std::vector<sh::ShaderVariable> *GetOutputVariables(const ShHandle handle);
-ANGLE_EXPORT const std::vector<sh::InterfaceBlock> *GetInterfaceBlocks(const ShHandle handle);
-ANGLE_EXPORT const std::vector<sh::InterfaceBlock> *GetUniformBlocks(const ShHandle handle);
-ANGLE_EXPORT const std::vector<sh::InterfaceBlock> *GetShaderStorageBlocks(const ShHandle handle);
-ANGLE_EXPORT sh::WorkGroupSize GetComputeShaderLocalGroupSize(const ShHandle handle);
+const std::vector<sh::ShaderVariable> *GetUniforms(const ShHandle handle);
+const std::vector<sh::ShaderVariable> *GetVaryings(const ShHandle handle);
+const std::vector<sh::ShaderVariable> *GetInputVaryings(const ShHandle handle);
+const std::vector<sh::ShaderVariable> *GetOutputVaryings(const ShHandle handle);
+const std::vector<sh::ShaderVariable> *GetAttributes(const ShHandle handle);
+const std::vector<sh::ShaderVariable> *GetOutputVariables(const ShHandle handle);
+const std::vector<sh::InterfaceBlock> *GetInterfaceBlocks(const ShHandle handle);
+const std::vector<sh::InterfaceBlock> *GetUniformBlocks(const ShHandle handle);
+const std::vector<sh::InterfaceBlock> *GetShaderStorageBlocks(const ShHandle handle);
+sh::WorkGroupSize GetComputeShaderLocalGroupSize(const ShHandle handle);
 // Returns the number of views specified through the num_views layout qualifier. If num_views is
 // not set, the function returns -1.
-ANGLE_EXPORT int GetVertexShaderNumViews(const ShHandle handle);
+int GetVertexShaderNumViews(const ShHandle handle);
 
 // Returns true if the passed in variables pack in maxVectors followingthe packing rules from the
 // GLSL 1.017 spec, Appendix A, section 7.
@@ -644,8 +644,8 @@ ANGLE_EXPORT int GetVertexShaderNumViews(const ShHandle handle);
 // Parameters:
 // maxVectors: the available rows of registers.
 // variables: an array of variables.
-ANGLE_EXPORT bool CheckVariablesWithinPackingLimits(int maxVectors,
-                                                    const std::vector<sh::ShaderVariable> &variables);
+bool CheckVariablesWithinPackingLimits(int maxVectors,
+                                       const std::vector<sh::ShaderVariable> &variables);
 
 // Gives the compiler-assigned register for a shader storage block.
 // The method writes the value to the output variable "indexOut".
@@ -654,9 +654,9 @@ ANGLE_EXPORT bool CheckVariablesWithinPackingLimits(int maxVectors,
 // handle: Specifies the compiler
 // shaderStorageBlockName: Specifies the shader storage block
 // indexOut: output variable that stores the assigned register
-ANGLE_EXPORT bool GetShaderStorageBlockRegister(const ShHandle handle,
-                                                const std::string &shaderStorageBlockName,
-                                                unsigned int *indexOut);
+bool GetShaderStorageBlockRegister(const ShHandle handle,
+                                   const std::string &shaderStorageBlockName,
+                                   unsigned int *indexOut);
 
 // Gives the compiler-assigned register for a uniform block.
 // The method writes the value to the output variable "indexOut".
@@ -665,13 +665,13 @@ ANGLE_EXPORT bool GetShaderStorageBlockRegister(const ShHandle handle,
 // handle: Specifies the compiler
 // uniformBlockName: Specifies the uniform block
 // indexOut: output variable that stores the assigned register
-ANGLE_EXPORT bool GetUniformBlockRegister(const ShHandle handle,
-                                          const std::string &uniformBlockName,
-                                          unsigned int *indexOut);
+bool GetUniformBlockRegister(const ShHandle handle,
+                             const std::string &uniformBlockName,
+                             unsigned int *indexOut);
 
 // Gives a map from uniform names to compiler-assigned registers in the default uniform block.
 // Note that the map contains also registers of samplers that have been extracted from structs.
-ANGLE_EXPORT const std::map<std::string, unsigned int> *GetUniformRegisterMap(const ShHandle handle);
+const std::map<std::string, unsigned int> *GetUniformRegisterMap(const ShHandle handle);
 
 // Sampler, image and atomic counters share registers(t type and u type),
 // GetReadonlyImage2DRegisterIndex and GetImage2DRegisterIndex return the first index into
index 4478aee..e2a67a2 100644 (file)
@@ -10,8 +10,6 @@
 #ifndef GLSLANG_SHADERVARS_H_
 #define GLSLANG_SHADERVARS_H_
 
-#include "export.h"
-
 #include <algorithm>
 #include <array>
 #include <string>
@@ -64,12 +62,12 @@ enum class BlockType
 // See https://code.google.com/p/angleproject/issues/detail?id=697
 struct ShaderVariable
 {
-    ANGLE_EXPORT ShaderVariable();
+    ShaderVariable();
     ShaderVariable(GLenum typeIn);
     ShaderVariable(GLenum typeIn, unsigned int arraySizeIn);
-    ANGLE_EXPORT ~ShaderVariable();
-    ANGLE_EXPORT ShaderVariable(const ShaderVariable &other);
-    ANGLE_EXPORT ShaderVariable &operator=(const ShaderVariable &other);
+    ~ShaderVariable();
+    ShaderVariable(const ShaderVariable &other);
+    ShaderVariable &operator=(const ShaderVariable &other);
     bool operator==(const ShaderVariable &other) const;
     bool operator!=(const ShaderVariable &other) const { return !operator==(other); }
 
index 1482139..cd8a6ca 100644 (file)
@@ -292,7 +292,7 @@ egl::Error DisplayCGL::restoreLostDevice(const egl::Display *display)
 
 bool DisplayCGL::isValidNativeWindow(EGLNativeWindowType window) const
 {
-    NSObject *layer = (__bridge NSObject *)window;
+    NSObject *layer = reinterpret_cast<NSObject *>(window);
     return [layer isKindOfClass:[CALayer class]];
 }
 
index 9c49818..54d8320 100644 (file)
@@ -153,7 +153,7 @@ WindowSurfaceCGL::WindowSurfaceCGL(const egl::SurfaceState &state,
     : SurfaceGL(state),
       mSwapLayer(nil),
       mCurrentSwapId(0),
-      mLayer((__bridge CALayer *)layer),
+      mLayer(reinterpret_cast<CALayer *>(layer)),
       mContext(context),
       mFunctions(renderer->getFunctions()),
       mStateManager(renderer->getStateManager()),
@@ -175,6 +175,7 @@ WindowSurfaceCGL::~WindowSurfaceCGL()
     if (mSwapLayer != nil)
     {
         [mSwapLayer removeFromSuperlayer];
+        [mSwapLayer release];
         mSwapLayer = nil;
     }
 
index 42b6cff..15d9904 100644 (file)
@@ -129,6 +129,7 @@ void DisplayEAGL::terminate()
     if (mContext != nullptr)
     {
         [EAGLContext setCurrentContext:nil];
+        [mContext release];
         mContext = nullptr;
     }
 }
@@ -259,7 +260,7 @@ egl::Error DisplayEAGL::restoreLostDevice(const egl::Display *display)
 
 bool DisplayEAGL::isValidNativeWindow(EGLNativeWindowType window) const
 {
-    NSObject *layer = (__bridge NSObject *)window;
+    NSObject *layer = reinterpret_cast<NSObject *>(window);
     return [layer isKindOfClass:[CALayer class]];
 }
 
@@ -350,6 +351,7 @@ WorkerContextEAGL::WorkerContextEAGL(EAGLContextObj context) : mContext(context)
 WorkerContextEAGL::~WorkerContextEAGL()
 {
     [EAGLContext setCurrentContext:nil];
+    [mContext release];
     mContext = nullptr;
 }
 
index fd9d537..65f3eb7 100644 (file)
@@ -138,7 +138,7 @@ WindowSurfaceEAGL::WindowSurfaceEAGL(const egl::SurfaceState &state,
     : SurfaceGL(state),
       mSwapLayer(nil),
       mCurrentSwapId(0),
-      mLayer((__bridge CALayer *)layer),
+      mLayer(reinterpret_cast<CALayer *>(layer)),
       mContext(context),
       mFunctions(renderer->getFunctions()),
       mStateManager(renderer->getStateManager()),
@@ -160,6 +160,7 @@ WindowSurfaceEAGL::~WindowSurfaceEAGL()
     if (mSwapLayer != nil)
     {
         [mSwapLayer removeFromSuperlayer];
+        [mSwapLayer release];
         mSwapLayer = nil;
     }
 
index d360931..b1048f2 100644 (file)
@@ -1,3 +1,23 @@
+2020-01-14  Dean Jackson  <dino@apple.com>
+
+        Build ANGLE as a dynamic library
+        https://bugs.webkit.org/show_bug.cgi?id=204708
+        rdar://57349384
+
+        Rolling this out for the 2nd time.
+
+        * Configurations/WebCore.xcconfig:
+        * Configurations/WebCoreTestSupport.xcconfig:
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/graphics/ANGLEWebKitBridge.cpp:
+        (WebCore::ANGLEWebKitBridge::ANGLEWebKitBridge):
+        (WebCore::ANGLEWebKitBridge::cleanupCompilers):
+        (WebCore::ANGLEWebKitBridge::compileShaderSource):
+        (WebCore::ANGLEWebKitBridge::angleAvailable): Deleted.
+        * platform/graphics/ANGLEWebKitBridge.h:
+        * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
+        (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):
+
 2020-01-14  Said Abou-Hallawa  <sabouhallawa@apple.com>
 
         Supported mime types for encoding should be supported mime types for loading
index 4e448ff..a0add2a 100644 (file)
@@ -39,12 +39,12 @@ FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR);
 
 SYSTEM_FRAMEWORK_SEARCH_PATHS = $(inherited) $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks
 
-WK_EMBEDDED_LIBRARY_DIR = $(WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Frameworks
-WK_EMBEDDED_LIBRARY_DIR[sdk=macosx*] = $(WK_EMBEDDED_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
-WK_EMBEDDED_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR);
-WK_EMBEDDED_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Versions/A/Frameworks;
+WK_LIBWEBRTC_LIBRARY_DIR = $(WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Frameworks
+WK_LIBWEBRTC_LIBRARY_DIR[sdk=macosx*] = $(WK_LIBWEBRTC_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
+WK_LIBWEBRTC_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Versions/A/Frameworks;
+WK_LIBWEBRTC_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR);
 
-LIBRARY_SEARCH_PATHS = $(inherited) "$(WK_EMBEDDED_LIBRARY_DIR)";
+LIBRARY_SEARCH_PATHS = $(inherited) "$(WK_LIBWEBRTC_LIBRARY_DIR)";
 
 WEBKITADDITIONS_HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include/WebKitAdditions $(SDKROOT)/usr/local/include/WebKitAdditions;
 ANGLE_HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include/ANGLE $(SDKROOT)/usr/local/include/ANGLE;
@@ -95,8 +95,6 @@ WK_IOSURFACE_ACCELERATOR_LDFLAGS_iphoneos = -framework IOSurfaceAccelerator;
 WK_IOSURFACE_ACCELERATOR_LDFLAGS_watchos = $(WK_IOSURFACE_ACCELERATOR_LDFLAGS_iphoneos);
 WK_IOSURFACE_ACCELERATOR_LDFLAGS_appletvos = $(WK_IOSURFACE_ACCELERATOR_LDFLAGS_iphoneos);
 
-WK_ANGLE_LDFLAGS = -weak-lANGLE-shared;
-
 WK_LIBWEBRTC_LDFLAGS = $(WK_LIBWEBRTC_LDFLAGS_$(ENABLE_WEB_RTC));
 WK_LIBWEBRTC_LDFLAGS_ENABLE_WEB_RTC = -framework VideoToolbox -framework CoreMedia -weak-lwebrtc;
 
@@ -127,7 +125,7 @@ WK_URL_FORMATTING_LDFLAGS = $(WK_URL_FORMATTING_LDFLAGS_$(WK_HAVE_URL_FORMATTING
 WK_URL_FORMATTING_LDFLAGS_YES = -framework URLFormatting;
 
 // FIXME: Reduce the number of allowable_clients <rdar://problem/31823969>
-OTHER_LDFLAGS = $(inherited) $(WK_RELOCATABLE_FRAMEWORK_LDFLAGS) $(WK_UNDEFINED_SYMBOLS_LDFLAGS) -lsqlite3 -lobjc -allowable_client WebCoreTestSupport -allowable_client WebKitLegacy -force_load $(BUILT_PRODUCTS_DIR)/libPAL.a -framework CFNetwork -framework CoreAudio -framework CoreGraphics -framework CoreText -framework Foundation -framework IOSurface -framework ImageIO -framework Metal $(OTHER_LDFLAGS_PLATFORM_$(WK_COCOA_TOUCH)) $(OTHER_LDFLAGS_PLATFORM_$(WK_PLATFORM_NAME)) $(WK_APPKIT_LDFLAGS) $(WK_APPSUPPORT_LDFLAGS) $(WK_AUDIO_UNIT_LDFLAGS) $(WK_CARBON_LDFLAGS) $(WK_CORE_UI_LDFLAGS) $(WK_DATA_DETECTORS_CORE_LDFLAGS) $(WK_GRAPHICS_SERVICES_LDFLAGS) $(WK_IOSURFACE_ACCELERATOR_LDFLAGS) $(WK_ANGLE_LDFLAGS) $(WK_LIBWEBRTC_LDFLAGS) $(WK_MOBILE_CORE_SERVICES_LDFLAGS) $(WK_MOBILE_GESTALT_LDFLAGS) $(WK_OPENGL_LDFLAGS) $(WK_SYSTEM_CONFIGURATION_LDFLAGS) $(WK_SYSTEM_PREVIEW_LDFLAGS) $(WK_URL_FORMATTING_LDFLAGS);
+OTHER_LDFLAGS = $(inherited) $(WK_RELOCATABLE_FRAMEWORK_LDFLAGS) $(WK_UNDEFINED_SYMBOLS_LDFLAGS) -lsqlite3 -lobjc -lANGLE -allowable_client WebCoreTestSupport -allowable_client WebKitLegacy -force_load $(BUILT_PRODUCTS_DIR)/libPAL.a -framework CFNetwork -framework CoreAudio -framework CoreGraphics -framework CoreText -framework Foundation -framework IOSurface -framework ImageIO -framework Metal $(OTHER_LDFLAGS_PLATFORM_$(WK_COCOA_TOUCH)) $(OTHER_LDFLAGS_PLATFORM_$(WK_PLATFORM_NAME)) $(WK_APPKIT_LDFLAGS) $(WK_APPSUPPORT_LDFLAGS) $(WK_AUDIO_UNIT_LDFLAGS) $(WK_CARBON_LDFLAGS) $(WK_CORE_UI_LDFLAGS) $(WK_DATA_DETECTORS_CORE_LDFLAGS) $(WK_GRAPHICS_SERVICES_LDFLAGS) $(WK_IOSURFACE_ACCELERATOR_LDFLAGS) $(WK_LIBWEBRTC_LDFLAGS) $(WK_MOBILE_CORE_SERVICES_LDFLAGS) $(WK_MOBILE_GESTALT_LDFLAGS) $(WK_OPENGL_LDFLAGS) $(WK_SYSTEM_CONFIGURATION_LDFLAGS) $(WK_SYSTEM_PREVIEW_LDFLAGS) $(WK_URL_FORMATTING_LDFLAGS);
 
 OTHER_LDFLAGS_PLATFORM_cocoatouch = -allowable_client WebKit -allowable_client iTunesU -allowable_client Casablanca -allowable_client Remote -allowable_client TVBooks -allowable_client DumpRenderTree -allowable_client WebKitTestRunner -allowable_client TestWebKitAPI;
 OTHER_LDFLAGS_PLATFORM_macosx = -sub_library libobjc -umbrella WebKit;
@@ -141,9 +139,7 @@ SECTORDER_FLAGS_Production[sdk=iphoneos*] = -Wl,-order_file,$(SDKROOT)/AppleInte
 SECTORDER_FLAGS_Production[sdk=macosx*] = -Wl,-order_file,WebCore.order;
 
 NORMAL_WEBCORE_FRAMEWORKS_DIR[sdk=iphone*] = $(PRODUCTION_FRAMEWORKS_DIR);
-NORMAL_WEBCORE_FRAMEWORKS_DIR[sdk=macosx*] = $(NORMAL_WEBCORE_FRAMEWORKS_DIR_$(WK_PLATFORM_NAME));
-NORMAL_WEBCORE_FRAMEWORKS_DIR_macosx = $(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks;
-NORMAL_WEBCORE_FRAMEWORKS_DIR_maccatalyst = $(WK_ALTERNATE_FRAMEWORKS_DIR)/$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
+NORMAL_WEBCORE_FRAMEWORKS_DIR[sdk=macosx*] = $(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks;
 
 WEBCORE_FRAMEWORKS_DIR = $(WEBCORE_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
 WEBCORE_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(NORMAL_WEBCORE_FRAMEWORKS_DIR);
index 83d0acf..5d17c3d 100644 (file)
@@ -48,8 +48,6 @@ DYLIB_INSTALL_NAME_BASE_Production = $(INSTALL_PATH);
 DYLIB_INSTALL_NAME_BASE_Debug = @rpath;
 DYLIB_INSTALL_NAME_BASE_Release = $(DYLIB_INSTALL_NAME_BASE_Debug);
 
-ANGLE_LDFLAGS = -weak-lANGLE-shared;
-
 LIBWEBRTC_LDFLAGS = $(LIBWEBRTC_LDFLAGS_$(ENABLE_WEB_RTC));
 LIBWEBRTC_LDFLAGS_ = ;
 LIBWEBRTC_LDFLAGS_ENABLE_WEB_RTC = -weak-lwebrtc;
@@ -58,10 +56,9 @@ PRODUCT_NAME = WebCoreTestSupport;
 EXECUTABLE_PREFIX = lib;
 EXPORTED_SYMBOLS_FILE = ;
 GCC_SYMBOLS_PRIVATE_EXTERN = YES;
+OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
+OTHER_LDFLAGS[sdk=macos*] = $(ASAN_OTHER_LDFLAGS) -framework AppKit $(LIBWEBRTC_LDFLAGS);
 
-OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS) $(ANGLE_LDFLAGS);
-OTHER_LDFLAGS[sdk=macos*] = $(ASAN_OTHER_LDFLAGS) -framework AppKit $(LIBWEBRTC_LDFLAGS) $(ANGLE_LDFLAGS);
-OTHER_LDFLAGS[sdk=iphoneos*] = $(ASAN_OTHER_LDFLAGS) -lAccessibility $(LIBWEBRTC_LDFLAGS) $(ANGLE_LDFLAGS);
-OTHER_LDFLAGS[sdk=iphonesimulator*] = $(ASAN_OTHER_LDFLAGS) -lAccessibility $(LIBWEBRTC_LDFLAGS) $(ANGLE_LDFLAGS);
-
+OTHER_LDFLAGS[sdk=iphoneos*] = $(ASAN_OTHER_LDFLAGS) -lAccessibility $(LIBWEBRTC_LDFLAGS);
+OTHER_LDFLAGS[sdk=iphonesimulator*] = $(ASAN_OTHER_LDFLAGS) -lAccessibility $(LIBWEBRTC_LDFLAGS);
 SECT_ORDER_FLAGS = ;
index e05536f..fc1b0fc 100644 (file)
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                        shellPath = /bin/sh;
-                       shellScript = "if [[ ${WK_PLATFORM_NAME} != \"macosx\" && ${WK_PLATFORM_NAME} != \"maccatalyst\" ]]; then\n    exit 0\nfi\n\nif [[ ${WK_USE_OVERRIDE_FRAMEWORKS_DIR} == \"YES\" ]]; then\n    exit 0\nfi\n\n# ENABLE_WEB_RTC cannot be relied on because of its conditionals.\nif [[ ${CONFIGURATION} == \"Production\" && ${TARGET_MAC_OS_X_VERSION_MAJOR} < 101300 ]]; then\n    exit 0\nfi\n\nln -shf Versions/Current/Frameworks \"$TARGET_BUILD_DIR/WebCore.framework/Frameworks\"\n";
+                       shellScript = "if [[ ${WK_PLATFORM_NAME} != \"macosx\" ]]; then\n    exit 0\nfi\n\nif [[ ${WK_USE_OVERRIDE_FRAMEWORKS_DIR} == \"YES\" ]]; then\n    exit 0\nfi\n\n# ENABLE_WEB_RTC cannot be relied on because of its conditionals.\nif [[ ${CONFIGURATION} == \"Production\" && ${TARGET_MAC_OS_X_VERSION_MAJOR} < 101300 ]]; then\n    exit 0\nfi\n\nln -shf Versions/Current/Frameworks \"$TARGET_BUILD_DIR/WebCore.framework/Frameworks\"\n";
                };
                DD041FBD09D9DDBE0010AF2A /* Generate Derived Sources */ = {
                        isa = PBXShellScriptBuildPhase;
index 8927aac..6240d59 100644 (file)
 #include "Logging.h"
 #include <wtf/StdLibExtras.h>
 
-#if PLATFORM(COCOA)
-#include <wtf/darwin/WeakLinking.h>
-#endif
-
 namespace WebCore {
 
 // FIXME: This is awful. Get rid of ANGLEWebKitBridge completely and call the libANGLE API directly to validate shaders.
@@ -135,10 +131,6 @@ ANGLEWebKitBridge::ANGLEWebKitBridge(ShShaderOutput shaderOutput, ShShaderSpec s
     , m_shaderOutput(shaderOutput)
     , m_shaderSpec(shaderSpec)
 {
-    ASSERT(angleAvailable());
-    if (!angleAvailable())
-        return;
-
     // This is a no-op if it's already initialized.
     sh::Initialize();
 }
@@ -150,10 +142,6 @@ ANGLEWebKitBridge::~ANGLEWebKitBridge()
 
 void ANGLEWebKitBridge::cleanupCompilers()
 {
-    ASSERT(ANGLEWebKitBridge::angleAvailable());
-    if (!ANGLEWebKitBridge::angleAvailable())
-        return;
-
     if (m_fragmentCompiler)
         sh::Destruct(m_fragmentCompiler);
     m_fragmentCompiler = nullptr;
@@ -174,10 +162,6 @@ void ANGLEWebKitBridge::setResources(const ShBuiltInResources& resources)
 
 bool ANGLEWebKitBridge::compileShaderSource(const char* shaderSource, ANGLEShaderType shaderType, String& translatedShaderSource, String& shaderValidationLog, Vector<std::pair<ANGLEShaderSymbolType, sh::ShaderVariable>>& symbols, uint64_t extraCompileOptions)
 {
-    ASSERT(ANGLEWebKitBridge::angleAvailable());
-    if (!ANGLEWebKitBridge::angleAvailable())
-        return false;
-
     if (!builtCompilers) {
         m_fragmentCompiler = sh::ConstructCompiler(GL_FRAGMENT_SHADER, m_shaderSpec, m_shaderOutput, &m_resources);
         m_vertexCompiler = sh::ConstructCompiler(GL_VERTEX_SHADER, m_shaderSpec, m_shaderOutput, &m_resources);
@@ -220,15 +204,6 @@ bool ANGLEWebKitBridge::compileShaderSource(const char* shaderSource, ANGLEShade
     return true;
 }
 
-bool ANGLEWebKitBridge::angleAvailable()
-{
-#if PLATFORM(COCOA)
-    return !isNullFunctionPointer(sh::Compile);
-#else
-    return true;
-#endif
-}
-
 }
 
 #endif // ENABLE(GRAPHICS_CONTEXT_GL)
index c72d77d..96635d0 100644 (file)
@@ -90,8 +90,6 @@ public:
     
     bool compileShaderSource(const char* shaderSource, ANGLEShaderType, String& translatedShaderSource, String& shaderValidationLog, Vector<std::pair<ANGLEShaderSymbolType, sh::ShaderVariable>>& symbols, uint64_t extraCompileOptions = 0);
 
-    static bool angleAvailable();
-
 private:
 
     void cleanupCompilers();
index 33e9dff..80db616 100644 (file)
@@ -186,10 +186,6 @@ static void setGPUByRegistryID(CGLContextObj contextObj, CGLPixelFormatObj pixel
 GraphicsContextGLOpenGL::GraphicsContextGLOpenGL(GraphicsContextGLAttributes attrs, HostWindow* hostWindow, GraphicsContextGL::Destination destination, GraphicsContextGLOpenGL* sharedContext)
     : GraphicsContextGL(attrs, destination, sharedContext)
 {
-    ASSERT(ANGLEWebKitBridge::angleAvailable());
-    if (!ANGLEWebKitBridge::angleAvailable())
-        return;
-
     m_isForWebGL2 = attrs.isWebGL2;
 
 #if HAVE(APPLE_GRAPHICS_CONTROL)