diff --git a/configure b/configure index 47d2e7a983e64..29bddf687b2d2 100755 --- a/configure +++ b/configure @@ -1135,6 +1135,7 @@ do CFG_MSVC_LIB_PATH=$(cmd /c "\"$vcvarsall\" amd64 && cmd /c echo %LIB%") need_ok "failed to learn about MSVC's LIB" + putvar CFG_MSVC_ROOT putvar CFG_MSVC_CL putvar CFG_MSVC_LIB putvar CFG_MSVC_LINK diff --git a/mk/cfg/x86_64-pc-windows-msvc.mk b/mk/cfg/x86_64-pc-windows-msvc.mk index 63dcfaa15f5fa..bd1088b7cd133 100644 --- a/mk/cfg/x86_64-pc-windows-msvc.mk +++ b/mk/cfg/x86_64-pc-windows-msvc.mk @@ -37,7 +37,7 @@ endif # but it's not the one that we want. As a result we make sure that our detected # `link.exe` shows up in PATH first. ifdef CFG_MSVC_LINK -export PATH := $(dir $(CFG_MSVC_LINK)):$(PATH) +export PATH := $(CFG_MSVC_ROOT)/VC/bin/amd64:$(PATH) endif # There are more comments about this available in the target specification for