build-libcxx: Build with -ffunction-sections -fdata-sections

This allows shrinking binaries somewhat, if linking the runtimes
statically and using the -Wl,--gc-sections option.
This commit is contained in:
Martin Storsjö committed 2022-02-09 14:02:20 +02:00
1 parent ee6caf31cf
commit bd9e16f732
1 file changed
+2
+2
View File
@@ -97,6 +97,8 @@ build_all() {
-DCMAKE_C_COMPILER=$arch-w64-mingw32-clang \ -DCMAKE_C_COMPILER=$arch-w64-mingw32-clang \
-DCMAKE_CXX_COMPILER=$arch-w64-mingw32-clang++ \ -DCMAKE_CXX_COMPILER=$arch-w64-mingw32-clang++ \
-DCMAKE_CXX_COMPILER_TARGET=$arch-w64-windows-gnu \ -DCMAKE_CXX_COMPILER_TARGET=$arch-w64-windows-gnu \
-DCMAKE_C_FLAGS="-ffunction-sections -fdata-sections" \
-DCMAKE_CXX_FLAGS="-ffunction-sections -fdata-sections" \
-DCMAKE_CROSSCOMPILING=TRUE \ -DCMAKE_CROSSCOMPILING=TRUE \
-DCMAKE_SYSTEM_NAME=Windows \ -DCMAKE_SYSTEM_NAME=Windows \
-DCMAKE_C_COMPILER_WORKS=TRUE \ -DCMAKE_C_COMPILER_WORKS=TRUE \