[core] Enable LTO (#758)

* Update dobby

* Enable LTO
This commit is contained in:
vvb2060 2021-06-20 23:56:03 +08:00 committed by GitHub
parent c2662c9887
commit 4fc0f8754c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -58,7 +58,7 @@ val verName: String by rootProject.extra
dependencies {
implementation("dev.rikka.ndk:riru:${moduleMinRiruVersionName}")
implementation("dev.rikka.ndk.thirdparty:cxx:1.1.0")
implementation("io.github.vvb2060.ndk:dobby:1.0")
implementation("io.github.vvb2060.ndk:dobby:1.2")
implementation("com.android.tools.build:apksig:7.0.0-beta03")
implementation("org.apache.commons:commons-lang3:3.12.0")
implementation("de.upb.cs.swt:axml:2.1.1")

View File

@ -7,8 +7,9 @@ APP_LDFLAGS := -Wl,--exclude-libs,ALL
APP_STL := none
ifneq ($(NDK_DEBUG),1)
APP_CFLAGS += -Oz -Wno-unused -Wno-unused-parameter -Werror
APP_CFLAGS += -Oz -flto
APP_CFLAGS += -Wno-unused -Wno-unused-parameter -Werror
APP_CFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
APP_CFLAGS += -fno-unwind-tables -fno-asynchronous-unwind-tables
APP_LDFLAGS += -Wl,--gc-sections -Wl,--strip-all
APP_LDFLAGS += -flto -Wl,--gc-sections -Wl,--strip-all
endif