Skip to content

Commit

Permalink
Hold back superfluous exports on platforms that otherwise don't
Browse files Browse the repository at this point in the history
  • Loading branch information
Sainan committed Dec 18, 2023
1 parent 13e6b69 commit 3aa46fd
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function check_compiler()
}

$compiler = resolve_installed_program($argv[1]);
$compiler .= " -std=c++17 -O3";
$compiler .= " -std=c++17 -O3 -fvisibility=hidden";
if(defined("PHP_WINDOWS_VERSION_MAJOR"))
{
$compiler .= " -D _CRT_SECURE_NO_WARNINGS";
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Your platform. See PLATS for possible values.
PLAT= guess

CXX= g++ -std=c++17 -O3 -flto
CXX= g++ -std=c++17 -O3 -flto -fvisibility=hidden
CXXFLAGS= -Wno-multichar $(SYSCFLAGS) $(MYCFLAGS)
LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
LIBS= -lm $(SYSLIBS) $(MYLIBS)
Expand Down
6 changes: 5 additions & 1 deletion src/luaconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,11 @@
#ifndef PLUTO_C_LINKAGE
#define PLUTO_C_LINKAGE false
#endif
#define PLUTO_DLLSPEC
#ifndef _WIN32
#define PLUTO_DLLSPEC __attribute__((visibility("default")))
#else
#define PLUTO_DLLSPEC
#endif
#endif

// Additions by Pluto that are not compatible with `extern "C"` use PLUTO_API instead of LUA_API.
Expand Down
2 changes: 1 addition & 1 deletion src/vendor/Soup/Intrin/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CXX=g++ -std=c++17 -O3 -flto
CXX=g++ -std=c++17 -O3 -fvisibility=hidden -flto
CFLAGS=-c -Wall -msha -msse4.1

LIBNAME=libsoupintrin.a
Expand Down
2 changes: 1 addition & 1 deletion src/vendor/Soup/soup/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CXX=g++ -std=c++17 -O3 -flto
CXX=g++ -std=c++17 -O3 -fvisibility=hidden -flto
CFLAGS=-c -Wall -DSOUP_USE_INTRIN

LIBNAME=libsoup.a
Expand Down

0 comments on commit 3aa46fd

Please sign in to comment.