Changeset 252992 in webkit


Ignore:
Timestamp:
Dec 2, 2019 10:36:07 AM (4 years ago)
Author:
dino@apple.com
Message:

Build ANGLE as a dynamic library
https://bugs.webkit.org/show_bug.cgi?id=204708
rdar://57349384

Reviewed by Tim Horton.

Source/ThirdParty/ANGLE:

Modify ANGLE to build as a dynamic library. My (not thorough) testing suggests
this will reduce the in-flight binary size on Apple's build systems by at least
a factor of 10 (it was over 1G). Building release for x86_64-only:

  • Previously: libANGLE.a -- 306 MB
  • Now: libANGLE.dylib -- 6.7 MB

In order to do this, some symbols needed to be exported from the
"sh" namespace (which are used in ANGLEWebKitBridge, but not when
ANGLE's rendering backend is active).

While here, I turned on some more build options, like ARC.

  • ANGLE.xcodeproj/project.pbxproj: Link with IOKit and IOSurface frameworks, and

product a dylib product.

  • Configurations/ANGLE.xcconfig: Update the configuration for a dynamic library.
  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:
  • Configurations/Version.xcconfig: Added.
  • Configurations/WebKitTargetConditionals.xcconfig: Added.
  • include/GLSLANG/ShaderLang.h: Add ANGLE_EXPORT to some functions to make

sure they will be visible in the exported library.

  • include/GLSLANG/ShaderVars.h:
  • src/libANGLE/renderer/gl/cgl/DisplayCGL.mm: Change reinterpret_cast to a normal

C cast so it can be annotated with bridge.
(rx::DisplayCGL::isValidNativeWindow const):

  • src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm: Ditto.

(rx::WindowSurfaceCGL::WindowSurfaceCGL):
(rx::WindowSurfaceCGL::~WindowSurfaceCGL):

  • src/libANGLE/renderer/gl/eagl/DisplayEAGL.mm: Ditto.
  • src/libANGLE/renderer/gl/eagl/WindowSurfaceEAGL.mm: Ditto.

Source/WebCore:

Weak link against libANGLE.dylib rather than strong link to libANGLE.a.

  • Configurations/WebCore.xcconfig:
  • Configurations/WebCoreTestSupport.xcconfig:
  • platform/graphics/ANGLEWebKitBridge.cpp: Early returns if the library was not loaded.

(WebCore::ANGLEWebKitBridge::ANGLEWebKitBridge):
(WebCore::ANGLEWebKitBridge::cleanupCompilers):
(WebCore::ANGLEWebKitBridge::compileShaderSource):
(WebCore::ANGLEWebKitBridge::angleAvailable): Static method to detect
if the library was loaded.

  • platform/graphics/ANGLEWebKitBridge.h:
  • platform/graphics/cocoa/GraphicsContext3DCocoa.mm: Early return if ANGLE was not

loaded.
(WebCore::GraphicsContext3D::GraphicsContext3D):

Location:
trunk/Source
Files:
2 added
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/ThirdParty/ANGLE/ANGLE.xcodeproj/project.pbxproj

    r252989 r252992  
    456456                5CB3014F1DE39F4700D2C405 /* DisplayCGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CB301491DE39F4700D2C405 /* DisplayCGL.h */; };
    457457                5CB301511DE39F4700D2C405 /* PbufferSurfaceCGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CB3014B1DE39F4700D2C405 /* PbufferSurfaceCGL.h */; };
    458                 5CB304921DE4156200D2C405 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CB3048D1DE4144400D2C405 /* OpenGL.framework */; };
    459458                5CB304931DE4156B00D2C405 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CB3048F1DE4145500D2C405 /* QuartzCore.framework */; };
    460459                5CB304941DE4157200D2C405 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CB3048B1DE4143500D2C405 /* CoreGraphics.framework */; };
     
    835834                313BCE522361133900FC39E5 /* WindowSurfaceEAGL.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WindowSurfaceEAGL.mm; sourceTree = "<group>"; };
    836835                313BCE532361133900FC39E5 /* DisplayEAGL.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DisplayEAGL.mm; sourceTree = "<group>"; };
     836                3153ACFE239071D900D51DD8 /* WebKitTargetConditionals.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = WebKitTargetConditionals.xcconfig; sourceTree = "<group>"; };
     837                3153ACFF239071D900D51DD8 /* Version.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Version.xcconfig; sourceTree = "<group>"; };
     838                3153AD002390C2EA00D51DD8 /* IOSurface.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOSurface.framework; path = System/Library/Frameworks/IOSurface.framework; sourceTree = SDKROOT; };
     839                3153AD022390C32100D51DD8 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
    837840                315EBD3E1FCE43BD00AC7A89 /* uniform_type_info_autogen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = uniform_type_info_autogen.cpp; sourceTree = "<group>"; };
    838841                315EBD401FCE442600AC7A89 /* TranslatorVulkan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TranslatorVulkan.cpp; sourceTree = "<group>"; };
     
    14971500                A3694FC523202C5200A83D8F /* BuiltinsWorkaroundGLSL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuiltinsWorkaroundGLSL.h; sourceTree = "<group>"; };
    14981501                A3E827A8230CAE2C00E76682 /* commit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = commit.h; sourceTree = "<group>"; };
    1499                 FB39D0D11200F0E300088E69 /* libANGLE.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libANGLE.a; sourceTree = BUILT_PRODUCTS_DIR; };
     1502                FB39D0D11200F0E300088E69 /* libANGLE.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libANGLE.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
    15001503                FB39D2BF1200F3E600088E69 /* ShaderLang.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = ShaderLang.h; sourceTree = "<group>"; };
    15011504/* End PBXFileReference section */
     
    15071510                        files = (
    15081511                                5CB304941DE4157200D2C405 /* CoreGraphics.framework in Frameworks */,
    1509                                 5CB304921DE4156200D2C405 /* OpenGL.framework in Frameworks */,
    15101512                                5CB304931DE4156B00D2C405 /* QuartzCore.framework in Frameworks */,
    15111513                        );
     
    21982200                        children = (
    21992201                                5CB3048B1DE4143500D2C405 /* CoreGraphics.framework */,
     2202                                3153AD022390C32100D51DD8 /* IOKit.framework */,
     2203                                3153AD002390C2EA00D51DD8 /* IOSurface.framework */,
    22002204                                5CB3048D1DE4144400D2C405 /* OpenGL.framework */,
    22012205                                5CB3048F1DE4145500D2C405 /* QuartzCore.framework */,
     
    24112415                                5D7C59C71208C68B001C873E /* DebugRelease.xcconfig */,
    24122416                                A1B89B89221E003A00EB4CEA /* SDKVariant.xcconfig */,
     2417                                3153ACFF239071D900D51DD8 /* Version.xcconfig */,
     2418                                3153ACFE239071D900D51DD8 /* WebKitTargetConditionals.xcconfig */,
    24132419                        );
    24142420                        path = Configurations;
     
    24992505                        isa = PBXGroup;
    25002506                        children = (
    2501                                 FB39D0D11200F0E300088E69 /* libANGLE.a */,
     2507                                FB39D0D11200F0E300088E69 /* libANGLE.dylib */,
    25022508                        );
    25032509                        name = Products;
     
    29792985                        name = ANGLE;
    29802986                        productName = angle;
    2981                         productReference = FB39D0D11200F0E300088E69 /* libANGLE.a */;
    2982                         productType = "com.apple.product-type.library.static";
     2987                        productReference = FB39D0D11200F0E300088E69 /* libANGLE.dylib */;
     2988                        productType = "com.apple.product-type.library.dynamic";
    29832989                };
    29842990/* End PBXNativeTarget section */
     
    33703376                        baseConfigurationReference = 5D7C59C51208C68B001C873E /* ANGLE.xcconfig */;
    33713377                        buildSettings = {
    3372                                 GCC_PREPROCESSOR_DEFINITIONS = (
    3373                                         ANGLE_ENABLE_OPENGL,
    3374                                         ANGLE_ENABLE_GLSL,
    3375                                         ANGLE_ENABLE_ESSL,
    3376                                         GL_SILENCE_DEPRECATION,
    3377                                 );
    3378                                 HEADER_SEARCH_PATHS = (
    3379                                         include,
    3380                                         src,
    3381                                         third_party/base,
    3382                                         src/common/third_party/base,
    3383                                 );
    3384                                 OTHER_CPLUSPLUSFLAGS = "$(ASAN_OTHER_CPLUSPLUSFLAGS)";
    33853378                        };
    33863379                        name = Production;
     
    34053398                        baseConfigurationReference = 5D7C59C51208C68B001C873E /* ANGLE.xcconfig */;
    34063399                        buildSettings = {
    3407                                 GCC_PREPROCESSOR_DEFINITIONS = (
    3408                                         ANGLE_ENABLE_OPENGL,
    3409                                         ANGLE_ENABLE_GLSL,
    3410                                         ANGLE_ENABLE_ESSL,
    3411                                         GL_SILENCE_DEPRECATION,
    3412                                 );
    3413                                 HEADER_SEARCH_PATHS = (
    3414                                         include,
    3415                                         src,
    3416                                         third_party/base,
    3417                                         src/common/third_party/base,
    3418                                 );
    3419                                 OTHER_CPLUSPLUSFLAGS = "$(ASAN_OTHER_CPLUSPLUSFLAGS)";
    34203400                        };
    34213401                        name = Debug;
     
    34253405                        baseConfigurationReference = 5D7C59C51208C68B001C873E /* ANGLE.xcconfig */;
    34263406                        buildSettings = {
    3427                                 GCC_PREPROCESSOR_DEFINITIONS = (
    3428                                         ANGLE_ENABLE_OPENGL,
    3429                                         ANGLE_ENABLE_GLSL,
    3430                                         ANGLE_ENABLE_ESSL,
    3431                                         GL_SILENCE_DEPRECATION,
    3432                                 );
    3433                                 HEADER_SEARCH_PATHS = (
    3434                                         include,
    3435                                         src,
    3436                                         third_party/base,
    3437                                         src/common/third_party/base,
    3438                                 );
    3439                                 OTHER_CPLUSPLUSFLAGS = "$(ASAN_OTHER_CPLUSPLUSFLAGS)";
    34403407                        };
    34413408                        name = Release;
  • trunk/Source/ThirdParty/ANGLE/ChangeLog

    r252989 r252992  
     12019-11-30  Dean Jackson  <dino@apple.com>
     2
     3        Build ANGLE as a dynamic library
     4        https://bugs.webkit.org/show_bug.cgi?id=204708
     5        rdar://57349384
     6
     7        Reviewed by Tim Horton.
     8
     9        Modify ANGLE to build as a dynamic library. My (not thorough) testing suggests
     10        this will reduce the in-flight binary size on Apple's build systems by at least
     11        a factor of 10 (it was over 1G). Building release for x86_64-only:
     12            - Previously: libANGLE.a -- 306 MB
     13            - Now: libANGLE.dylib -- 6.7 MB
     14
     15        In order to do this, some symbols needed to be exported from the
     16        "sh" namespace (which are used in ANGLEWebKitBridge, but not when
     17        ANGLE's rendering backend is active).
     18
     19        While here, I turned on some more build options, like ARC.
     20
     21        * ANGLE.xcodeproj/project.pbxproj: Link with IOKit and IOSurface frameworks, and
     22        product a dylib product.
     23        * Configurations/ANGLE.xcconfig: Update the configuration for a dynamic library.
     24        * Configurations/Base.xcconfig:
     25        * Configurations/DebugRelease.xcconfig:
     26        * Configurations/Version.xcconfig: Added.
     27        * Configurations/WebKitTargetConditionals.xcconfig: Added.
     28
     29        * include/GLSLANG/ShaderLang.h: Add ANGLE_EXPORT to some functions to make
     30        sure they will be visible in the exported library.
     31        * include/GLSLANG/ShaderVars.h:
     32        * src/libANGLE/renderer/gl/cgl/DisplayCGL.mm: Change reinterpret_cast to a normal
     33        C cast so it can be annotated with __bridge.
     34        (rx::DisplayCGL::isValidNativeWindow const):
     35        * src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm: Ditto.
     36        (rx::WindowSurfaceCGL::WindowSurfaceCGL):
     37        (rx::WindowSurfaceCGL::~WindowSurfaceCGL):
     38        * src/libANGLE/renderer/gl/eagl/DisplayEAGL.mm: Ditto.
     39        * src/libANGLE/renderer/gl/eagl/WindowSurfaceEAGL.mm: Ditto.
     40
    1412019-12-02  James Darpinian  <jdarpinian@chromium.org>
    242
  • trunk/Source/ThirdParty/ANGLE/Configurations/ANGLE.xcconfig

    r248813 r252992  
     1#include "Version.xcconfig"
     2#include "WebKitTargetConditionals.xcconfig"
     3
    14PRODUCT_NAME = ANGLE;
    25
    3 CLANG_WARN_BOOL_CONVERSION = YES;
    4 CLANG_WARN_ENUM_CONVERSION = YES;
    5 CLANG_WARN_INT_CONVERSION = YES;
    6 COMBINE_HIDPI_IMAGES = NO;
    7 ENABLE_STRICT_OBJC_MSGSEND = YES;
    8 HEADER_SEARCH_PATHS = include src src/common/third_party/numerics;
    9 INSTALL_PATH = $(ANGLE_INSTALL_PATH_PREFIX)/usr/local/lib;
    10 PUBLIC_HEADERS_FOLDER_PATH = $(ANGLE_INSTALL_PATH_PREFIX)/usr/local/include/ANGLE;
     6EXECUTABLE_PREFIX = lib;
     7
     8ANGLE_OTHER_LDFLAGS = $(ANGLE_OTHER_LDFLAGS_$(WK_PLATFORM_NAME));
     9ANGLE_OTHER_LDFLAGS_iphoneos = -framework IOSurface -framework OpenGLES;
     10ANGLE_OTHER_LDFLAGS_iphonesimulator = $(ANGLE_OTHER_LDFLAGS_iphoneos);
     11ANGLE_OTHER_LDFLAGS_watchos = $(ANGLE_OTHER_LDFLAGS_iphoneos);
     12ANGLE_OTHER_LDFLAGS_watchsimulator = $(ANGLE_OTHER_LDFLAGS_iphonesimulator);
     13ANGLE_OTHER_LDFLAGS_appletvos = $(ANGLE_OTHER_LDFLAGS_iphoneos);
     14ANGLE_OTHER_LDFLAGS_appletvsimulator = $(ANGLE_OTHER_LDFLAGS_iphonesimulator);
     15ANGLE_OTHER_LDFLAGS_maccatalyst = -framework IOKit -framework IOSurface -framework OpenGL;
     16ANGLE_OTHER_LDFLAGS_macosx = -framework IOKit -framework IOSurface -framework OpenGL;
     17
     18INSTALL_PATH = $(NORMAL_WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Frameworks;
     19INSTALL_PATH[sdk=macosx*] = $(INSTALL_PATH_USE_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
     20INSTALL_PATH_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(NORMAL_WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Versions/A/Frameworks;
     21INSTALL_PATH_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR);
     22
     23DYLIB_INSTALL_NAME_BASE[sdk=macosx*] = $(DYLIB_INSTALL_NAME_BASE_USE_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
     24DYLIB_INSTALL_NAME_BASE_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(DYLIB_INSTALL_NAME_BASE_WK_RELOCATABLE_FRAMEWORKS_$(WK_RELOCATABLE_FRAMEWORKS));
     25DYLIB_INSTALL_NAME_BASE_USE_OVERRIDE_FRAMEWORKS_DIR_YES = @loader_path/../../../;
     26DYLIB_INSTALL_NAME_BASE_WK_RELOCATABLE_FRAMEWORKS_ = $(DYLIB_INSTALL_NAME_BASE);
     27DYLIB_INSTALL_NAME_BASE_WK_RELOCATABLE_FRAMEWORKS_YES = @loader_path/../../../;
     28
     29HEADER_SEARCH_PATHS = include src src/common/third_party/numerics third_party/base src/common/third_party/base;
     30
     31PUBLIC_HEADERS_FOLDER_PATH = /usr/local/include/ANGLE;
     32USE_HEADERMAP = NO;
     33
     34GCC_PREPROCESSOR_DEFINITIONS = LIBGLESV2_IMPLEMENTATION LIBANGLE_IMPLEMENTATION ANGLE_ENABLE_OPENGL ANGLE_ENABLE_GLSL ANGLE_ENABLE_ESSL GL_SILENCE_DEPRECATION;
     35
     36INSTALLHDRS_SCRIPT_PHASE = YES;
     37
    1138APPLY_RULES_IN_COPY_HEADERS = $(USE_NEW_BUILD_SYSTEM);
  • trunk/Source/ThirdParty/ANGLE/Configurations/Base.xcconfig

    r249312 r252992  
    11#include? "../../../../../Internal/Configurations/HaveInternalSDK.xcconfig"
     2#include? "<DEVELOPER_DIR>/AppleInternal/XcodeConfig/PlatformSupport.xcconfig"
    23#include "SDKVariant.xcconfig"
     4#include "WebKitTargetConditionals.xcconfig"
    35
    46CODE_SIGN_IDENTITY = -;
     7
     8SDKROOT = macosx.internal;
    59
    610USE_INTERNAL_SDK = $(USE_INTERNAL_SDK_$(CONFIGURATION));
     
    1115ALWAYS_SEARCH_USER_PATHS = NO;
    1216
     17CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
    1318CLANG_CXX_LANGUAGE_STANDARD = gnu++1z;
    1419CLANG_CXX_LIBRARY = libc++;
     20CLANG_ENABLE_OBJC_ARC = YES;
    1521CLANG_ENABLE_OBJC_WEAK = YES;
    1622CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
     
    1824CLANG_WARN_COMMA = YES;
    1925CLANG_WARN_CONSTANT_CONVERSION = YES;
     26CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
    2027CLANG_WARN_EMPTY_BODY = YES;
    2128CLANG_WARN_ENUM_CONVERSION = YES;
     
    2330CLANG_WARN_INT_CONVERSION = YES;
    2431CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
    25 CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
     32CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
    2633CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
    2734CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
     35CLANG_WARN_STRICT_PROTOTYPES = YES;
    2836CLANG_WARN_SUSPICIOUS_MOVE = YES;
    29 CLANG_WARN_STRICT_PROTOTYPES = YES;
    3037CLANG_WARN_UNREACHABLE_CODE = YES;
    31 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
    32 DEAD_CODE_STRIPPING = YES;
    33 DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
     38
    3439GCC_C_LANGUAGE_STANDARD = gnu99;
    3540GCC_DEBUGGING_SYMBOLS = default;
     
    3742GCC_ENABLE_CPP_RTTI = NO;
    3843GCC_ENABLE_OBJC_EXCEPTIONS = YES;
    39 ENABLE_STRICT_OBJC_MSGSEND = YES;
    4044GCC_ENABLE_SYMBOL_SEPARATION = NO;
    4145GCC_FAST_OBJC_DISPATCH = YES;
     
    4650GCC_PRECOMPILE_PREFIX_HEADER = NO;
    4751GCC_SYMBOLS_PRIVATE_EXTERN = YES;
     52GCC_SYMBOLS_PRIVATE_EXTERN = YES;
    4853GCC_THREADSAFE_STATICS = NO;
    4954GCC_TREAT_WARNINGS_AS_ERRORS = YES;
     
    5156GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
    5257GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
    53 GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
     58GCC_WARN_ABOUT_MISSING_NEWLINE = NO;
    5459GCC_WARN_ABOUT_RETURN_TYPE = YES;
    5560GCC_WARN_UNDECLARED_SELECTOR = YES;
    56 CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
    57 CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
    5861GCC_WARN_UNINITIALIZED_AUTOS = YES;
    5962GCC_WARN_UNUSED_FUNCTION = YES;
    6063GCC_WARN_UNUSED_VARIABLE = YES;
     64
     65DEAD_CODE_STRIPPING = YES;
     66DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
     67ENABLE_STRICT_OBJC_MSGSEND = YES;
     68
    6169PREBINDING = NO;
    6270STRIP_INSTALLED_PRODUCT = NO;
    63 WARNING_CFLAGS = -Wglobal-constructors -Wno-newline-eof -Wno-inconsistent-missing-override;
     71WARNING_CFLAGS = -Wglobal-constructors -Wno-inconsistent-missing-override;
    6472
    6573SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx appletvos appletvsimulator watchos watchsimulator;
     
    7179TARGET_MAC_OS_X_VERSION_MAJOR_16 = 101600;
    7280
    73 SDKROOT = macosx.internal;
    74 
    7581OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
    7682OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
    77 OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
     83OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS) $(ANGLE_OTHER_LDFLAGS);
    7884
    7985ANGLE_INSTALL_PATH_PREFIX = $(ANGLE_INSTALL_PATH_PREFIX_DEPLOYMENT_$(DEPLOYMENT_LOCATION));
    8086ANGLE_INSTALL_PATH_PREFIX_DEPLOYMENT_YES = $(ANGLE_INSTALL_PATH_PREFIX_DEPLOYMENT_YES_USE_ALTERNATE_$(WK_USE_ALTERNATE_FRAMEWORKS_DIR));
    8187ANGLE_INSTALL_PATH_PREFIX_DEPLOYMENT_YES_USE_ALTERNATE_YES = $(WK_ALTERNATE_FRAMEWORKS_DIR)/;
     88
     89NORMAL_WEBCORE_FRAMEWORKS_DIR = $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
     90NORMAL_WEBCORE_FRAMEWORKS_DIR[sdk=macosx*] = $(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks;
     91
     92WK_USE_OVERRIDE_FRAMEWORKS_DIR = $(WK_NOT_$(WK_EMPTY_$(WK_OVERRIDE_FRAMEWORKS_DIR)));
     93
     94WK_OVERRIDE_FRAMEWORKS_DIR = $(WK_OVERRIDE_FRAMEWORKS_DIR_USE_STAGING_INSTALL_PATH_$(USE_STAGING_INSTALL_PATH));
     95WK_OVERRIDE_FRAMEWORKS_DIR_USE_STAGING_INSTALL_PATH_YES = $(WK_INSTALL_PATH_PREFIX)$(SYSTEM_LIBRARY_DIR)/StagedFrameworks/Safari;
     96
     97WK_INSTALL_PATH_PREFIX = $(WK_INSTALL_PATH_PREFIX_DEPLOYMENT_$(DEPLOYMENT_LOCATION)$(WK_MACOS_1015)_USE_STAGING_INSTALL_PATH_$(USE_STAGING_INSTALL_PATH));
     98WK_INSTALL_PATH_PREFIX_DEPLOYMENT_YES_MACOS_SINCE_1015_USE_STAGING_INSTALL_PATH_YES = $(PLATFORM_OOB_SYSTEM_CONTENT_DIR);
    8299
    83100// Disable on all platforms other than macOS, due to <rdar://problem/49013399>.
  • trunk/Source/ThirdParty/ANGLE/Configurations/DebugRelease.xcconfig

    r249312 r252992  
    2121SDKROOT_YES = macosx.internal;
    2222
     23WK_RELOCATABLE_FRAMEWORKS = YES;
     24
    2325WK_DEFAULT_LTO_MODE = $(WK_USER_LTO_MODE_none);
    2426
  • trunk/Source/ThirdParty/ANGLE/include/CMakeLists.txt

    r252717 r252992  
    3333
    3434set(glslang_headers
     35    export.h
    3536    GLSLANG/ShaderLang.h
    3637    GLSLANG/ShaderVars.h
  • trunk/Source/ThirdParty/ANGLE/include/GLSLANG/ShaderLang.h

    r252989 r252992  
    526526// If the function succeeds, the return value is true, else false.
    527527//
    528 bool Initialize();
     528ANGLE_EXPORT bool Initialize();
    529529//
    530530// Driver should call this at shutdown.
    531531// If the function succeeds, the return value is true, else false.
    532532//
    533 bool Finalize();
     533ANGLE_EXPORT bool Finalize();
    534534
    535535//
     
    538538// resources: The object to initialize. Will be comparable with memcmp.
    539539//
    540 void InitBuiltInResources(ShBuiltInResources *resources);
     540ANGLE_EXPORT void InitBuiltInResources(ShBuiltInResources *resources);
    541541
    542542//
     
    545545// Parameters:
    546546// handle: Specifies the handle of the compiler to be used.
    547 const std::string &GetBuiltInResourcesString(const ShHandle handle);
     547ANGLE_EXPORT const std::string &GetBuiltInResourcesString(const ShHandle handle);
    548548
    549549//
     
    558558//         be supported in some configurations.
    559559// resources: Specifies the built-in resources.
    560 ShHandle ConstructCompiler(sh::GLenum type,
    561                            ShShaderSpec spec,
    562                            ShShaderOutput output,
    563                            const ShBuiltInResources *resources);
    564 void Destruct(ShHandle handle);
     560ANGLE_EXPORT ShHandle ConstructCompiler(sh::GLenum type,
     561                                        ShShaderSpec spec,
     562                                        ShShaderOutput output,
     563                                        const ShBuiltInResources *resources);
     564ANGLE_EXPORT void Destruct(ShHandle handle);
    565565
    566566//
     
    588588//               Can be queried by calling ShGetVariableInfo().
    589589//
    590 bool Compile(const ShHandle handle,
     590ANGLE_EXPORT bool Compile(const ShHandle handle,
    591591             const char *const shaderStrings[],
    592592             size_t numStrings,
     
    594594
    595595// Clears the results from the previous compilation.
    596 void ClearResults(const ShHandle handle);
     596ANGLE_EXPORT void ClearResults(const ShHandle handle);
    597597
    598598// Return the version of the shader language.
    599 int GetShaderVersion(const ShHandle handle);
     599ANGLE_EXPORT int GetShaderVersion(const ShHandle handle);
    600600
    601601// Return the currently set language output type.
    602 ShShaderOutput GetShaderOutputType(const ShHandle handle);
     602ANGLE_EXPORT ShShaderOutput GetShaderOutputType(const ShHandle handle);
    603603
    604604// Returns null-terminated information log for a compiled shader.
    605605// Parameters:
    606606// handle: Specifies the compiler
    607 const std::string &GetInfoLog(const ShHandle handle);
     607ANGLE_EXPORT const std::string &GetInfoLog(const ShHandle handle);
    608608
    609609// Returns null-terminated object code for a compiled shader.
    610610// Parameters:
    611611// handle: Specifies the compiler
    612 const std::string &GetObjectCode(const ShHandle handle);
     612ANGLE_EXPORT const std::string &GetObjectCode(const ShHandle handle);
    613613
    614614// Returns a (original_name, hash) map containing all the user defined names in the shader,
     
    616616// Parameters:
    617617// handle: Specifies the compiler
    618 const std::map<std::string, std::string> *GetNameHashingMap(const ShHandle handle);
     618ANGLE_EXPORT const std::map<std::string, std::string> *GetNameHashingMap(const ShHandle handle);
    619619
    620620// Shader variable inspection.
     
    624624// Parameters:
    625625// handle: Specifies the compiler
    626 const std::vector<sh::ShaderVariable> *GetUniforms(const ShHandle handle);
    627 const std::vector<sh::ShaderVariable> *GetVaryings(const ShHandle handle);
    628 const std::vector<sh::ShaderVariable> *GetInputVaryings(const ShHandle handle);
    629 const std::vector<sh::ShaderVariable> *GetOutputVaryings(const ShHandle handle);
    630 const std::vector<sh::ShaderVariable> *GetAttributes(const ShHandle handle);
    631 const std::vector<sh::ShaderVariable> *GetOutputVariables(const ShHandle handle);
    632 const std::vector<sh::InterfaceBlock> *GetInterfaceBlocks(const ShHandle handle);
    633 const std::vector<sh::InterfaceBlock> *GetUniformBlocks(const ShHandle handle);
    634 const std::vector<sh::InterfaceBlock> *GetShaderStorageBlocks(const ShHandle handle);
    635 sh::WorkGroupSize GetComputeShaderLocalGroupSize(const ShHandle handle);
     626ANGLE_EXPORT const std::vector<sh::ShaderVariable> *GetUniforms(const ShHandle handle);
     627ANGLE_EXPORT const std::vector<sh::ShaderVariable> *GetVaryings(const ShHandle handle);
     628ANGLE_EXPORT const std::vector<sh::ShaderVariable> *GetInputVaryings(const ShHandle handle);
     629ANGLE_EXPORT const std::vector<sh::ShaderVariable> *GetOutputVaryings(const ShHandle handle);
     630ANGLE_EXPORT const std::vector<sh::ShaderVariable> *GetAttributes(const ShHandle handle);
     631ANGLE_EXPORT const std::vector<sh::ShaderVariable> *GetOutputVariables(const ShHandle handle);
     632ANGLE_EXPORT const std::vector<sh::InterfaceBlock> *GetInterfaceBlocks(const ShHandle handle);
     633ANGLE_EXPORT const std::vector<sh::InterfaceBlock> *GetUniformBlocks(const ShHandle handle);
     634ANGLE_EXPORT const std::vector<sh::InterfaceBlock> *GetShaderStorageBlocks(const ShHandle handle);
     635ANGLE_EXPORT sh::WorkGroupSize GetComputeShaderLocalGroupSize(const ShHandle handle);
    636636// Returns the number of views specified through the num_views layout qualifier. If num_views is
    637637// not set, the function returns -1.
    638 int GetVertexShaderNumViews(const ShHandle handle);
     638ANGLE_EXPORT int GetVertexShaderNumViews(const ShHandle handle);
    639639
    640640// Returns true if the passed in variables pack in maxVectors followingthe packing rules from the
     
    645645// maxVectors: the available rows of registers.
    646646// variables: an array of variables.
    647 bool CheckVariablesWithinPackingLimits(int maxVectors,
    648                                        const std::vector<sh::ShaderVariable> &variables);
     647ANGLE_EXPORT bool CheckVariablesWithinPackingLimits(int maxVectors,
     648                                                    const std::vector<sh::ShaderVariable> &variables);
    649649
    650650// Gives the compiler-assigned register for a shader storage block.
     
    655655// shaderStorageBlockName: Specifies the shader storage block
    656656// indexOut: output variable that stores the assigned register
    657 bool GetShaderStorageBlockRegister(const ShHandle handle,
    658                                    const std::string &shaderStorageBlockName,
    659                                    unsigned int *indexOut);
     657ANGLE_EXPORT bool GetShaderStorageBlockRegister(const ShHandle handle,
     658                                                const std::string &shaderStorageBlockName,
     659                                                unsigned int *indexOut);
    660660
    661661// Gives the compiler-assigned register for a uniform block.
     
    666666// uniformBlockName: Specifies the uniform block
    667667// indexOut: output variable that stores the assigned register
    668 bool GetUniformBlockRegister(const ShHandle handle,
    669                              const std::string &uniformBlockName,
    670                              unsigned int *indexOut);
     668ANGLE_EXPORT bool GetUniformBlockRegister(const ShHandle handle,
     669                                          const std::string &uniformBlockName,
     670                                          unsigned int *indexOut);
    671671
    672672// Gives a map from uniform names to compiler-assigned registers in the default uniform block.
    673673// Note that the map contains also registers of samplers that have been extracted from structs.
    674 const std::map<std::string, unsigned int> *GetUniformRegisterMap(const ShHandle handle);
     674ANGLE_EXPORT const std::map<std::string, unsigned int> *GetUniformRegisterMap(const ShHandle handle);
    675675
    676676// Sampler, image and atomic counters share registers(t type and u type),
  • trunk/Source/ThirdParty/ANGLE/include/GLSLANG/ShaderVars.h

    r249823 r252992  
    1111#define GLSLANG_SHADERVARS_H_
    1212
     13#include "export.h"
     14
    1315#include <algorithm>
    1416#include <array>
     
    6365struct ShaderVariable
    6466{
    65     ShaderVariable();
     67    ANGLE_EXPORT ShaderVariable();
    6668    ShaderVariable(GLenum typeIn);
    6769    ShaderVariable(GLenum typeIn, unsigned int arraySizeIn);
    68     ~ShaderVariable();
    69     ShaderVariable(const ShaderVariable &other);
    70     ShaderVariable &operator=(const ShaderVariable &other);
     70    ANGLE_EXPORT ~ShaderVariable();
     71    ANGLE_EXPORT ShaderVariable(const ShaderVariable &other);
     72    ANGLE_EXPORT ShaderVariable &operator=(const ShaderVariable &other);
    7173    bool operator==(const ShaderVariable &other) const;
    7274    bool operator!=(const ShaderVariable &other) const { return !operator==(other); }
  • trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/cgl/DisplayCGL.mm

    r252989 r252992  
    293293bool DisplayCGL::isValidNativeWindow(EGLNativeWindowType window) const
    294294{
    295     NSObject *layer = reinterpret_cast<NSObject *>(window);
     295    NSObject *layer = (__bridge NSObject *)window;
    296296    return [layer isKindOfClass:[CALayer class]];
    297297}
  • trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm

    r252989 r252992  
    154154      mSwapLayer(nil),
    155155      mCurrentSwapId(0),
    156       mLayer(reinterpret_cast<CALayer *>(layer)),
     156      mLayer((__bridge CALayer *)layer),
    157157      mContext(context),
    158158      mFunctions(renderer->getFunctions()),
     
    176176    {
    177177        [mSwapLayer removeFromSuperlayer];
    178         [mSwapLayer release];
    179178        mSwapLayer = nil;
    180179    }
  • trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/eagl/DisplayEAGL.mm

    r252250 r252992  
    138138    {
    139139        [EAGLContext setCurrentContext:nil];
    140         [mContext release];
    141140        mContext = nullptr;
    142141    }
     
    269268bool DisplayEAGL::isValidNativeWindow(EGLNativeWindowType window) const
    270269{
    271     NSObject *layer = reinterpret_cast<NSObject *>(window);
     270    NSObject *layer = (__bridge NSObject *)window;
    272271    return [layer isKindOfClass:[CALayer class]];
    273272}
     
    360359{
    361360    [EAGLContext setCurrentContext:nil];
    362     [mContext release];
    363361    mContext = nullptr;
    364362}
  • trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/eagl/WindowSurfaceEAGL.mm

    r252250 r252992  
    139139      mSwapLayer(nil),
    140140      mCurrentSwapId(0),
    141       mLayer(reinterpret_cast<CALayer *>(layer)),
     141      mLayer((__bridge CALayer *)layer),
    142142      mContext(context),
    143143      mFunctions(renderer->getFunctions()),
     
    161161    {
    162162        [mSwapLayer removeFromSuperlayer];
    163         [mSwapLayer release];
    164163        mSwapLayer = nil;
    165164    }
  • trunk/Source/WebCore/ChangeLog

    r252987 r252992  
     12019-11-30  Dean Jackson  <dino@apple.com>
     2
     3        Build ANGLE as a dynamic library
     4        https://bugs.webkit.org/show_bug.cgi?id=204708
     5        rdar://57349384
     6
     7        Reviewed by Tim Horton.
     8
     9        Weak link against libANGLE.dylib rather than strong link to libANGLE.a.
     10
     11        * Configurations/WebCore.xcconfig:
     12        * Configurations/WebCoreTestSupport.xcconfig:
     13        * platform/graphics/ANGLEWebKitBridge.cpp: Early returns if the library was not loaded.
     14        (WebCore::ANGLEWebKitBridge::ANGLEWebKitBridge):
     15        (WebCore::ANGLEWebKitBridge::cleanupCompilers):
     16        (WebCore::ANGLEWebKitBridge::compileShaderSource):
     17        (WebCore::ANGLEWebKitBridge::angleAvailable): Static method to detect
     18        if the library was loaded.
     19        * platform/graphics/ANGLEWebKitBridge.h:
     20        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm: Early return if ANGLE was not
     21        loaded.
     22        (WebCore::GraphicsContext3D::GraphicsContext3D):
     23
    1242019-12-02  youenn fablet  <youenn@apple.com>
    225
  • trunk/Source/WebCore/Configurations/WebCore.xcconfig

    r251926 r252992  
    4040SYSTEM_FRAMEWORK_SEARCH_PATHS = $(inherited) $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks
    4141
    42 LIBRARY_SEARCH_PATHS = $(inherited) "$(WK_LIBWEBRTC_LIBRARY_DIR)";
     42WK_EMBEDDED_LIBRARY_DIR = $(WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Frameworks
     43WK_EMBEDDED_LIBRARY_DIR[sdk=macosx*] = $(WK_EMBEDDED_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
     44WK_EMBEDDED_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Versions/A/Frameworks;
     45WK_EMBEDDED_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR);
     46
     47LIBRARY_SEARCH_PATHS = $(inherited) "$(WK_EMBEDDED_LIBRARY_DIR)";
    4348
    4449WEBKITADDITIONS_HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include/WebKitAdditions $(SDKROOT)/usr/local/include/WebKitAdditions;
     50ANGLE_HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include/ANGLE $(SDKROOT)/usr/local/include/ANGLE;
    4551LIBWEBRTC_HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include/webrtc $(SDKROOT)/usr/local/include/webrtc $(BUILT_PRODUCTS_DIR)/usr/local/include/webrtc/sdk/objc/Framework/Headers $(SDKROOT)/usr/local/include/webrtc/sdk/objc/Framework/Headers;
    4652
    47 HEADER_SEARCH_PATHS = PAL ForwardingHeaders /usr/include/libxslt /usr/include/libxml2 "$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore" "$(BUILT_PRODUCTS_DIR)/usr/local/include" $(WEBKITADDITIONS_HEADER_SEARCH_PATHS) $(LIBWEBRTC_HEADER_SEARCH_PATHS) $(HEADER_SEARCH_PATHS) $(SRCROOT);
     53HEADER_SEARCH_PATHS = PAL ForwardingHeaders /usr/include/libxslt /usr/include/libxml2 "$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore" "$(BUILT_PRODUCTS_DIR)/usr/local/include" $(WEBKITADDITIONS_HEADER_SEARCH_PATHS) $(ANGLE_HEADER_SEARCH_PATHS) $(LIBWEBRTC_HEADER_SEARCH_PATHS) $(HEADER_SEARCH_PATHS) $(SRCROOT);
    4854INFOPLIST_FILE = Info.plist;
    4955
     
    6268PRODUCT_BUNDLE_IDENTIFIER = com.apple.$(PRODUCT_NAME:rfc1034identifier);
    6369UNEXPORTED_SYMBOLS_FILE = Configurations/WebCore.unexp;
    64 
    65 WK_LIBWEBRTC_LIBRARY_DIR = $(WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Frameworks
    66 WK_LIBWEBRTC_LIBRARY_DIR[sdk=macosx*] = $(WK_LIBWEBRTC_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
    67 WK_LIBWEBRTC_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Versions/A/Frameworks;
    68 WK_LIBWEBRTC_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR);
    6970
    7071WK_APPKIT_LDFLAGS = $(WK_APPKIT_LDFLAGS_$(WK_PLATFORM_NAME));
     
    9394WK_IOSURFACE_ACCELERATOR_LDFLAGS_watchos = $(WK_IOSURFACE_ACCELERATOR_LDFLAGS_iphoneos);
    9495WK_IOSURFACE_ACCELERATOR_LDFLAGS_appletvos = $(WK_IOSURFACE_ACCELERATOR_LDFLAGS_iphoneos);
     96
     97WK_ANGLE_LDFLAGS = -weak-lANGLE;
    9598
    9699WK_LIBWEBRTC_LDFLAGS = $(WK_LIBWEBRTC_LDFLAGS_$(ENABLE_WEB_RTC));
     
    124127
    125128// FIXME: Reduce the number of allowable_clients <rdar://problem/31823969>
    126 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);
     129OTHER_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);
    127130
    128131OTHER_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;
  • trunk/Source/WebCore/Configurations/WebCoreTestSupport.xcconfig

    r230836 r252992  
    4949DYLIB_INSTALL_NAME_BASE_Release = $(DYLIB_INSTALL_NAME_BASE_Debug);
    5050
     51ANGLE_LDFLAGS = -weak-lANGLE;
     52
    5153LIBWEBRTC_LDFLAGS = $(LIBWEBRTC_LDFLAGS_$(ENABLE_WEB_RTC));
    5254LIBWEBRTC_LDFLAGS_ = ;
     
    5759EXPORTED_SYMBOLS_FILE = ;
    5860GCC_SYMBOLS_PRIVATE_EXTERN = YES;
    59 OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
    60 OTHER_LDFLAGS[sdk=macos*] = $(ASAN_OTHER_LDFLAGS) -framework AppKit $(LIBWEBRTC_LDFLAGS);
    6161
    62 OTHER_LDFLAGS[sdk=iphoneos*] = $(ASAN_OTHER_LDFLAGS) -lAccessibility $(LIBWEBRTC_LDFLAGS);
    63 OTHER_LDFLAGS[sdk=iphonesimulator*] = $(ASAN_OTHER_LDFLAGS) -lAccessibility $(LIBWEBRTC_LDFLAGS);
     62OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS) $(ANGLE_LDFLAGS);
     63OTHER_LDFLAGS[sdk=macos*] = $(ASAN_OTHER_LDFLAGS) -framework AppKit $(LIBWEBRTC_LDFLAGS) $(ANGLE_LDFLAGS);
     64OTHER_LDFLAGS[sdk=iphoneos*] = $(ASAN_OTHER_LDFLAGS) -lAccessibility $(LIBWEBRTC_LDFLAGS) $(ANGLE_LDFLAGS);
     65OTHER_LDFLAGS[sdk=iphonesimulator*] = $(ASAN_OTHER_LDFLAGS) -lAccessibility $(LIBWEBRTC_LDFLAGS) $(ANGLE_LDFLAGS);
     66
    6467SECT_ORDER_FLAGS = ;
  • trunk/Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp

    r225410 r252992  
    3232#include <wtf/StdLibExtras.h>
    3333
     34#if PLATFORM(COCOA)
     35#include <wtf/darwin/WeakLinking.h>
     36#endif
     37
    3438namespace WebCore {
    3539
     
    132136    , m_shaderSpec(shaderSpec)
    133137{
     138    ASSERT(angleAvailable());
     139    if (!angleAvailable())
     140        return;
     141
    134142    // This is a no-op if it's already initialized.
    135143    sh::Initialize();
     
    143151void ANGLEWebKitBridge::cleanupCompilers()
    144152{
     153    ASSERT(ANGLEWebKitBridge::angleAvailable());
     154    if (!ANGLEWebKitBridge::angleAvailable())
     155        return;
     156
    145157    if (m_fragmentCompiler)
    146158        sh::Destruct(m_fragmentCompiler);
     
    163175bool ANGLEWebKitBridge::compileShaderSource(const char* shaderSource, ANGLEShaderType shaderType, String& translatedShaderSource, String& shaderValidationLog, Vector<std::pair<ANGLEShaderSymbolType, sh::ShaderVariable>>& symbols, uint64_t extraCompileOptions)
    164176{
     177    ASSERT(ANGLEWebKitBridge::angleAvailable());
     178    if (!ANGLEWebKitBridge::angleAvailable())
     179        return false;
     180
    165181    if (!builtCompilers) {
    166182        m_fragmentCompiler = sh::ConstructCompiler(GL_FRAGMENT_SHADER, m_shaderSpec, m_shaderOutput, &m_resources);
     
    205221}
    206222
     223bool ANGLEWebKitBridge::angleAvailable()
     224{
     225#if PLATFORM(COCOA)
     226    return !isNullFunctionPointer(sh::Compile);
     227#else
     228    return true;
     229#endif
     230}
     231
    207232}
    208233
  • trunk/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h

    r252717 r252992  
    9191    bool compileShaderSource(const char* shaderSource, ANGLEShaderType, String& translatedShaderSource, String& shaderValidationLog, Vector<std::pair<ANGLEShaderSymbolType, sh::ShaderVariable>>& symbols, uint64_t extraCompileOptions = 0);
    9292
     93    static bool angleAvailable();
     94
    9395private:
    9496
  • trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm

    r252909 r252992  
    196196
    197197#if !USE(ANGLE)
     198    ASSERT(ANGLEWebKitBridge::angleAvailable());
     199    if (!ANGLEWebKitBridge::angleAvailable())
     200        return;
     201
    198202#if USE(OPENGL_ES)
    199203    if (m_attrs.isWebGL2)
     
    291295
    292296#elif USE(ANGLE)
     297
     298    ASSERT(ANGLEWebKitBridge::angleAvailable());
     299    if (!ANGLEWebKitBridge::angleAvailable())
     300        return;
    293301
    294302    m_displayObj = EGL_GetDisplay(EGL_DEFAULT_DISPLAY);
Note: See TracChangeset for help on using the changeset viewer.