[PATCH] Enhance jaotc to automatically find VS2017+ linker
Igor Veresov
igor.veresov at oracle.com
Mon Feb 4 20:54:29 UTC 2019
Perhaps, we should catch all the exceptions that are thrown by getVC141AndNewerLinker() and try other methods of getting to a linker if it fails?
Another issue raised by Bob is that perhaps we should be passing “-latest” to vswhere for the case when multiple VS version are installed. What do you think?
igor
> On Feb 4, 2019, at 12:00 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
>
> Hi Andrew,
>
> I looked on changes nire and I have question about throwing next and following errors in getVC141AndNewerLinker():
>
> + private static Path getVC141AndNewerLinker() throws Exception {
> + String programFilesX86 = System.getenv("ProgramFiles(x86)");
> + if (programFilesX86 == null) {
> + throw new InternalError("Could not read the ProgramFiles(x86) environment variable");
>
> Method getVC141AndNewerLinker() is called before any other paths are checked. If this variable is not set or other checks in getVC141AndNewerLinker() failed, caller getWindowsLinkPath() exits before following code is executed and other paths are checked.
>
> I don't think it is correct if old VS is installed instead of VS2017+. What dio you think. Can you verify that it works in all cases?
>
> Thanks,
> Vladimir
>
> On 1/29/19 2:33 PM, Vladimir Kozlov wrote:
>> Looks good.
>> Thanks,
>> Vladimir
>> On 1/25/19 3:56 PM, Andrew Luo wrote:
>>> Minor public -> private visibility fix. Just noticed right after I sent it out…
>>>
>>> Thanks,
>>>
>>> -Andrew
>>>
>>> *From:* hotspot-compiler-dev <hotspot-compiler-dev-bounces at openjdk.java.net> *On Behalf Of *Andrew Luo
>>> *Sent:* Friday, January 25, 2019 3:55 PM
>>> *To:* hotspot-compiler-dev at openjdk.java.net
>>> *Subject:* [PATCH] Enhance jaotc to automatically find VS2017+ linker
>>>
>>> See attached patch. Any feedback is welcome.
>>>
>>> Tested on a system with only VS2017 installed, just ran jaotc with a simple class file, and got the expected .dll output with no errors…
>>>
>>> Thanks,
>>>
>>> -Andrew
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20190204/e087f602/attachment.html>
More information about the hotspot-compiler-dev
mailing list