Skip to content

Commit cc309aa

Browse files
committed
Update docs
1 parent 87e2936 commit cc309aa

File tree

2 files changed

+24
-21
lines changed

2 files changed

+24
-21
lines changed

docs/cmake/modules/PHP/InterproceduralOptimization.md

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!-- This is auto-generated file. -->
2+
* Source code: [cmake/modules/PHP/Optimization.cmake](https://github.com/petk/php-build-system/blob/master/cmake/cmake/modules/PHP/Optimization.cmake)
3+
4+
# PHP/Optimization
5+
6+
Enable interprocedural optimization (IPO/LTO) on all targets, if supported.
7+
8+
This adds linker flag `-flto` if it is supported by the compiler to run standard
9+
link-time optimizer.
10+
11+
It can be also controlled more granular with the
12+
`CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG>` variables based on the build type.
13+
14+
This module also checks whether IPO/LTO can be enabled based on the PHP
15+
configuration (due to global register variables) and compiler/platform.
16+
17+
https://cmake.org/cmake/help/latest/prop_tgt/INTERPROCEDURAL_OPTIMIZATION.html
18+
19+
## Basic usage
20+
21+
```cmake
22+
# CMakeLists.txt
23+
include(PHP/Optimization)
24+
```

0 commit comments

Comments
 (0)