mirror of
https://github.com/autc04/Retro68.git
synced 2024-11-26 06:49:33 +00:00
set -ffunction-sections option on libretro and libConsole, and use gc-sections in Samples/HelloWorld.
This commit is contained in:
parent
80443795d4
commit
821bc04a7a
@ -26,6 +26,9 @@ add_library(RetroConsole
|
||||
MacUtils.h
|
||||
InitConsole.cc
|
||||
)
|
||||
set_target_properties(retrocrt
|
||||
PROPERTIES
|
||||
COMPILE_OPTIONS -ffunction-sections)
|
||||
|
||||
install(TARGETS RetroConsole DESTINATION lib)
|
||||
|
||||
|
@ -10,3 +10,13 @@ add_application(HelloWorld
|
||||
hello.c
|
||||
CONSOLE
|
||||
)
|
||||
|
||||
# make the result as small as possible
|
||||
# by removing unused code (gc-sections)
|
||||
# and by removing macsbug function names
|
||||
# (don't do this when debugging...)
|
||||
set_target_properties(HelloWorld
|
||||
PROPERTIES
|
||||
COMPILE_OPTIONS -ffunction-sections
|
||||
LINK_FLAGS "-Wl,-gc-sections -Wl,--mac-strip-macsbug"
|
||||
)
|
||||
|
@ -71,5 +71,8 @@ add_library(retrocrt
|
||||
consolehooks.c
|
||||
${ARCH_FILES}
|
||||
)
|
||||
set_target_properties(retrocrt
|
||||
PROPERTIES
|
||||
COMPILE_OPTIONS -ffunction-sections)
|
||||
|
||||
install(TARGETS retrocrt DESTINATION lib)
|
||||
|
Loading…
Reference in New Issue
Block a user