Closed
Description
It's likely not a problem of rust itself, but should be noted anyway.
I get a bunch of errors when trying to compile stage1 on msvc-x64.
Example:
"C:\Programming\rust\build\x86_64-pc-windows-msvc\llvm\build\utils\FileCheck\FileCheck.vcxproj" (default target) (4)
->
(ResourceCompile target) ->
RC : fatal error RC1106: invalid option: -ologo [C:\Programming\rust\build\x86_64-pc-windows-msvc\llvm\build\utils
\FileCheck\FileCheck.vcxproj]
It happens because resource compiler gets two /nologo
flags for some reason.
Example from build log:
InitializeBuildStatus:
Touching "FileCheck.dir\Release\FileCheck.tlog\unsuccessfulbuild".
CustomBuild:
All outputs are up-to-date.
ClCompile:
All outputs are up-to-date.
ResourceCompile:
C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x86\rc.exe /D RC_VERSION_FIELD_1=4 /D RC_VERSION_FIELD_2=0
/D RC_VERSION_FIELD_3=1 /D RC_VERSION_FIELD_4=0 /D "RC_FILE_VERSION=\\\"4.0.1\\\"" /D "RC_INTERNAL_NAME=\\\"FileC
heck\\\"" /D "RC_PRODUCT_NAME=\\\"LLVM\\\"" /D "RC_PRODUCT_VERSION=\\\"4.0.1\\\"" /D WIN32 /D _HAS_EXCEPTIONS=0 /D
GTEST_HAS_RTTI=0 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_SECURE_NO_WARNINGS /D _CRT_NONSTDC_NO_DEPRECATE /D _CRT_NONS
TDC_NO_WARNINGS /D _SCL_SECURE_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /D UNICODE /D _UNICODE /D __STDC_CONSTANT_M
ACROS /D __STDC_FORMAT_MACROS /D __STDC_LIMIT_MACROS /D "CMAKE_INTDIR=\\\"Release\\\"" /D _UNICODE /D UNICODE /l"0
x0409" /I"C:\Programming\rust\build\x86_64-pc-windows-msvc\llvm\build\utils\FileCheck" /IC:\Programming\rust\src\l
lvm\utils\FileCheck /I"C:\Programming\rust\build\x86_64-pc-windows-msvc\llvm\build\include" /IC:\Programming\rust\
src\llvm\include /nologo /fo"FileCheck.dir\Release\windows_version_resource.res" /nologo C:\Programming\rust\src\
llvm\resources\windows_version_resource.rc
RC : fatal error RC1106: invalid option: -ologo [C:\Programming\rust\build\x86_64-pc-windows-msvc\llvm\build\utils\F
ileCheck\FileCheck.vcxproj]
It seems that one of these /nologo
flags comes from build\x86_64-pc-windows-msvc\llvm\build\lib\cmake\llvm\AddLLVM.cmake
(copied from src\llvm\cmake\modules\AddLLVM.cmake
?).
I guess that the other one is automatically added by msbuild
because of <SuppressStartupBanner>true</SuppressStartupBanner>
option.
That option, in turn, controlled by CMAKE_VERBOSE_MAKEFILE
which is false by default.
Removing /nologo
from AddLLVM.cmake
and running cmake manually helps.