3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-11-02 04:27:52 +00:00

[CMake] Add support for link time optimization (LTO).

This analogous to the `--optimize` flag in the Python/Makefile
build system except that we now support doing LTO with Clang/GCC
as well. However it is probably best to avoid doing LTO with
Clang or GCC for now because I see a bunch of warnings about
ODR violations when building with LTO.

LTO can be enabled with the new `LINK_TIME_OPTIMIZATION` option
which is off by default.
This commit is contained in:
Dan Liew 2017-04-29 01:21:49 +01:00
parent fb403229bd
commit 0e1343e78d
3 changed files with 58 additions and 0 deletions

View file

@ -292,6 +292,7 @@ The following useful options can be passed to CMake whilst configuring.
when running the ``install`` target.
* ``ALWAYS_BUILD_DOCS`` - BOOL. If set to ``TRUE`` and ``BUILD_DOCUMENTATION`` is ``TRUE`` then documentation for API bindings will always be built.
Disabling this is useful for faster incremental builds. The documentation can be manually built by invoking the ``api_docs`` target.
* ``LINK_TIME_OPTIMIZATION`` - BOOL. If set to ``TRUE`` link time optimization will be enabled.
On the command line these can be passed to ``cmake`` using the ``-D`` option. In ``ccmake`` and ``cmake-gui`` these can be set in the user interface.