You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At Linux libc compatibility can be a problem, micro provides two kinds of `configure` arguments:
101
+
On Linux, libc compatibility can be a problem. To address this, micro provides two kinds of `configure` arguments:
102
102
103
103
-`--enable-micro=yes`or`--enable-micro`: this will make PIE shared ELF micro sfx, this kind of binary cannot be invoked cross libc (i.e. you cannot run such a binary which was built on alpine with musl on any glibc-based CentOS), but the binary can do ffi and PHP `dl()` function.
104
104
-`--enable-micro=all-static`: this will make full static ELF micro sfx, this kind of binary can even run barely on top of any linux kernel, but ffi/`dl()` is not supported.
@@ -110,13 +110,13 @@ At Linux libc compatibility can be a problem, micro provides two kinds of `confi
110
110
make micro
111
111
```
112
112
113
-
(`make all`(aka. `make`) may work also, but build only the micro SAPI is recommended.)
113
+
(`make all`(aka. `make`) may work also, but it is recommended to only build the micro SAPI.)
114
114
115
115
The built file will be located at sapi/micro/micro.sfx.
116
116
117
117
### Windows Build
118
118
119
-
0.Prepare the build environment according to [the official PHP documents](https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2).
119
+
0.Prepare the build environment according to [the official PHP documents](https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2), you may also try [my scripts](https://github.com/dixyes/php-dev-windows-tool)
Due to PHP build system on Windows lack of the ability to statically build PHP binary, you cannot build micro with `nmake`
140
+
Due to the PHP build system's inability to statically build PHP binaries on Windows, you cannot build micro with `nmake` command.
141
141
142
142
```batch
143
143
# at PHP source dir
@@ -148,9 +148,9 @@ That built file is at `<arch name like x64>\\<configuration like Release>\\micro
148
148
149
149
## Optimizations
150
150
151
-
Hugepages optimization for Linux in the PHP build system results in a huge size of sfx, if you do not take advantage of hugepages, use `disable_huge_page.patch` to shrink the sfx size.
151
+
The Hugepages optimization for Linux in the PHP build system results in a large sfx size. If you do not take advantage of Hugepages, use `disable_huge_page.patch` to reduce the sfx size.
152
152
153
-
Statically build under Linux needs libc, the most common glibc may be large, musl is recommended instead. manually installed musl or some distros provided musl will provide `musl-gcc` or `musl-clang` wrapper, use one of them before configure by specify CC/CXX environs, for example
153
+
A static build under Linux requires libc. The most common libc, glibc, may be large, so musl is recommended instead. Manually installed musl or some distros provided musl will provide `musl-gcc` or `musl-clang` wrapper, use one of them before configure by specify CC/CXX environs, for example
154
154
155
155
```bash
156
156
# ./buildconf things...
@@ -160,7 +160,7 @@ export CXX=musl-gcc
160
160
# make things
161
161
```
162
162
163
-
We hope all dependencies are statically linked into sfx. However, some distro does not provide static versions of them. We may manually build them.
163
+
We aim to have all dependencies statically linked into sfx. However, some distro does not provide static versions of them. We may manually build them.
164
164
165
165
libffi for example (note that the ffi extension is not supported in `all-static` builds):
166
166
@@ -201,7 +201,7 @@ See wiki:[INI-settings](https://github.com/easysoft/phpmicro/wiki/INI-settings
201
201
202
202
### PHP_BINARY constant
203
203
204
-
In micro, `PHP_BINARY` is an empty string. You can modify it using an ini setting: `micro.php_binary=somestring`
204
+
In micro, the `PHP_BINARY` constant is an empty string. You can modify it using an ini setting: `micro.php_binary=somestring`
0 commit comments