Skip to content

Commit bb383a3

Browse files
committed
Add a note to not set -O0 with --enable-optimizations
1 parent 053d92f commit bb383a3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

getting-started/setup-building.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,11 @@ and may be used to auto-enable Link Time Optimization (LTO) on some platforms.
281281
See :option:`python:--enable-optimizations` and :option:`python:--with-lto`
282282
to learn more about these options.
283283

284+
.. important::
285+
When using ``--enable-optimizations``, do not set ``CFLAGS=-O0`` or any other
286+
flags that disable compiler optimizations. PGO requires optimizations to be
287+
enabled to work properly.
288+
284289
.. code:: console
285290
286291
$ ./configure --enable-optimizations --with-lto

0 commit comments

Comments
 (0)