mirror of
https://github.com/anope/anope.git
synced 2026-07-07 00:23:14 +02:00
Use GNU visibility attributes when on non-Windows.
This reduces binary sizes by several megabytes on my system.
This commit is contained in:
+1
-1
@@ -188,7 +188,7 @@ if(MSVC)
|
||||
# Otherwise, we're not using Visual Studio
|
||||
else()
|
||||
# Set the compile flags to have all warnings on (including shadowed variables)
|
||||
set(CXXFLAGS "${CXXFLAGS} -Wall -Wextra -Wpedantic -Wno-unused-parameter ${CMAKE_CXX_FLAGS}")
|
||||
set(CXXFLAGS "${CXXFLAGS} -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -Wpedantic -Wno-unused-parameter ${CMAKE_CXX_FLAGS}")
|
||||
# Also, if we are building under MinGW, add another define for MinGW
|
||||
if(MINGW)
|
||||
add_definitions(-DMINGW)
|
||||
|
||||
+2
-2
@@ -51,8 +51,8 @@
|
||||
#define _(x) x
|
||||
|
||||
#ifndef _WIN32
|
||||
# define DllExport
|
||||
# define CoreExport
|
||||
# define DllExport __attribute__ ((visibility ("default")))
|
||||
# define CoreExport __attribute__ ((visibility ("default")))
|
||||
# define anope_close close
|
||||
#else
|
||||
# include "anope_windows.h"
|
||||
|
||||
Reference in New Issue
Block a user