On Tue, 31 Mar 2026 22:27:00 GMT, Ashay Rane <[email protected]> wrote:

> Prior to this patch, both the build and the tests included several
> references to C:/.  References in the build assumed that Windows is
> installed on C:/, which causes the build to fail when Windows is
> installed on a different drive.  The references among tests assumed that
> the C:/ drive exists, which although mostly correct, is not guaranteed,
> making the tests fragile.
> 
> This patch fixes the build references to use the `SYSTEMROOT`
> environment variable, which points to the Windows installation path,
> instead of hardcoded references to C:/Windows.  This patch also updates
> tests to not use the presence of C:/ to detect Windows (instead relying
> on the output of `uname -s`) and to not assume that every Windows
> installation has a C:/.

After your change, the linker reports following arguments:

/out:conftest.exe
-libpath:c:\progra~1\micros~1\18\community\vc\tools\msvc\14.50.35717\atlmfc\lib\x64
-libpath:c:\progra~1\micros~1\18\community\vc\tools\msvc\14.50.35717\lib\x64
-libpath:.
-libpath:.
-libpath:.
conftest.obj


It is following values in HEAD of master. I guess it intends path resolution is 
wrong on WSL.

/out:conftest.exe
-libpath:c:\progra~1\micros~1\18\community\vc\tools\msvc\14.50.35717\atlmfc\lib\x64
-libpath:c:\progra~1\micros~1\18\community\vc\tools\msvc\14.50.35717\lib\x64
-libpath:c:\progra~2\wi3cf2~1\netfxsdk\4.8\lib\um\x64
-libpath:c:\progra~2\wi3cf2~1\10\lib\100261~1.0\ucrt\x64
-libpath:c:\progra~2\wi3cf2~1\10\lib\100261~1.0\um\x64

-------------

PR Comment: https://git.openjdk.org/jdk/pull/30523#issuecomment-4173899931

Reply via email to