internals:windows:stepbystepbuild_sdk_2
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
internals:windows:stepbystepbuild_sdk_2 [2018/11/18 23:55] – ab | internals:windows:stepbystepbuild_sdk_2 [2021/08/06 15:23] – note about updating VS; see https://bugs.php.net/81337 cmb | ||
---|---|---|---|
Line 17: | Line 17: | ||
* Visual C++ 14.0 (Visual Studio 2015) for **PHP 7.0** or **PHP 7.1**. | * Visual C++ 14.0 (Visual Studio 2015) for **PHP 7.0** or **PHP 7.1**. | ||
- | * Visual C++ 15.0 (Visual Studio 2017) for **PHP 7.2** or **PHP 7.3**. | + | * Visual C++ 15.0 (Visual Studio 2017) for **PHP 7.2**, **PHP 7.3** or **PHP 7.4**. |
+ | * Visual C++ 16.0 (Visual Studio 2019) for **master**. | ||
+ | |||
+ | Always keep your installed Visual C++ up to date. Otherwise build errors may occur due to dependencies built with newer versions. | ||
+ | |||
+ | Support for a certain Visual Studio version means only support for its default platform toolset; building PHP with a non-default platform toolset (such as 14.16 with Visual Studio 2019) may work, but is not recommended. | ||
+ | |||
+ | In filenames (and the '' | ||
==== Setup ==== | ==== Setup ==== | ||
Line 28: | Line 35: | ||
* If compiling **PHP 7.2+**: | * If compiling **PHP 7.2+**: | ||
* Install Visual Studio 2017 | * Install Visual Studio 2017 | ||
+ | * If compiling **master**: | ||
+ | * Install Visual Studio 2019 | ||
* Optional tools | * Optional tools | ||
Line 42: | Line 51: | ||
* PHP_SDK_PHP_CMD - integrated PHP binary wrapper script | * PHP_SDK_PHP_CMD - integrated PHP binary wrapper script | ||
* PHP_SDK_ROOT_PATH - the path to the PHP SDK root directory | * PHP_SDK_ROOT_PATH - the path to the PHP SDK root directory | ||
- | * PHP_SDK_VC | + | * PHP_SDK_VS |
* several other less relevant vars are available, that can be viewed by the '' | * several other less relevant vars are available, that can be viewed by the '' | ||
Line 77: | Line 86: | ||
- Run the '' | - Run the '' | ||
- The '' | - The '' | ||
- | - Extract the PHP source code to '' | + | - Extract the PHP source code to '' |
- | * '' | + | * '' |
* '' | * '' | ||
* For example: '' | * For example: '' | ||
Line 96: | Line 105: | ||
- To build PHP, run: <code bash> | - To build PHP, run: <code bash> | ||
- If you want the resulting PHP builds and extensions to be zipped, after ' | - If you want the resulting PHP builds and extensions to be zipped, after ' | ||
- | - The compiled PHP is now under " | + | - The compiled PHP is now under " |
- | * If you compiled with " | + | * If you compiled with " |
==== Recompile after you have done some changes ==== | ==== Recompile after you have done some changes ==== | ||
Line 128: | Line 137: | ||
At this point, your compiled extension will be located in the release directory. | At this point, your compiled extension will be located in the release directory. | ||
+ | |||
+ | ==== Release directories ==== | ||
+ | |||
+ | When you have successfully compiled PHP, the release directory can be one of multiple, depending on the build configuration: | ||
+ | |||
+ | - `Release`: Release NTS build | ||
+ | - `Release_TS`: | ||
+ | - `Debug`: Debug NTS build | ||
+ | - `Debug_TS`: Debug ZTS build | ||
+ | |||
+ | If you are compiling using a 64-bit compiler, then these directories will be located in a directory called `x64`. | ||
===== Pitfalls ===== | ===== Pitfalls ===== | ||
- For possible PHP SDK issues, please consult the PHP SDK readme | - For possible PHP SDK issues, please consult the PHP SDK readme | ||
+ | - As of PHP 7.3 the switch --enable-native-intrinsics is available. The resulting binary will then require a processor with the corresponding feature set available. For example, if you set --enable-native-intrinsics=avx2, | ||
+ | - In some circumstances, | ||
internals/windows/stepbystepbuild_sdk_2.txt · Last modified: 2022/01/10 09:43 by cmb