[build2] Using build2 with clang 6 (trunk) on windows
Boris Kolpackov
boris at codesynthesis.com
Mon Dec 4 12:41:31 UTC 2017
Username I Wanted Was Already Taken <usernameiwantedwasalreadytaken at gmail.com> writes:
> First of all thanks for the great work with Build2. I'm starting using it,
> but it seems a great tool.
Thanks, I am glad you like it so far!
> I am trying to compile a simple hello sample on windows. I have MSVC
> Community 2017 and Clang 6 (built from source) installed.
We haven't really tested this combination, but if you are willing to
provide some feedback (see below), I am sure we can make it work.
> C:\Tests\Build2\hello\clang-6>b
> ../hello/build\root.build:3:7: error: cc and bin module target mismatch
> info: cc.target is x86_64-windows-msvc
> info: bin.target is x86_64-windows-msvc
Hm, this definitely doesn't look right. Can you re-run it with --verbose 6
and send the output?
> target x86_64-windows-msvc (x86_64-pc-windows-msvc)
> inc dirs
> C:\LLVM\build\lib\clang\6.0.0\include\
> C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include\
> C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt\
> C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared\
> C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um\
> C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt\
This is interesting, thanks for sending it. To support Clang with the
MSVC target I can see two immediate things that we will need to do:
1. We will need to remap Clang's 'x86_64-pc-windows-msvc' to build2's
more precise 'x86_64-microsoft-win32-msvcNN.N' where NN.N is the
MSVC runtime version.
In this light, do you know if there is a way to query Clang for
the MSVC runtime it is using? I guess we could get it from the
'...\MSVC\14.11.25503\include' bit of the include path but that
feels rather hackish.
2. We will need to find the rest of the toolchain (link.exe, rc.exe,
mt.exe, etc).
When you use Clang, are you expected to run it from the corresponding
MSVC development command prompt (where the PATH is already set to
include the correct variants of these tools)?
Also, can you show the output of this command:
clang -print-search-dirs
Thanks,
Boris
More information about the users
mailing list