[build2] Using build2 with clang 6 (trunk) on windows
Username I Wanted Was Already Taken
usernameiwantedwasalreadytaken at gmail.com
Tue Dec 5 11:57:22 UTC 2017
Hi,
> Ok, I've staged a new version which fixes the target triplet issue and
> also re-maps the target for Clang on Windows. Can you give it a try (from
> the developer command prompt)? You should be able to upgrade it with bpkg
> (i.e., bpkg fetch && bpkg build build2).
This worked. The program compiled, but the executable produced does not
have a ".exe" extension. If I manually rename "hello" to "hello.exe", it
works.
> I think as a first step let's assume build2 is
> run from the corresponding developer command prompt, just as we do with
> VC currently.
If we are to assume that (which sounds reasonable), build2 can check the
environment for the specific version of the MSVC runtime that is loaded.
There is still no guarantee that Clang will use this runtime (since the
user may have more than one version of MSVC installed in his machine), but
I think this is better than nothing.
For example, in my setup the following environment variables are defined
when running from a development command line:
VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\Common7\Tools\
VSCMD_ARG_app_plat=Desktop
VSCMD_ARG_HOST_ARCH=x64
VSCMD_ARG_TGT_ARCH=x64
VSCMD_VER=15.4.5
VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\
Regards,
Jack
On Mon, Dec 4, 2017 at 3:37 PM, Boris Kolpackov <boris at codesynthesis.com>
wrote:
> Username I Wanted Was Already Taken <usernameiwantedwasalreadytake
> n at gmail.com> writes:
>
> > Here it is (I skipped the first few lines of "trace: main..." because
> these
> > e-mails are public... hope you don't mind):
>
> Sure, thanks for the log. I believe I have figured it out and fixed.
>
>
> > I don't know a way to query that, but will look into it.
>
> Great, thanks. For the time being I've hardcoded it as 14.1.
>
>
> > Actually no. I can run Clang (and build2) from a normal command line
> > prompt. Of course I can also run from a Visual Studio Command Prompt, but
> > that gives me the same result. Clang searches for the MSVC environment
> > variables by itself, see:
> >
> > https://github.com/llvm-mirror/clang/blob/master/lib/
> Driver/ToolChains/MSVC.cpp
>
> Yes, I remember a long thread on cfe-dev where this was discussed. Sounded
> hairy, to put it mildly. I think as a first step let's assume build2 is
> run from the corresponding developer command prompt, just as we do with
> VC currently.
>
>
> > C:\Tests\Build2\hello\clang-6>clang -print-search-dirs
> > programs: =C:\LLVM\build\bin
> > libraries: =C:\LLVM\build\lib\clang\6.0.0
>
> I was hoping for the MSVC/SDK toolchain paths in programs. But no luck.
>
> Ok, I've staged a new version which fixes the target triplet issue and
> also re-maps the target for Clang on Windows. Can you give it a try (from
> the developer command prompt)? You should be able to upgrade it with bpkg
> (i.e., bpkg fetch && bpkg build build2).
>
> Boris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.build2.org/archives/users/attachments/20171205/757d9767/attachment.html>
More information about the users
mailing list