VS install found through --with-tools-dir value is discarded
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Fri Oct 11 07:06:58 UTC 2019
> 9 okt. 2019 kl. 16:00 skrev Jorn Vernee <jorn.vernee at oracle.com>:
>
> 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/
Thank you for the fix! Consider it reviewed. Would you mind open a JBS issue for it and push the fix?
/Magnus
>
> 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.
>
> 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.
>
> Jorn
>
More information about the build-dev
mailing list