Warning in 32-bit WebKit build when trying to link to SafariSafeBrowsing
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Jan 2018 21:32:41 +0000 (21:32 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Jan 2018 21:32:41 +0000 (21:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=182251
rdar://problem/36964995

Patch by Zach Li <zacharyli323@gmail.com> on 2018-01-29
Reviewed by Alex Christensen.

* Configurations/WebKit.xcconfig:
Only link against SafariSafeBrowsing framework in 64-bit architecture.

* Platform/spi/Cocoa/SafeBrowsingSPI.h:
Guard the Safe Browsing code with WK_API_ENABLED.

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

Source/WebKit/ChangeLog
Source/WebKit/Configurations/WebKit.xcconfig
Source/WebKit/Platform/spi/Cocoa/SafeBrowsingSPI.h

index 677c4f6..f991b2d 100644 (file)
@@ -1,3 +1,17 @@
+2018-01-29  Zach Li  <zacharyli323@gmail.com>
+
+        Warning in 32-bit WebKit build when trying to link to SafariSafeBrowsing
+        https://bugs.webkit.org/show_bug.cgi?id=182251
+        rdar://problem/36964995
+
+        Reviewed by Alex Christensen.
+
+        * Configurations/WebKit.xcconfig:
+        Only link against SafariSafeBrowsing framework in 64-bit architecture.
+
+        * Platform/spi/Cocoa/SafeBrowsingSPI.h:
+        Guard the Safe Browsing code with WK_API_ENABLED.
+
 2018-01-29  Chris Dumez  <cdumez@apple.com>
 
         Make sure we do not re-enter Webcore during StorageToWebProcessConnection::EstablishSWServerConnection Sync IPC
index 6a5b2db..b558005 100644 (file)
@@ -90,5 +90,6 @@ WK_SAFE_BROWSING_LDFLAGS[sdk=iphone*] = -framework SafariSafeBrowsing;
 WK_SAFE_BROWSING_LDFLAGS[sdk=iphone*10.*] = ;
 WK_SAFE_BROWSING_LDFLAGS[sdk=watch*] = ;
 WK_SAFE_BROWSING_LDFLAGS[sdk=appletv*] = ;
-WK_SAFE_BROWSING_LDFLAGS[sdk=macosx*] = $(WK_SAFE_BROWSING_LDFLAGS$(WK_MACOS_1013));
+WK_SAFE_BROWSING_LDFLAGS[sdk=macosx*] = $(WK_SAFE_BROWSING_LDFLAGS_macosx);
+WK_SAFE_BROWSING_LDFLAGS_macosx[arch=x86_64] = $(WK_SAFE_BROWSING_LDFLAGS$(WK_MACOS_1013));
 WK_SAFE_BROWSING_LDFLAGS_MACOS_SINCE_1013 = -weak_framework SafariSafeBrowsing;
index a3f60a6..951bdda 100644 (file)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
+#if WK_API_ENABLED && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000))
 
 #import <Foundation/Foundation.h>