Don't strip symbols

Really, why do this?
This commit is contained in:
Zeex 2015-04-04 17:55:55 +06:00
parent 12afdf16c2
commit 6e8319d4f4
2 changed files with 0 additions and 23 deletions

View File

@ -50,9 +50,6 @@ if(WIN32)
set_target_properties(amxArgs PROPERTIES LINK_FLAGS "/export:amx_ArgsInit /export:amx_ArgsCleanup /export:amx_ArgsSetCmdLine") set_target_properties(amxArgs PROPERTIES LINK_FLAGS "/export:amx_ArgsInit /export:amx_ArgsCleanup /export:amx_ArgsSetCmdLine")
endif() endif()
endif() endif()
if(UNIX)
add_custom_command(TARGET amxArgs POST_BUILD COMMAND strip ARGS -K amx_ArgsInit -K amx_ArgsCleanup -K amx_ArgsSetCmdLine ${CMAKE_BINARY_DIR}/amxArgs.so)
endif()
# amxDGram # amxDGram
set(DGRAM_SRCS amxdgram.c amx.c) set(DGRAM_SRCS amxdgram.c amx.c)
@ -66,9 +63,6 @@ if(WIN32)
set_target_properties(amxDGram PROPERTIES LINK_FLAGS "/export:amx_DGramInit /export:amx_DGramCleanup") set_target_properties(amxDGram PROPERTIES LINK_FLAGS "/export:amx_DGramInit /export:amx_DGramCleanup")
endif() endif()
endif() endif()
if(UNIX)
add_custom_command(TARGET amxDGram POST_BUILD COMMAND strip ARGS -K amx_DGramInit -K amx_DGramCleanup ${CMAKE_BINARY_DIR}/amxDGram.so)
endif()
# amxFile # amxFile
set(FILE_SRCS amxfile.c amx.c) set(FILE_SRCS amxfile.c amx.c)
@ -82,9 +76,6 @@ if(WIN32)
set_target_properties(amxFile PROPERTIES LINK_FLAGS "/export:amx_FileInit /export:amx_FileCleanup") set_target_properties(amxFile PROPERTIES LINK_FLAGS "/export:amx_FileInit /export:amx_FileCleanup")
endif() endif()
endif() endif()
if(UNIX)
add_custom_command(TARGET amxFile POST_BUILD COMMAND strip ARGS -K amx_FileInit -K amx_FileCleanup ${CMAKE_BINARY_DIR}/amxFile.so)
endif()
# amxFixed # amxFixed
set(FIXED_SRCS fixed.c amx.c) set(FIXED_SRCS fixed.c amx.c)
@ -100,7 +91,6 @@ if(WIN32)
endif() endif()
if(UNIX) if(UNIX)
target_link_libraries(amxFixed m) target_link_libraries(amxFixed m)
add_custom_command(TARGET amxFixed POST_BUILD COMMAND strip ARGS -K amx_FixedInit -K amx_FixedCleanup ${CMAKE_BINARY_DIR}/amxFixed.so)
endif() endif()
# amxFloat # amxFloat
@ -117,7 +107,6 @@ if(WIN32)
endif() endif()
if(UNIX) if(UNIX)
target_link_libraries(amxFloat m) target_link_libraries(amxFloat m)
add_custom_command(TARGET amxFloat POST_BUILD COMMAND strip ARGS -K amx_FloatInit -K amx_FloatInit ${CMAKE_BINARY_DIR}/amxFloat.so)
endif() endif()
# amxProcess # amxProcess
@ -143,7 +132,6 @@ if(WIN32)
endif() endif()
if(UNIX) if(UNIX)
target_link_libraries(amxProcess dl) target_link_libraries(amxProcess dl)
add_custom_command(TARGET amxProcess POST_BUILD COMMAND strip ARGS -K amx_ProcessInit -K amx_ProcessCleanup ${CMAKE_BINARY_DIR}/amxProcess.so)
endif() endif()
# amxString # amxString
@ -158,9 +146,6 @@ if(WIN32)
set_target_properties(amxString PROPERTIES LINK_FLAGS "/export:amx_StringInit /export:amx_StringCleanup") set_target_properties(amxString PROPERTIES LINK_FLAGS "/export:amx_StringInit /export:amx_StringCleanup")
endif() endif()
endif() endif()
if(UNIX)
add_custom_command(TARGET amxString POST_BUILD COMMAND strip ARGS -K amx_StringInit -K amx_StringCleanup ${CMAKE_BINARY_DIR}/amxString.so)
endif()
# amxTime # amxTime
set(TIME_SRCS amxtime.c amx.c) set(TIME_SRCS amxtime.c amx.c)
@ -174,9 +159,6 @@ if(WIN32)
set_target_properties(amxTime PROPERTIES LINK_FLAGS "/export:amx_TimeInit /export:amx_TimeCleanup") set_target_properties(amxTime PROPERTIES LINK_FLAGS "/export:amx_TimeInit /export:amx_TimeCleanup")
endif() endif()
endif() endif()
if(UNIX)
add_custom_command(TARGET amxTime POST_BUILD COMMAND strip ARGS -K amx_TimeInit -K amx_TimeCleanup ${CMAKE_BINARY_DIR}/amxTime.so)
endif()
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
# Simple run-time (example program) # Simple run-time (example program)

View File

@ -66,11 +66,6 @@ add_library(pawnc SHARED ${PAWNC_SRCS})
if(WATCOM) #Watcom C/C++ does not support a .DEF file for the exports if(WATCOM) #Watcom C/C++ does not support a .DEF file for the exports
set_target_properties(pawnc PROPERTIES LINK_FLAGS "/exp=libpawnc") set_target_properties(pawnc PROPERTIES LINK_FLAGS "/exp=libpawnc")
endif() endif()
if(UNIX AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug"
AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# Unix exports all symbols by default; we want only a very select few exported symbols
add_custom_command(TARGET pawnc POST_BUILD COMMAND strip ARGS -K pc_compile -K pc_addconstant -K pc_addtag -K pc_enablewarning ${CMAKE_BINARY_DIR}/libpawnc.so)
endif()
# The Pawn compiler driver (console program) # The Pawn compiler driver (console program)
set(PAWNCC_SRCS pawncc.c) set(PAWNCC_SRCS pawncc.c)