enable stripping for a bunch of self-built dlls

This commit is contained in:
Morilli 2024-11-11 04:47:33 +01:00
parent acb14cf07d
commit 9caef88e3f
6 changed files with 6 additions and 5 deletions

View File

@ -135,6 +135,7 @@ set_target_properties(SDL2 PROPERTIES
NO_SONAME ON NO_SONAME ON
OUTPUT_NAME "SDL2" OUTPUT_NAME "SDL2"
) )
target_link_options(SDL2 PRIVATE -s)
# Copy output to our dll folders # Copy output to our dll folders
# This requires a bit of magic (add_custom_command is not allowed for targets made with add_subdirectory) # This requires a bit of magic (add_custom_command is not allowed for targets made with add_subdirectory)

View File

@ -1,7 +1,7 @@
CXX = g++ CXX = g++
CFLAGS = -Wall -Wextra -Wpedantic -std=c++11 -O3 -fPIC -fvisibility=hidden -fomit-frame-pointer -fno-exceptions CFLAGS = -Wall -Wextra -Wpedantic -std=c++11 -O3 -fPIC -fvisibility=hidden -fomit-frame-pointer -fno-exceptions
LFLAGS = -shared LFLAGS = -shared -s
SRCS = LibretroBridge.cpp SRCS = LibretroBridge.cpp

View File

@ -1,7 +1,7 @@
CC = gcc CC = gcc
CFLAGS = -Wall -Wextra -O3 CFLAGS = -Wall -Wextra -O3
LFLAGS = -shared LFLAGS = -shared -s
all: blip_buf all: blip_buf

View File

@ -15,5 +15,5 @@ rm -rf build
mkdir build mkdir build
cd build cd build
cmake ../encore -DCMAKE_BUILD_TYPE=Release -DENABLE_LTO=ON -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX \ cmake ../encore -DCMAKE_BUILD_TYPE=Release -DENABLE_LTO=ON -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX \
-DCMAKE_C_FLAGS="-fuse-ld=lld" -DCMAKE_CXX_FLAGS="-fuse-ld=lld" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DENABLE_VULKAN=OFF -G Ninja -DCMAKE_C_FLAGS="-fuse-ld=lld" -DCMAKE_CXX_FLAGS="-fuse-ld=lld" -DCMAKE_SHARED_LINKER_FLAGS="-s" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DENABLE_VULKAN=OFF -G Ninja
ninja ninja

View File

@ -16,7 +16,7 @@ TARGET = bizlynx.dll
LDFLAGS_32 = -static -static-libgcc -static-libstdc++ LDFLAGS_32 = -static -static-libgcc -static-libstdc++
LDFLAGS_64 = LDFLAGS_64 =
LDFLAGS = -shared $(LDFLAGS_$(ARCH)) $(CXXFLAGS) LDFLAGS = -shared $(LDFLAGS_$(ARCH)) $(CXXFLAGS) -s
DEST_64 = ../../Assets/dll DEST_64 = ../../Assets/dll
DESTCOPY_64 = ../../output/dll DESTCOPY_64 = ../../output/dll

View File

@ -20,7 +20,7 @@ endif
LDFLAGS_32 = -static -static-libgcc -static-libstdc++ LDFLAGS_32 = -static -static-libgcc -static-libstdc++
LDFLAGS_64 = LDFLAGS_64 =
LDFLAGS = -shared $(LDFLAGS_$(ARCH)) $(CXXFLAGS) LDFLAGS = -shared $(LDFLAGS_$(ARCH)) $(CXXFLAGS) -s
DEST_64 = ../../Assets/dll DEST_64 = ../../Assets/dll
DESTCOPY_64 = ../../output/dll DESTCOPY_64 = ../../output/dll