RESOLVED DUPLICATE of bug 170833 161517
WebKit fails to build on Windows with Ninja due to bad flags passed to ml.exe
https://bugs.webkit.org/show_bug.cgi?id=161517
Summary WebKit fails to build on Windows with Ninja due to bad flags passed to ml.exe
Blaze Burg
Reported 2016-09-01 16:50:26 PDT
Configuration: - MSVC 14.0 - using Ninja - No Cygwin I don't really know enough about what's going on with Ninja and CMake to debug this without any pointers. Here's the relevant CMake rule: # The explanation for not making LLIntAssembly.h part of the OBJECT_DEPENDS property of some of # the .cpp files below is similar to the one in the previous comment. However, since these .cpp # files are used to build JavaScriptCore itself, we can just add LLIntAssembly.h to JSC_HEADERS # since it is used in the add_library() call at the end of this file. if (MSVC) enable_language(ASM_MASM) list(APPEND JavaScriptCore_SOURCES ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LowLevelInterpreterWin.asm ) # Win32 needs /safeseh with assembly, but Win64 does not. if (CMAKE_SIZEOF_VOID_P EQUAL 4) set_source_files_properties(${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LowLevelInterpreterWin.asm PROPERTIES COMPILE_FLAGS "/safeseh" ) endif () else () list(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h ) endif () Here's the build command that ninja made (from build.ninja). It should not have all of those flags, as the macro assembler doesn't seem to like cl.exe's flags. build Source\JavaScriptCore\CMakeFiles\JavaScriptCore.dir\__\__\DerivedSources\JavaScriptCore\LowLevelInterpreterWin.asm.obj: ASM_MASM_COMPILER__JavaScriptCore DerivedSources\JavaScriptCore\LowLevelInterpreterWin.asm || cmake_order_depends_target_JavaScriptCore DEFINES = -DBUILDING_JavaScriptCore -DBUILDING_WITH_CMAKE=1 -DHAVE_CONFIG_H=1 -DJavaScriptCore_EXPORTS -DNOMINMAX -DUNICODE -DWINVER=0x601 -D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1 -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_UNICODE -D_WINDOWS DEP_FILE = Source\JavaScriptCore\CMakeFiles\JavaScriptCore.dir\__\__\DerivedSources\JavaScriptCore\LowLevelInterpreterWin.asm.obj.d FLAGS = /wd4018 /wd4068 /wd4099 /wd4100 /wd4127 /wd4138 /wd4146 /wd4180 /wd4189 /wd4201 /wd4206 /wd4244 /wd4251 /wd4267 /wd4275 /wd4288 /wd4291 /wd4305 /wd4309 /wd4344 /wd4355 /wd4389 /wd4396 /wd4456 /wd4457 /wd4458 /wd4459 /wd4481 /wd4503 /wd4505 /wd4510 /wd4512 /wd4530 /wd4610 /wd4611 /wd4646 /wd4702 /wd4706 /wd4722 /wd4800 /wd4819 /wd4951 /wd4952 /wd4996 /wd6011 /wd6031 /wd6211 /wd6246 /wd6255 /wd6387 /Zi /GS /EHa- /EHc- /EHs- /fp:except- /analyze- /bigobj /Gy- /openmp- /GF- /Oy- /WX /Wv:18 /safeseh INCLUDES = -IDerivedSources\ForwardingHeaders -IDerivedSources -I..\..\WebKitLibraries\win\include -I. -I..\..\Source\JavaScriptCore -I..\..\Source\JavaScriptCore\.. -I..\..\Source\JavaScriptCore\API -I..\..\Source\JavaScriptCore\ForwardingHeaders -I..\..\Source\JavaScriptCore\assembler -I..\..\Source\JavaScriptCore\b3 -I..\..\Source\JavaScriptCore\b3\air -I..\..\Source\JavaScriptCore\bindings -I..\..\Source\JavaScriptCore\builtins -I..\..\Source\JavaScriptCore\bytecode -I..\..\Source\JavaScriptCore\bytecompiler -I..\..\Source\JavaScriptCore\dfg -I..\..\Source\JavaScriptCore\disassembler -I..\..\Source\JavaScriptCore\disassembler\udis86 -I..\..\Source\JavaScriptCore\ftl -I..\..\Source\JavaScriptCore\heap -I..\..\Source\JavaScriptCore\debugger -I..\..\Source\JavaScriptCore\inspector -I..\..\Source\JavaScriptCore\inspector\agents -I..\..\Source\JavaScriptCore\inspector\augmentable -I..\..\Source\JavaScriptCore\inspector\remote -I..\..\Source\JavaScriptCore\interpreter -I..\..\Source\JavaScriptCore\jit -I..\..\Source\JavaScriptCore\llint -I..\..\Source\JavaScriptCore\parser -I..\..\Source\JavaScriptCore\profiler -I..\..\Source\JavaScriptCore\replay -I..\..\Source\JavaScriptCore\runtime -I..\..\Source\JavaScriptCore\tools -I..\..\Source\JavaScriptCore\wasm -I..\..\Source\JavaScriptCore\yarr -IDerivedSources\JavaScriptCore -IDerivedSources\JavaScriptCore\inspector -I..\include\private OBJECT_DIR = Source\JavaScriptCore\CMakeFiles\JavaScriptCore.dir OBJECT_FILE_DIR = Source\JavaScriptCore\CMakeFiles\JavaScriptCore.dir\__\__\DerivedSources\JavaScriptCore TARGET_COMPILE_PDB = Source\JavaScriptCore\CMakeFiles\JavaScriptCore.dir\ TARGET_PDB = bin32\JavaScriptCore.pdb RSP_FILE = Source\JavaScriptCore\CMakeFiles\JavaScriptCore.dir\__\__\DerivedSources\JavaScriptCore\LowLevelInterpreterWin.asm.obj.rsp The terminal output from the failed command is here: [3/2292] Building ASM_MASM object Source\JavaScriptCore\CMakeFiles\J...r\__\__\DerivedSources\JavaScriptCore\LowLevelInterpreterWin.asm.obj FAILED: Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/LowLevelInterpreterWin.asm.obj C:\PROGRA~2\MICROS~1.0\VC\bin\ml.exe @Source\JavaScriptCore\CMakeFiles\JavaScriptCore.dir\__\__\DerivedSources\JavaScriptCore\LowLevelInterpreterWin.asm.obj.rsp /c /Fo Source\JavaScriptCore\CMakeFiles\JavaScriptCore.dir\__\__\DerivedSources\JavaScriptCore\LowLevelInterpreterWin.asm.obj DerivedSources\JavaScriptCore\LowLevelInterpreterWin.asm MASM : warning A4018:invalid command-line option : /wd4018 MASM : warning A4018:invalid command-line option : /wd4068 MASM : warning A4018:invalid command-line option : /wd4099 MASM : warning A4018:invalid command-line option : /wd4100 MASM : warning A4018:invalid command-line option : /wd4127 MASM : warning A4018:invalid command-line option : /wd4138 MASM : warning A4018:invalid command-line option : /wd4146 MASM : warning A4018:invalid command-line option : /wd4180 MASM : warning A4018:invalid command-line option : /wd4189 MASM : warning A4018:invalid command-line option : /wd4201 MASM : warning A4018:invalid command-line option : /wd4206 MASM : warning A4018:invalid command-line option : /wd4244 MASM : warning A4018:invalid command-line option : /wd4251 MASM : warning A4018:invalid command-line option : /wd4267 MASM : warning A4018:invalid command-line option : /wd4275 MASM : warning A4018:invalid command-line option : /wd4288 MASM : warning A4018:invalid command-line option : /wd4291 MASM : warning A4018:invalid command-line option : /wd4305 MASM : warning A4018:invalid command-line option : /wd4309 MASM : warning A4018:invalid command-line option : /wd4344 MASM : warning A4018:invalid command-line option : /wd4355 MASM : warning A4018:invalid command-line option : /wd4389 MASM : warning A4018:invalid command-line option : /wd4396 MASM : warning A4018:invalid command-line option : /wd4456 MASM : warning A4018:invalid command-line option : /wd4457 MASM : warning A4018:invalid command-line option : /wd4458 MASM : warning A4018:invalid command-line option : /wd4459 MASM : warning A4018:invalid command-line option : /wd4481 MASM : warning A4018:invalid command-line option : /wd4503 MASM : warning A4018:invalid command-line option : /wd4505 MASM : warning A4018:invalid command-line option : /wd4510 MASM : warning A4018:invalid command-line option : /wd4512 MASM : warning A4018:invalid command-line option : /wd4530 MASM : warning A4018:invalid command-line option : /wd4610 MASM : warning A4018:invalid command-line option : /wd4611 MASM : warning A4018:invalid command-line option : /wd4646 MASM : warning A4018:invalid command-line option : /wd4702 MASM : warning A4018:invalid command-line option : /wd4706 MASM : warning A4018:invalid command-line option : /wd4722 MASM : warning A4018:invalid command-line option : /wd4800 MASM : warning A4018:invalid command-line option : /wd4819 MASM : warning A4018:invalid command-line option : /wd4951 MASM : warning A4018:invalid command-line option : /wd4952 MASM : warning A4018:invalid command-line option : /wd4996 MASM : warning A4018:invalid command-line option : /wd6011 MASM : warning A4018:invalid command-line option : /wd6031 MASM : warning A4018:invalid command-line option : /wd6211 MASM : warning A4018:invalid command-line option : /wd6246 MASM : warning A4018:invalid command-line option : /wd6255 MASM : warning A4018:invalid command-line option : /wd6387 MASM : warning A4018:invalid command-line option : /GS MASM : warning A4018:invalid command-line option : /EHa- MASM : warning A4018:invalid command-line option : /EHc- MASM : warning A4018:invalid command-line option : /EHs- MASM : warning A4018:invalid command-line option : /fp:except- MASM : warning A4018:invalid command-line option : /analyze- MASM : warning A4018:invalid command-line option : /bigobj MASM : warning A4018:invalid command-line option : /openmp- MASM : warning A4018:invalid command-line option : /GF- MASM : warning A4018:invalid command-line option : /Oy- MASM : fatal error A1013:invalid numerical command-line argument : /W Microsoft (R) Macro Assembler Version 14.00.24210.0 Copyright (C) Microsoft Corporation. All rights reserved. [5/2292] cmd.exe /C "cd /D C:\Code\webkit\OpenSource\WebKitBuild\Rel...\OpenSource\WebKitBuild\Release\DerivedSources\WebCore\preBuild.cmd" ninja: build stopped: subcommand failed. ===== BUILD FAILED ======
Attachments
Blaze Burg
Comment 1 2016-09-01 17:00:10 PDT
Building without ninja works as expected (at least builds through JavaScriptCore).
Alex Christensen
Comment 2 2016-09-01 17:12:28 PDT
Is this a 32-bit build? My WinCairo bot is doing 64-bit ninja builds and has been successfully for a while. We could do something like what I did in https://trac.webkit.org/changeset/194434 and just call ml.exe directly.
Don Olmstead
Comment 3 2017-05-12 15:49:02 PDT
*** This bug has been marked as a duplicate of bug 170833 ***
Note You need to log in before you can comment on or make changes to this bug.