I ran the `clean images` targets with the different toolchains but
didn't really notice any significant difference.
FWIW, for older versions of VS the x64 toolchain does seem to be preferred:
VCVARSFILES="vc/bin/amd64/vcvars64.bat
vc/bin/x86_amd64/vcvarsx86_amd64.bat \
VC/Auxiliary/Build/vcvarsx86_amd64.bat
VC/Auxiliary/Build/vcvars64.bat"
(The last 2 paths are for the newer version)
Using the x64 toolchain might be useful for preventing crashes due to
running out of memory. I've run into a compiler/linker crash a couple of
times in the past, though I'm not sure they were caused by OOM, that
seems the most likely to me.
Jorn
On 10/10/2019 19:52, Erik Joelsson wrote:
Hello Jorn,
On 2019-10-09 07:00, Jorn Vernee wrote:
Hi,
I was testing with different versions of Visual Studio to try and
nail down the source of a deprecation warning. I was using the
--with-tools-dir config option to quickly switch between
installations but noticed the VS install that was being found through
that method was being discarded, leading to a failed configuration.
The fix is pretty simple:
http://cr.openjdk.java.net/~jvernee/vs_tools_dir/webrev.00/
The TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT macro sets the
VS_ENV_CMD var, and skips doing anything when it is already set. So,
previously, by setting it to an empty string _after_ the check for
--with-tools-dir any VS install that's found with that method is
always discarded, or otherwise overwritten when another method for
finding a VS installation also works.
Looks good, thanks for fixing it!
With that fix selecting the VS installation works as expected.
On a side note; I noticed that the hostx86 toolchain is preferred
over the hostx64 version in VS 2017+, due to the order of values in
VCVARSFILES in TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT. Is there
any particular reason for this? I'd expect the x64 toolchain would be
preferred on x64 platforms.
Hm, I think I agree. I'm probably responsible for that choice and I
think I was just trying to be conservative with changes. Would you
mind changing it and see if it has any effect on performance?
/Erik
Jorn