[Win] lld-link: error: /manifestdependency: is not allowed in .drectve
authorHironori.Fujii@sony.com <Hironori.Fujii@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Mar 2020 06:43:11 +0000 (06:43 +0000)
committerHironori.Fujii@sony.com <Hironori.Fujii@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Mar 2020 06:43:11 +0000 (06:43 +0000)
https://bugs.webkit.org/show_bug.cgi?id=204831

Reviewed by Ross Kirsling.

.:

clang-cl doesn't support #pragma comment(linker, "/manifestdependency ..").
Use an linker option instead.

* Source/cmake/WebKitMacros.cmake (WEBKIT_EXECUTABLE): Added -manifestdependency linkder option if WIN32.

Source/JavaScriptCore:

* shell/DLLLauncherMain.cpp: Removed /manifestdependency for Microsoft.VC80.CRT which seems leftover of Bug 116562 (r178530).

Tools:

* TestWebKitAPI/win/main.cpp:
* win/DLLLauncher/DLLLauncherMain.cpp:

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

ChangeLog
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/shell/DLLLauncherMain.cpp
Source/cmake/WebKitMacros.cmake
Tools/ChangeLog
Tools/TestWebKitAPI/win/main.cpp
Tools/win/DLLLauncher/DLLLauncherMain.cpp

index 6abe04d..d9c509b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2020-03-25  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        [Win] lld-link: error: /manifestdependency: is not allowed in .drectve
+        https://bugs.webkit.org/show_bug.cgi?id=204831
+
+        Reviewed by Ross Kirsling.
+
+        clang-cl doesn't support #pragma comment(linker, "/manifestdependency ..").
+        Use an linker option instead.
+
+        * Source/cmake/WebKitMacros.cmake (WEBKIT_EXECUTABLE): Added -manifestdependency linkder option if WIN32.
+
 2020-03-23  Michael Catanzaro  <mcatanzaro@gnome.org>
 
         [GTK] Allow distributors to brand user agent
index 36d0bd9..f6fece2 100644 (file)
@@ -1,3 +1,12 @@
+2020-03-25  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        [Win] lld-link: error: /manifestdependency: is not allowed in .drectve
+        https://bugs.webkit.org/show_bug.cgi?id=204831
+
+        Reviewed by Ross Kirsling.
+
+        * shell/DLLLauncherMain.cpp: Removed /manifestdependency for Microsoft.VC80.CRT which seems leftover of Bug 116562 (r178530).
+
 2020-03-25  Alexey Shvayka  <shvaikalesh@gmail.com>
 
         RegExp.prototype[@@replace] relies on globals and doesn't perform ToLength
index b9a5d01..20eba22 100644 (file)
 #include <vector>
 #include <windows.h>
 
-#if defined _M_IX86
-#define PROCESSORARCHITECTURE "x86"
-#elif defined _M_IA64
-#define PROCESSORARCHITECTURE "ia64"
-#elif defined _M_X64
-#define PROCESSORARCHITECTURE "amd64"
-#else
-#define PROCESSORARCHITECTURE "*"
-#endif
-
-#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='" PROCESSORARCHITECTURE "' publicKeyToken='6595b64144ccf1df' language='*'\"")
-#if defined(_MSC_VER) && (_MSC_VER >= 1600) && !defined(WIN_CAIRO)
-#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.6195' processorArchitecture='" PROCESSORARCHITECTURE "' publicKeyToken='1fc8b3b9a1e18e3b' language='*'\"")
-#endif
-
 static void enableTerminationOnHeapCorruption()
 {
     HEAP_INFORMATION_CLASS heapEnableTerminationOnCorruption = static_cast<HEAP_INFORMATION_CLASS>(1);
index 572cc70..5c6e346 100644 (file)
@@ -217,6 +217,16 @@ macro(WEBKIT_EXECUTABLE _target)
     if (${_target}_OUTPUT_NAME)
         set_target_properties(${_target} PROPERTIES OUTPUT_NAME ${${_target}_OUTPUT_NAME})
     endif ()
+    if (WIN32)
+        if (WTF_CPU_X86)
+            set(_processor_architecture "x86")
+        elseif (WTF_CPU_X86_64)
+            set(_processor_architecture "amd64")
+        else ()
+            set(_processor_architecture "*")
+        endif ()
+        target_link_options(${_target} PRIVATE "-manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='${_processor_architecture}'")
+    endif ()
 endmacro()
 
 macro(WEBKIT_WRAP_EXECUTABLE _target)
index 12e14d4..578cde3 100644 (file)
@@ -1,3 +1,13 @@
+2020-03-25  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        [Win] lld-link: error: /manifestdependency: is not allowed in .drectve
+        https://bugs.webkit.org/show_bug.cgi?id=204831
+
+        Reviewed by Ross Kirsling.
+
+        * TestWebKitAPI/win/main.cpp:
+        * win/DLLLauncher/DLLLauncherMain.cpp:
+
 2020-03-25  Alexey Shvayka  <shvaikalesh@gmail.com>
 
         Invalid numeric and named references should be early syntax errors
index ed6efb7..4d43d22 100644 (file)
 #include "TestsController.h"
 #include <windows.h>
 
-#if defined _M_IX86
-#define PROCESSORARCHITECTURE "x86"
-#elif defined _M_IA64
-#define PROCESSORARCHITECTURE "ia64"
-#elif defined _M_X64
-#define PROCESSORARCHITECTURE "amd64"
-#else
-#define PROCESSORARCHITECTURE "*"
-#endif
-
-#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='" PROCESSORARCHITECTURE "' publicKeyToken='6595b64144ccf1df' language='*'\"")
-
 int main(int argc, char** argv)
 {
     // Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which we will inherit. This is bad for
index 14e6b23..6dd617d 100644 (file)
 
 using namespace std;
 
-#if defined _M_IX86
-#define PROCESSORARCHITECTURE "x86"
-#elif defined _M_IA64
-#define PROCESSORARCHITECTURE "ia64"
-#elif defined _M_X64
-#define PROCESSORARCHITECTURE "amd64"
-#else
-#define PROCESSORARCHITECTURE "*"
-#endif
-
-#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='" PROCESSORARCHITECTURE "' publicKeyToken='6595b64144ccf1df' language='*'\"")
-
 static void enableTerminationOnHeapCorruption()
 {
     HEAP_INFORMATION_CLASS heapEnableTerminationOnCorruption = static_cast<HEAP_INFORMATION_CLASS>(1);