You've already forked ReZygisk
mirror of
https://github.com/PerformanC/ReZygisk.git
synced 2025-09-06 06:37:01 +00:00
improve: Zygiskd build.gradle.kts
This commit improves Zygisk's build gradle file by avoiding the repetition of compiler flags.
This commit is contained in:
@@ -27,6 +27,9 @@ val verName: String by rootProject.extra
|
||||
val commitHash: String by rootProject.extra
|
||||
|
||||
val CStandardFlags = arrayOf(
|
||||
"-D_GNU_SOURCE", "-std=c99", "-Wpedantic", "-Wall", "-Wextra", "-Werror",
|
||||
"-Wformat", "-Wuninitialized", "-Wshadow", "-Wno-zero-length-array",
|
||||
"-Wno-fixed-enum-extension", "-Iroot_impl", "-llog",
|
||||
"-DMIN_APATCH_VERSION=$minAPatchVersion",
|
||||
"-DMIN_KSU_VERSION=$minKsuVersion",
|
||||
"-DMAX_KSU_VERSION=$maxKsuVersion",
|
||||
@@ -35,16 +38,10 @@ val CStandardFlags = arrayOf(
|
||||
)
|
||||
|
||||
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",
|
||||
"-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", "-O0"
|
||||
)
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
so we need to cast it to signed int to
|
||||
avoid any potential UB.
|
||||
*/
|
||||
#define KERNEL_SU_OPTION (signed int)0xdeadbeef
|
||||
#define KERNEL_SU_OPTION 0xdeadbeef
|
||||
|
||||
#define CMD_GET_VERSION 2
|
||||
#define CMD_UID_GRANTED_ROOT 12
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
enum RootImplState ksu_get_existence(void) {
|
||||
int version = 0;
|
||||
prctl(KERNEL_SU_OPTION, CMD_GET_VERSION, &version, 0, 0);
|
||||
prctl((signed int)KERNEL_SU_OPTION, CMD_GET_VERSION, &version, 0, 0);
|
||||
|
||||
if (version == 0) return Inexistent;
|
||||
if (version >= MIN_KSU_VERSION && version <= MAX_KSU_VERSION) return Supported;
|
||||
|
||||
Reference in New Issue
Block a user