WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
218314
[Cocoa] Remove soft linking of NetworkExtension.framework
https://bugs.webkit.org/show_bug.cgi?id=218314
Summary
[Cocoa] Remove soft linking of NetworkExtension.framework
Ryan Haddad
Reported
2020-10-28 16:20:44 PDT
TestWebKitAPI.ContentFiltering.LazilyLoadPlatformFrameworks /Volumes/Data/slave/catalina-release/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:374 Expected equality of these values: static_cast<bool>(networkExtensionShouldBeLoaded) Which is: false static_cast<bool>(networkExtensionLoaded) Which is: true /Volumes/Data/slave/catalina-release/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:374 Expected equality of these values: static_cast<bool>(networkExtensionShouldBeLoaded) Which is: false static_cast<bool>(networkExtensionLoaded) Which is: true /Volumes/Data/slave/catalina-release/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:374 Expected equality of these values: static_cast<bool>(networkExtensionShouldBeLoaded) Which is: false static_cast<bool>(networkExtensionLoaded) Which is: true /Volumes/Data/slave/catalina-release/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:374 Expected equality of these values: static_cast<bool>(networkExtensionShouldBeLoaded) Which is: false static_cast<bool>(networkExtensionLoaded) Which is: true /Volumes/Data/slave/catalina-release/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:374 Expected equality of these values: static_cast<bool>(networkExtensionShouldBeLoaded) Which is: false static_cast<bool>(networkExtensionLoaded) Which is: true
https://results.webkit.org/?suite=api-tests&test=TestWebKitAPI.ContentFiltering.LazilyLoadPlatformFrameworks
Attachments
Patch
(17.52 KB, patch)
2020-10-28 19:14 PDT
,
Aditya Keerthi
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(18.01 KB, patch)
2020-10-28 19:31 PDT
,
Aditya Keerthi
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(17.79 KB, patch)
2020-10-28 19:38 PDT
,
Aditya Keerthi
no flags
Details
Formatted Diff
Diff
Patch
(20.77 KB, patch)
2020-10-29 09:06 PDT
,
Aditya Keerthi
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Ryan Haddad
Comment 1
2020-10-28 16:21:34 PDT
Test history suggests this started with
https://trac.webkit.org/changeset/269109/webkit
Radar WebKit Bug Importer
Comment 2
2020-10-28 16:21:50 PDT
<
rdar://problem/70785239
>
Aditya Keerthi
Comment 3
2020-10-28 19:14:39 PDT
Created
attachment 412602
[details]
Patch
Aditya Keerthi
Comment 4
2020-10-28 19:31:09 PDT
Created
attachment 412606
[details]
Patch
Aditya Keerthi
Comment 5
2020-10-28 19:38:56 PDT
Created
attachment 412607
[details]
Patch
Aditya Keerthi
Comment 6
2020-10-28 20:45:06 PDT
Will need to add a HAVE macro to avoid compiling NetworkExtensionContentFilter on tvOS.
Andy Estes
Comment 7
2020-10-29 05:58:26 PDT
Comment on
attachment 412607
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=412607&action=review
> Source/WebCore/Configurations/WebCore.xcconfig:114 > +WK_NETWORK_EXTENSION_LD_FLAGS = $(WK_NETWORK_EXTENSION_LD_FLAGS_$(WK_PLATFORM_NAME)); > +WK_NETWORK_EXTENSION_LD_FLAGS_iphoneos = -framework NetworkExtension; > +WK_NETWORK_EXTENSION_LD_FLAGS_iphonesimulator = -framework NetworkExtension; > +WK_NETWORK_EXTENSION_LD_FLAGS_watchos = -framework NetworkExtension; > +WK_NETWORK_EXTENSION_LD_FLAGS_watchsimulator = -framework NetworkExtension; > +WK_NETWORK_EXTENSION_LD_FLAGS_maccatalyst = -framework NetworkExtension; > +WK_NETWORK_EXTENSION_LD_FLAGS_macosx = -weak_framework NetworkExtension;
A simplification of this would be: WK_NETWORK_EXTENSION_LD_FLAGS = $(WK_NETWORK_EXTENSION_LD_FLAGS_$(WK_COCOA_TOUCH)); WK_NETWORK_EXTENSION_LD_FLAGS_cocoatouch = -framework NetworkExtension; WK_NETWORK_EXTENSION_LD_FLAGS_ = -weak_framework NetworkExtension; This would also fix the tvOS build.
> Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.h:57 > + WEBCORE_EXPORT static bool filterSourceRequiresFilter();
Nit: I think `filterSourceRequired` or `isRequired` would say enough.
Andy Estes
Comment 8
2020-10-29 05:59:55 PDT
(In reply to Aditya Keerthi from
comment #6
)
> Will need to add a HAVE macro to avoid compiling > NetworkExtensionContentFilter on tvOS.
I think the problem is just that you aren't linking the framework on tvOS.
Aditya Keerthi
Comment 9
2020-10-29 08:25:17 PDT
(In reply to Andy Estes from
comment #8
)
> (In reply to Aditya Keerthi from
comment #6
) > > Will need to add a HAVE macro to avoid compiling > > NetworkExtensionContentFilter on tvOS. > > I think the problem is just that you aren't linking the framework on tvOS.
The framework is not available on tvOS (
https://developer.apple.com/documentation/networkextension
).
Aditya Keerthi
Comment 10
2020-10-29 09:06:39 PDT
Created
attachment 412656
[details]
Patch
EWS
Comment 11
2020-10-29 15:26:54 PDT
Committed
r269173
: <
https://trac.webkit.org/changeset/269173
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 412656
[details]
.
mitz
Comment 12
2020-10-29 15:34:35 PDT
Comment on
attachment 412656
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=412656&action=review
> Source/WebCore/Configurations/WebCore.xcconfig:114 > +WK_NETWORK_EXTENSION_LD_FLAGS = $(WK_NETWORK_EXTENSION_LD_FLAGS_$(WK_PLATFORM_NAME)); > +WK_NETWORK_EXTENSION_LD_FLAGS_iphoneos = -framework NetworkExtension; > +WK_NETWORK_EXTENSION_LD_FLAGS_iphonesimulator = -framework NetworkExtension; > +WK_NETWORK_EXTENSION_LD_FLAGS_watchos = -framework NetworkExtension; > +WK_NETWORK_EXTENSION_LD_FLAGS_watchsimulator = -framework NetworkExtension; > +WK_NETWORK_EXTENSION_LD_FLAGS_maccatalyst = -framework NetworkExtension; > +WK_NETWORK_EXTENSION_LD_FLAGS_macosx = -weak_framework NetworkExtension;
If this is going to be a recurring pattern, you should consider instead introducing something like WK_MACOS_WEAK_FRAMEWORK = -framework; WK_MACOS_WEAK_FRAMEWORK[sdk=macosx*] = -weak_framework; in Base.xcconfig and then just adding “$(WK_MACOS_WEAK_FRAMEWORK) NetworkExtension” to OTHER_LDFLAGS.
Aditya Keerthi
Comment 13
2020-10-29 16:53:45 PDT
(In reply to mitz from
comment #12
)
> Comment on
attachment 412656
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=412656&action=review
> > > Source/WebCore/Configurations/WebCore.xcconfig:114 > > +WK_NETWORK_EXTENSION_LD_FLAGS = $(WK_NETWORK_EXTENSION_LD_FLAGS_$(WK_PLATFORM_NAME)); > > +WK_NETWORK_EXTENSION_LD_FLAGS_iphoneos = -framework NetworkExtension; > > +WK_NETWORK_EXTENSION_LD_FLAGS_iphonesimulator = -framework NetworkExtension; > > +WK_NETWORK_EXTENSION_LD_FLAGS_watchos = -framework NetworkExtension; > > +WK_NETWORK_EXTENSION_LD_FLAGS_watchsimulator = -framework NetworkExtension; > > +WK_NETWORK_EXTENSION_LD_FLAGS_maccatalyst = -framework NetworkExtension; > > +WK_NETWORK_EXTENSION_LD_FLAGS_macosx = -weak_framework NetworkExtension; > > If this is going to be a recurring pattern, you should consider instead > introducing something like > > WK_MACOS_WEAK_FRAMEWORK = -framework; > WK_MACOS_WEAK_FRAMEWORK[sdk=macosx*] = -weak_framework; > > in Base.xcconfig and then just adding “$(WK_MACOS_WEAK_FRAMEWORK) > NetworkExtension” to OTHER_LDFLAGS.
Thanks! Will keep that in mind for future changes in this area. Though in this case we cannot unconditionally add “$(WK_MACOS_WEAK_FRAMEWORK) NetworkExtension” to OTHER_LDFLAGS, due to the exclusion of tvOS.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug