Building Swift on Windows

Hi,
after finally having installed the corrent version of visual studio I’m stuck at building llvm/clang (step 6 of https://github.com/apple/swift/blob/master/docs/WindowsBuild.md#clang-cl)

The step where it failed:
FAILED: tools/clang/lib/Tooling/Refactor/CMakeFiles/clangToolingRefactor.dir/Extract.cpp.obj
“J:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.13.26128\bin\Hostx64\x64\cl.exe” /nologo /TP -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GNU_SOURCE -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\clang\lib\Tooling\Refactor -IJ:\swift\llvm\tools\clang\lib\Tooling\Refactor -IJ:\swift\llvm\tools\clang\include -Itools\clang\include -Iinclude -IJ:\swift\llvm\include /DWIN32 /D_WINDOWS /Zc:inline /Zc:strictStrings /Oi /Zc:rvalueCast /W4 -wd4141 -wd4146 -wd4180 -wd4244 -wd4258 -wd4267 -wd4291 -wd4345 -wd4351 -wd4355 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4800 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4324 -w14062 -we4238 /MD /Zi /O2 /Ob1 -UNDEBUG /EHs-c- /GR- /showIncludes /Fotools\clang\lib\Tooling\Refactor\CMakeFiles\clangToolingRefactor.dir\Extract.cpp.obj /Fdtools\clang\lib\Tooling\Refactor\CMakeFiles\clangToolingRefactor.dir\clangToolingRefactor.pdb /FS -c J:\swift\llvm\tools\clang\lib\Tooling\Refactor\Extract.cpp
J:\swift\llvm\tools\clang\lib\Tooling\Refactor\Extract.cpp : fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj
[1934/2529] Building CXX object tools\clang\lib\Frontend\CMakeFiles\clangFrontend.dir\ASTConsumers.cpp.obj
ninja: build stopped: subcommand failed.

Apparently I have to set the /bigobj flag only I have no Idea where and how. All instructions I find are about the (Visual Studio) IDE.

Anyone who can help me with that?

Sorry, I didn't see this. I believe that this should be fixed at this point. You should be able to build with the top of the tree. I've been trying to keep the documentation somewhat accurate, but it probably has fallen out of date. Please do help keep the documentation up-to-date if you notice that it is out of date.

Terms of Service

Privacy Policy

Cookie Policy