Compile with -fvisibility=hidden by default.

This gives around 1MB size reduction.
This commit is contained in:
Miku AuahDark
2022-12-28 13:51:21 +08:00
parent c342339fee
commit bfcb6c6643
+4
View File
@@ -29,6 +29,10 @@ AC_DEFUN([LOVE_MSG_ERROR],
# C++11 support in cpp11.m4
ACLOVE_CPP11_TEST
# Add -fvisibility=hidden and -fvisibility-inlines-hidden
CFLAGS="-fvisibility=hidden $CFLAGS"
CPPFLAGS="-fvisibility=hidden -fvisibility-inlines-hidden $CPPFLAGS"
# Allow people on OSX to use autotools, they need their platform files
AC_ARG_ENABLE([osx],
AC_HELP_STRING([--enable-osx], [Compile platform-specific files for OSX]), [], [enable_osx=no])