[Cocoa] WebKit unnecessarily soft-links CorePrediction
https://bugs.webkit.org/show_bug.cgi?id=170644
Reviewed by Sam Weinig.
Source/WebKit2:
* Configurations/BaseTarget.xcconfig: Defined HAVE_CORE_PREDICTION and added
HAVE_CORE_PREDICTION to the preprocessor defintions when the former is YES.
* Configurations/WebKit.xcconfig: Have the linker link against CorePrediction where
available. On macOS, use weak linking, because CorePrediction is not available in the
Base System.
* Platform/classifier/cocoa/CorePredictionSoftLink.h: Removed.
* Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp: Guarded with
#if HAVE(CORE_PREDICTION).
(WebKit::isNullFunctionPointer): Added this helper.
(WebKit::ResourceLoadStatisticsClassifierCocoa::canUseCorePrediction): Replaced
dlopen()-based runtime check with a null check.
* Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.h: Guarded with #if
HAVE(CORE_PREDICTION).
* Platform/spi/Cocoa/CorePredictionSPI.h: Added.
* UIProcess/WebResourceLoadStatisticsStore.h: Updated guards to include HAVE(CORE_PREDICTION).
* WebKit2.xcodeproj/project.pbxproj: pdated file references for removal and addition.
WebKitLibraries:
* WebKitPrivateFrameworkStubs/iOS/10/CorePrediction.framework: Added this framework stub.
* WebKitPrivateFrameworkStubs/iOS/10/CorePrediction.framework/CorePrediction.tbd: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215247
268f45cc-cd09-0410-ab3c-
d52691b4dbfc