Title: [267034] trunk
Revision
267034
Author
[email protected]
Date
2020-09-14 13:17:40 -0700 (Mon, 14 Sep 2020)

Log Message

[WinCairo][MediaFoundation] r264188 introduced linker warning: LNK4199: /DELAYLOAD:mf.dll ignored; no imports found from mf.dll
https://bugs.webkit.org/show_bug.cgi?id=214170

Reviewed by Alex Christensen.

Source/WebCore:

r264188 added the linker flag /DELAYLOAD:mf.dll to WebCore. It
introduced a lot of linker warnings for modules not using
MediaFoundation, for example WebKitWebProcess.exe,
MiniBrowserLib.dll, etc. The linker option should be applied only
to direct WebCore consumers, namely WebKit.dll, WebKit2.dll and
TestWebCore.exe.

Define a INTERFACE library, and link it explicitly with the direct
WebCore consumers.

* PlatformWinCairo.cmake:

Source/WebKit:

* PlatformWin.cmake:

Source/WebKitLegacy:

* PlatformWin.cmake:

Tools:

* TestWebKitAPI/PlatformWin.cmake:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (267033 => 267034)


--- trunk/Source/WebCore/ChangeLog	2020-09-14 20:09:15 UTC (rev 267033)
+++ trunk/Source/WebCore/ChangeLog	2020-09-14 20:17:40 UTC (rev 267034)
@@ -1,3 +1,22 @@
+2020-09-14  Fujii Hironori  <[email protected]>
+
+        [WinCairo][MediaFoundation] r264188 introduced linker warning: LNK4199: /DELAYLOAD:mf.dll ignored; no imports found from mf.dll
+        https://bugs.webkit.org/show_bug.cgi?id=214170
+
+        Reviewed by Alex Christensen.
+
+        r264188 added the linker flag /DELAYLOAD:mf.dll to WebCore. It
+        introduced a lot of linker warnings for modules not using
+        MediaFoundation, for example WebKitWebProcess.exe,
+        MiniBrowserLib.dll, etc. The linker option should be applied only
+        to direct WebCore consumers, namely WebKit.dll, WebKit2.dll and
+        TestWebCore.exe.
+
+        Define a INTERFACE library, and link it explicitly with the direct
+        WebCore consumers.
+
+        * PlatformWinCairo.cmake:
+
 2020-09-14  Dean Jackson  <[email protected]>
 
         Enable WebGL2 by default

Modified: trunk/Source/WebCore/PlatformWinCairo.cmake (267033 => 267034)


--- trunk/Source/WebCore/PlatformWinCairo.cmake	2020-09-14 20:09:15 UTC (rev 267033)
+++ trunk/Source/WebCore/PlatformWinCairo.cmake	2020-09-14 20:17:40 UTC (rev 267034)
@@ -38,14 +38,9 @@
 )
 
 list(APPEND WebCore_LIBRARIES
-    D3d9
-    Mf
-    Mfplat
     comctl32
     crypt32
     delayimp
-    dxva2
-    evr
     iphlpapi
     rpcrt4
     shlwapi
@@ -55,7 +50,25 @@
     ws2_32
 )
 
-target_link_options(WebCore PUBLIC /DELAYLOAD:mf.dll /DELAYLOAD:mfplat.dll)
+# Define a INTERFACE library for MediaFoundation and link it
+# explicitly with direct WebCore consumers because /DELAYLOAD causes
+# linker warnings for modules not using MediaFoundation.
+#  LINK : warning LNK4199: /DELAYLOAD:mf.dll ignored; no imports found from mf.dll
+add_library(MediaFoundation INTERFACE)
+target_link_libraries(MediaFoundation INTERFACE
+    d3d9
+    dxva2
+    evr
+    mf
+    mfplat
+)
+target_link_options(MediaFoundation INTERFACE
+    /DELAYLOAD:d3d9.dll
+    /DELAYLOAD:dxva2.dll
+    /DELAYLOAD:evr.dll
+    /DELAYLOAD:mf.dll
+    /DELAYLOAD:mfplat.dll
+)
 
 if (USE_WOFF2)
     # The WOFF2 libraries don't compile as DLLs on Windows, so add in

Modified: trunk/Source/WebKit/ChangeLog (267033 => 267034)


--- trunk/Source/WebKit/ChangeLog	2020-09-14 20:09:15 UTC (rev 267033)
+++ trunk/Source/WebKit/ChangeLog	2020-09-14 20:17:40 UTC (rev 267034)
@@ -1,3 +1,12 @@
+2020-09-14  Fujii Hironori  <[email protected]>
+
+        [WinCairo][MediaFoundation] r264188 introduced linker warning: LNK4199: /DELAYLOAD:mf.dll ignored; no imports found from mf.dll
+        https://bugs.webkit.org/show_bug.cgi?id=214170
+
+        Reviewed by Alex Christensen.
+
+        * PlatformWin.cmake:
+
 2020-09-14  Devin Rousso  <[email protected]>
 
         Web Inspector: docking buttons don't work when already docked if window is too small

Modified: trunk/Source/WebKit/PlatformWin.cmake (267033 => 267034)


--- trunk/Source/WebKit/PlatformWin.cmake	2020-09-14 20:09:15 UTC (rev 267033)
+++ trunk/Source/WebKit/PlatformWin.cmake	2020-09-14 20:17:40 UTC (rev 267034)
@@ -166,6 +166,7 @@
 
     list(APPEND WebKit_PRIVATE_LIBRARIES
         $<TARGET_OBJECTS:WebCore>
+        MediaFoundation
         OpenSSL::SSL
         mfuuid.lib
         strmiids.lib

Modified: trunk/Source/WebKitLegacy/ChangeLog (267033 => 267034)


--- trunk/Source/WebKitLegacy/ChangeLog	2020-09-14 20:09:15 UTC (rev 267033)
+++ trunk/Source/WebKitLegacy/ChangeLog	2020-09-14 20:17:40 UTC (rev 267034)
@@ -1,3 +1,12 @@
+2020-09-14  Fujii Hironori  <[email protected]>
+
+        [WinCairo][MediaFoundation] r264188 introduced linker warning: LNK4199: /DELAYLOAD:mf.dll ignored; no imports found from mf.dll
+        https://bugs.webkit.org/show_bug.cgi?id=214170
+
+        Reviewed by Alex Christensen.
+
+        * PlatformWin.cmake:
+
 2020-08-12  Keith Rollin  <[email protected]>
 
         Remove the need for defining USE_NEW_BUILD_SYSTEM

Modified: trunk/Source/WebKitLegacy/PlatformWin.cmake (267033 => 267034)


--- trunk/Source/WebKitLegacy/PlatformWin.cmake	2020-09-14 20:09:15 UTC (rev 267033)
+++ trunk/Source/WebKitLegacy/PlatformWin.cmake	2020-09-14 20:17:40 UTC (rev 267034)
@@ -9,6 +9,7 @@
     )
     list(APPEND WebKitLegacy_PRIVATE_LIBRARIES
         $<TARGET_OBJECTS:WebCore>
+        MediaFoundation
         OpenSSL::SSL
         mfuuid.lib
         strmiids.lib

Modified: trunk/Tools/ChangeLog (267033 => 267034)


--- trunk/Tools/ChangeLog	2020-09-14 20:09:15 UTC (rev 267033)
+++ trunk/Tools/ChangeLog	2020-09-14 20:17:40 UTC (rev 267034)
@@ -1,5 +1,14 @@
 2020-09-14  Fujii Hironori  <[email protected]>
 
+        [WinCairo][MediaFoundation] r264188 introduced linker warning: LNK4199: /DELAYLOAD:mf.dll ignored; no imports found from mf.dll
+        https://bugs.webkit.org/show_bug.cgi?id=214170
+
+        Reviewed by Alex Christensen.
+
+        * TestWebKitAPI/PlatformWin.cmake:
+
+2020-09-14  Fujii Hironori  <[email protected]>
+
         [TestRunnerShared] Make UIScriptContext not directly call UIScriptController::create which are defined in DRT and WTR
         https://bugs.webkit.org/show_bug.cgi?id=216470
 

Modified: trunk/Tools/TestWebKitAPI/PlatformWin.cmake (267033 => 267034)


--- trunk/Tools/TestWebKitAPI/PlatformWin.cmake	2020-09-14 20:09:15 UTC (rev 267033)
+++ trunk/Tools/TestWebKitAPI/PlatformWin.cmake	2020-09-14 20:17:40 UTC (rev 267034)
@@ -53,6 +53,7 @@
 if (${WTF_PLATFORM_WIN_CAIRO})
     list(APPEND TestWebCore_LIBRARIES
         Cairo::Cairo
+        MediaFoundation
         OpenSSL::SSL
         mfuuid
         strmiids
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to