Description
I'm investigating a build problem in "Windows 2012 x64 asan" on TaskCluster CI:
INFO - lld-link: error: /failifmismatch: mismatch detected for 'RuntimeLibrary':
INFO - >>> js_static.lib(BinASTTokenReaderBase.obj) has value MD_DynamicRelease
INFO - >>> gkrust_gtest.lib(wrapper.o) has value MT_StaticRelease
The build environment is set as:
INFO - [spirv_cross 0.16.0] OPT_LEVEL = Some("2")
INFO - [spirv_cross 0.16.0] TARGET = Some("x86_64-pc-windows-msvc")
INFO - [spirv_cross 0.16.0] HOST = Some("x86_64-pc-windows-msvc")
INFO - [spirv_cross 0.16.0] CXX_x86_64-pc-windows-msvc = None
INFO - [spirv_cross 0.16.0] CXX_x86_64_pc_windows_msvc = Some("z:/build/fetches/sccache/sccache.exe z:/build/fetches/clang/bin/clang.exe --driver-mode=cl")
What happens then is that the actual compiler used becomes "clang-cl" (presumably because it's "clang.exe" with "cl" driver), but cc
thinks it's ToolFamily::Clang
because of this check.
Edit: as a result, the option to dynamically link C standard library is not provided, and we fail.
@alexcrichton this is a blocker of a large PR I'm trying to land. I can submit a fix to this repo that checks for "cl" driver mode under "clang.exe" compiler. Would you be open to this solution being merged and published? Or is there a better one?