[clang] [llvm] [X86][APX] Disable PP2/PPX generation on Windows (PR #178122)

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 28 07:23:10 PST 2026


================
@@ -252,13 +252,31 @@ void x86::getX86TargetFeatures(const Driver &D, const llvm::Triple &Triple,
       D.Diag(diag::err_drv_unsupported_opt_for_target)
           << A->getSpelling() << Triple.getTriple();
 
-    if (A->getOption().matches(options::OPT_mapx_features_EQ) ||
+    if (IsNegative)
+      Name = Name.substr(3);
+    if (A->getOption().matches(options::OPT_mapxf) ||
+        A->getOption().matches(options::OPT_mno_apxf) ||
+        A->getOption().matches(options::OPT_mapx_features_EQ) ||
         A->getOption().matches(options::OPT_mno_apx_features_EQ)) {
 
       if (Not64Bit && !IsNegative)
         D.Diag(diag::err_drv_unsupported_opt_for_target)
-            << StringRef(A->getSpelling().str() + "|-mapxf")
-            << Triple.getTriple();
+            << StringRef("-mapx-features=|-mapxf") << Triple.getTriple();
----------------
RKSimon wrote:

`"-mapx-features=-mapxf"`?

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


More information about the cfe-commits mailing list