aboutsummaryrefslogtreecommitdiff
path: root/clang/docs/CommandGuide
diff options
context:
space:
mode:
authorVlad Serebrennikov <serebrennikov.vladislav@gmail.com>2024-07-18 11:49:53 +0400
committerGitHub <noreply@github.com>2024-07-18 11:49:53 +0400
commit2ef7cbf71c98246d6f3a9c63dea75b76c7b5e928 (patch)
treef846de6b5673558b95e51cf5b04498d9015549d1 /clang/docs/CommandGuide
parent09cbb45edd149d30766c87be4628e4df13f3496d (diff)
downloadllvm-2ef7cbf71c98246d6f3a9c63dea75b76c7b5e928.zip
llvm-2ef7cbf71c98246d6f3a9c63dea75b76c7b5e928.tar.gz
llvm-2ef7cbf71c98246d6f3a9c63dea75b76c7b5e928.tar.bz2
[clang] Add deprecation warning for `-Ofast` driver option (#98736)
This patch implements consensus on the corresponding RFC documented here: https://discourse.llvm.org/t/rfc-deprecate-ofast/78687/72 Specifically, I added a deprecation warning for `-Ofast`, that suggests to use `-O3` or `-O3` with `-ffast-math`, and a new diagnostic group for aforementioned warning. Deprecation period is going to be lengthy, so I hope this PR can be merged in time for Clang 19.
Diffstat (limited to 'clang/docs/CommandGuide')
-rw-r--r--clang/docs/CommandGuide/clang.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/docs/CommandGuide/clang.rst b/clang/docs/CommandGuide/clang.rst
index 2915429..663aca1 100644
--- a/clang/docs/CommandGuide/clang.rst
+++ b/clang/docs/CommandGuide/clang.rst
@@ -429,7 +429,8 @@ Code Generation Options
:option:`-Ofast` Enables all the optimizations from :option:`-O3` along
with other aggressive optimizations that may violate strict compliance with
- language standards.
+ language standards. This is deprecated in favor of :option:`-O3`
+ in combination with :option:`-ffast-math`.
:option:`-Os` Like :option:`-O2` with extra optimizations to reduce code
size.