Skip to content

Commit 3ef09b3

Browse files
authored
Merge pull request #58 from TysonAndre/reduce-size
Don't export symbols by default on Linux/Unix
2 parents 3616c92 + e706c07 commit 3ef09b3

3 files changed

Lines changed: 24 additions & 4 deletions

File tree

config.m4

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ if test "$PHP_SIMDJSON" != "no"; then
2323
AC_MSG_RESULT([$php_version, ok])
2424
fi
2525

26+
dnl Mark symbols hidden by default if the compiler (for example, gcc >= 4)
27+
dnl supports it. This can help reduce the binary size and startup time.
28+
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],
29+
[CXXFLAGS="$CXXFLAGS -fvisibility=hidden"])
30+
2631
AC_DEFINE(HAVE_SIMDJSON, 1, [whether simdjson is enabled])
2732
PHP_NEW_EXTENSION(simdjson, [
2833
php_simdjson.cpp \

package.xml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
-->
2121
<date>2022-08-30</date>
2222
<version>
23-
<release>2.0.3</release>
24-
<api>2.0.3</api>
23+
<release>2.0.4dev</release>
24+
<api>2.0.4dev</api>
2525
</version>
2626
<stability>
2727
<release>stable</release>
2828
<api>stable</api>
2929
</stability>
3030
<license uri="https://www.apache.org/licenses/LICENSE-2.0.html">Apache 2.0</license>
3131
<notes>
32-
* Fix error validating package.xml when uploading to PECL due to blank username of lead without a PECL account.
32+
* Add `-fvisibility=hidden` to compiler options to reduce compiled extension size by avoiding exporting symbols by default.
3333
</notes>
3434
<contents>
3535
<dir name="/">
@@ -88,6 +88,21 @@
8888
<providesextension>simdjson</providesextension>
8989
<extsrcrelease/>
9090
<changelog>
91+
<release>
92+
<date>2022-08-30</date>
93+
<version>
94+
<release>2.0.3</release>
95+
<api>2.0.3</api>
96+
</version>
97+
<stability>
98+
<release>stable</release>
99+
<api>stable</api>
100+
</stability>
101+
<license uri="https://www.apache.org/licenses/LICENSE-2.0.html">Apache 2.0</license>
102+
<notes>
103+
* Fix error validating package.xml when uploading to PECL due to blank username of lead without a PECL account.
104+
</notes>
105+
</release>
91106
<release>
92107
<date>2022-08-30</date>
93108
<version>

php_simdjson.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
extern zend_module_entry simdjson_module_entry;
1818
#define phpext_simdjson_ptr &simdjson_module_entry
1919

20-
#define PHP_SIMDJSON_VERSION "2.0.3"
20+
#define PHP_SIMDJSON_VERSION "2.0.4dev"
2121
#define SIMDJSON_SUPPORT_URL "https://github.com/crazyxman/simdjson_php"
2222
#define SIMDJSON_PARSE_FAIL 0
2323
#define SIMDJSON_PARSE_SUCCESS 1

0 commit comments

Comments
 (0)