improve: compilation commands

This commit improves the compilation commands resulting in even better sized releases.
This commit is contained in:
ThePedroo
2024-07-26 02:47:43 -03:00
parent 41e83aec52
commit 37a667ce2a
2 changed files with 6 additions and 4 deletions

View File

@@ -35,11 +35,11 @@ val defaultCFlags = arrayOf(
)
val releaseFlags = arrayOf(
"-Oz", "-flto",
"-Wno-unused", "-Wno-unused-parameter",
"-fvisibility=hidden", "-fvisibility-inlines-hidden",
"-fno-unwind-tables", "-fno-asynchronous-unwind-tables",
"-Wl,--exclude-libs,ALL", "-Wl,--gc-sections", "-Wl,--strip-all"
"-Wl,--exclude-libs,ALL", "-Wl,--gc-sections",
"-Wl,--strip-all", "-Ofast", "-flto=thin",
)
android {

View File

@@ -29,13 +29,15 @@ val commitHash: String by rootProject.extra
val CFlagsRelease = arrayOf(
"-D_GNU_SOURCE", "-std=c99", "-Wpedantic", "-Wall", "-Wextra", "-Werror",
"-Wformat", "-Wuninitialized", "-Wshadow", "-Wno-zero-length-array",
"-Wno-fixed-enum-extension", "-Iroot_impl", "-llog"
"-Wno-fixed-enum-extension", "-Iroot_impl", "-llog",
"-Wl,--strip-all", "-flto=thin", "-Ofast"
)
val CFlagsDebug = arrayOf(
"-D_GNU_SOURCE", "-std=c99", "-Wpedantic", "-Wall", "-Wextra", "-Werror",
"-Wformat", "-Wuninitialized", "-Wshadow", "-Wno-zero-length-array",
"-Wno-fixed-enum-extension", "-Iroot_impl", "-llog", "-g"
"-Wno-fixed-enum-extension", "-Iroot_impl", "-llog",
"-g", "-O0"
)
val Files = arrayOf(