[Win] lld-link: error: /manifestdependency: is not allowed in .drectve I tried LLVM-9.0.0-r363781-win64.exe to build WinCairo today, and see the following linkage errors. > [1696/5123] Linking CXX executable bin64\testRegExp.exe > FAILED: bin64/testRegExp.exe > cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=Source\JavaScriptCore\shell\CMakeFiles\testRegExp.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests -- C:\tools\llvm\bin\lld-link.exe /nologo Source\JavaScriptCore\shell\CMakeFiles\testRegExp.dir\DLLLauncherMain.cpp.obj /out:bin64\testRegExp.exe /implib:lib64\testRegExp.lib /pdb:bin64\testRegExp.pdb /version:0.0 /machine:x64 /DEBUG /OPT:ICF /OPT:REF /OPT:NOREF /OPT:NOICF /INCREMENTAL:NO /debug /INCREMENTAL /INCREMENTAL:NO /subsystem:console -LIBPATH:C:\webkit\gb\WebKitBuild\Debug\lib64 -LIBPATH:C:\webkit\gb\WebKitLibraries\win\lib64 shlwapi.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ." > LINK Pass 1: command "C:\tools\llvm\bin\lld-link.exe /nologo Source\JavaScriptCore\shell\CMakeFiles\testRegExp.dir\DLLLauncherMain.cpp.obj /out:bin64\testRegExp.exe /implib:lib64\testRegExp.lib /pdb:bin64\testRegExp.pdb /version:0.0 /machine:x64 /DEBUG /OPT:ICF /OPT:REF /OPT:NOREF /OPT:NOICF /INCREMENTAL:NO /debug /INCREMENTAL /INCREMENTAL:NO /subsystem:console -LIBPATH:C:\webkit\gb\WebKitBuild\Debug\lib64 -LIBPATH:C:\webkit\gb\WebKitLibraries\win\lib64 shlwapi.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:Source\JavaScriptCore\shell\CMakeFiles\testRegExp.dir/intermediate.manifest Source\JavaScriptCore\shell\CMakeFiles\testRegExp.dir/manifest.res" failed (exit code 1) with the following output: > lld-link: error: /manifestdependency: is not allowed in .drectve
The following files has /manifestdependency. Tools/TestWebKitAPI/win/main.cpp Source/JavaScriptCore/shell/DLLLauncherMain.cpp Tools/win/DLLLauncher/DLLLauncherMain.cpp > #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='" PROCESSORARCHITECTURE "' publicKeyToken='6595b64144ccf1df' language='*'\"")
LLVM bug ticket: 38797 – lld-link compatibility: reading manifestdependency from .drectve https://bugs.llvm.org/show_bug.cgi?id=38797
(In reply to Fujii Hironori from comment #0) > I tried LLVM-9.0.0-r363781-win64.exe to build WinCairo today, and see the LLVM-9.0.0-r363781-win64.exe is too old. I tried LLVM-10.0.0-r375090-win64.exe, and observed the issue still happen.
CMake prefers lld-link over link.exe if Clang is used. https://gitlab.kitware.com/cmake/cmake/commit/079b8e29168dc081f37f79f3577a5c0690bb7051 I need to remove lld-link.exe in my PATH to make CMake choose link.exe.
Created attachment 394563 [details] Patch
Comment on attachment 394563 [details] Patch Nice. I take it we don't care about ia64, whatever that is?
Comment on attachment 394563 [details] Patch Clearing flags on attachment: 394563 Committed r259035: <https://trac.webkit.org/changeset/259035>
All reviewed patches have been landed. Closing bug.
<rdar://problem/60907396>
Re-opened since this is blocked by bug 209597
Created attachment 394694 [details] Patch
Created attachment 394695 [details] Patch
Comment on attachment 394695 [details] Patch Clearing flags on attachment: 394695 Committed r259102: <https://trac.webkit.org/changeset/259102>