[clang] [lld] Use the Windows SDK arguments over the environment (PR #144805)
Fabrice de Gans via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 18 17:57:36 PDT 2025
================
@@ -94,10 +94,14 @@ void visualstudio::Linker::ConstructJob(Compilation &C, const JobAction &JA,
// If the VC environment hasn't been configured (perhaps because the user
// did not run vcvarsall), try to build a consistent link environment. If
// the environment variable is set however, assume the user knows what
- // they're doing. If the user passes /vctoolsdir or /winsdkdir, trust that
- // over env vars.
- if (const Arg *A = Args.getLastArg(options::OPT__SLASH_diasdkdir,
- options::OPT__SLASH_winsysroot)) {
+ // they're doing. If the user passes /vctoolsdir or /winsdkdir or any of the
+ // other Windows SDK options, trust that over env vars.
+ const Arg *A = Args.getLastArg(options::OPT__SLASH_vctoolsdir,
----------------
Steelskin wrote:
Updated multiple call sites.
https://github.com/llvm/llvm-project/pull/144805
More information about the llvm-commits
mailing list