[clang] [clang-cl] Add cl compiler build deterministic options for compatibility. (PR #194779)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 28 21:50:12 PDT 2026


================
@@ -8821,6 +8783,17 @@ void Clang::AddClangCLArgs(const ArgList &Args, types::ID InputType,
     CmdArgs.push_back(Args.MakeArgString(
         Twine("-loader-replaceable-function=") + FuncOverride));
   }
+
+ if (Args.hasFlag(options::OPT__SLASH_experemental_deterministic,
+                  options::OPT__SLASH_experemental_deterministic, false)) {
+   CmdArgs.push_back("-Wdate-time");
+ }
+
+ if (Args.hasFlag(options::OPT__SLASH_d1nodatetime,
+                  options::OPT__SLASH_d1nodatetime, false)) {
+   CmdArgs.push_back("-Wno-builtin-macro-redefined");
----------------
efriedma-quic wrote:

This is clearly wrong; please check what MSVC actually does.

https://github.com/llvm/llvm-project/pull/194779


More information about the cfe-commits mailing list