[Driver] Restrict Ofast deprecation help message to Clang (#101682)
authorKiran Chandramohan <kiran.chandramohan@arm.com>
Mon, 5 Aug 2024 11:43:37 +0000 (12:43 +0100)
committerTobias Hieta <tobias@hieta.se>
Sat, 10 Aug 2024 09:56:43 +0000 (11:56 +0200)
The discussion about this in Flang
(https://discourse.llvm.org/t/rfc-deprecate-ofast-in-flang/80243) has
not concluded hence restricting the deprecation only to Clang.

(cherry picked from commit e60ee1f2d70bdb0ac87b09ae685d669d8543b7bd)

clang/include/clang/Driver/Options.td

index 359a698ea87dd0705794fd7e63f9fd0f2b254c37..014a2bd85fdc621f61237fff3cb2206ec23b578b 100644 (file)
@@ -932,8 +932,9 @@ def O_flag : Flag<["-"], "O">, Visibility<[ClangOption, CC1Option, FC1Option]>,
   Alias<O>, AliasArgs<["1"]>;
 def Ofast : Joined<["-"], "Ofast">, Group<O_Group>,
   Visibility<[ClangOption, CC1Option, FlangOption]>,
-  HelpText<"Deprecated; use '-O3 -ffast-math' for the same behavior,"
-  " or '-O3' to enable only conforming optimizations">;
+  HelpTextForVariants<[ClangOption, CC1Option],
+                      "Deprecated; use '-O3 -ffast-math' for the same behavior,"
+                      " or '-O3' to enable only conforming optimizations">;
 def P : Flag<["-"], "P">,
   Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>,
   Group<Preprocessor_Group>,