mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-08-16 09:49:29 +00:00
2
build.py
2
build.py
@@ -257,8 +257,6 @@ def run_cargo(cmds, triple="aarch64-linux-android"):
|
|||||||
env["PATH"] = f'{rust_bin}{os.pathsep}{env["PATH"]}'
|
env["PATH"] = f'{rust_bin}{os.pathsep}{env["PATH"]}'
|
||||||
env["CARGO_BUILD_RUSTC"] = op.join(rust_bin, "rustc" + EXE_EXT)
|
env["CARGO_BUILD_RUSTC"] = op.join(rust_bin, "rustc" + EXE_EXT)
|
||||||
env["RUSTFLAGS"] = f"-Clinker-plugin-lto -Zthreads={min(8, cpu_count)}"
|
env["RUSTFLAGS"] = f"-Clinker-plugin-lto -Zthreads={min(8, cpu_count)}"
|
||||||
env["TARGET_CC"] = op.join(llvm_bin, "clang" + EXE_EXT)
|
|
||||||
env["TARGET_CFLAGS"] = f"--target={triple}23"
|
|
||||||
return execv([cargo, *cmds], env)
|
return execv([cargo, *cmds], env)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -72,7 +72,7 @@ fun Project.setupCommon() {
|
|||||||
compileSdkVersion(34)
|
compileSdkVersion(34)
|
||||||
buildToolsVersion = "34.0.0"
|
buildToolsVersion = "34.0.0"
|
||||||
ndkPath = "$sdkDirectory/ndk/magisk"
|
ndkPath = "$sdkDirectory/ndk/magisk"
|
||||||
ndkVersion = "26.2.11394342"
|
ndkVersion = "27.0.11718014"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk = 23
|
minSdk = 23
|
||||||
|
@@ -28,4 +28,4 @@ android.nonFinalResIds=false
|
|||||||
# Magisk
|
# Magisk
|
||||||
magisk.stubVersion=39
|
magisk.stubVersion=39
|
||||||
magisk.versionCode=27002
|
magisk.versionCode=27002
|
||||||
magisk.ondkVersion=r26.4
|
magisk.ondkVersion=r27.0
|
||||||
|
@@ -76,11 +76,10 @@ LOCAL_SRC_FILES := \
|
|||||||
init/selinux.cpp \
|
init/selinux.cpp \
|
||||||
init/init-rs.cpp
|
init/init-rs.cpp
|
||||||
|
|
||||||
LOCAL_LDFLAGS := -static -T src/lto_fix.lds
|
LOCAL_LDFLAGS := -static
|
||||||
|
|
||||||
ifdef B_CRT0
|
ifdef B_CRT0
|
||||||
LOCAL_STATIC_LIBRARIES += crt0
|
LOCAL_STATIC_LIBRARIES += crt0
|
||||||
LOCAL_LDFLAGS :=
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(BUILD_EXECUTABLE)
|
include $(BUILD_EXECUTABLE)
|
||||||
@@ -107,11 +106,11 @@ LOCAL_SRC_FILES := \
|
|||||||
boot/format.cpp \
|
boot/format.cpp \
|
||||||
boot/boot-rs.cpp
|
boot/boot-rs.cpp
|
||||||
|
|
||||||
LOCAL_LDFLAGS := -static -T src/lto_fix.lds
|
LOCAL_LDFLAGS := -static
|
||||||
|
|
||||||
ifdef B_CRT0
|
ifdef B_CRT0
|
||||||
LOCAL_STATIC_LIBRARIES += crt0
|
LOCAL_STATIC_LIBRARIES += crt0
|
||||||
LOCAL_LDFLAGS := -lm
|
LOCAL_LDFLAGS += -lm
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(BUILD_EXECUTABLE)
|
include $(BUILD_EXECUTABLE)
|
||||||
|
@@ -17,10 +17,9 @@ NDK_APP_OUT := ./obj/nolibc
|
|||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Busybox should use stock libc.a
|
# Busybox should use a newer libc.a
|
||||||
ifdef B_BB
|
ifdef B_BB
|
||||||
APP_PLATFORM := android-26
|
APP_PLATFORM := android-26
|
||||||
APP_LDFLAGS += -T src/lto_fix.lds
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
APP_SHORT_COMMANDS := true
|
APP_SHORT_COMMANDS := true
|
||||||
endif
|
endif
|
||||||
|
2
native/src/external/busybox
vendored
2
native/src/external/busybox
vendored
Submodule native/src/external/busybox updated: c8a45a3422...b0f643d535
2
native/src/external/crt0
vendored
2
native/src/external/crt0
vendored
Submodule native/src/external/crt0 updated: 6f5a10ac12...17233ab90e
@@ -1,12 +0,0 @@
|
|||||||
SECTIONS {
|
|
||||||
.init_array : {
|
|
||||||
*(SORT_BY_INIT_PRIORITY(.init_array.*))
|
|
||||||
*(EXCLUDE_FILE(*crtend_android.o) .init_array)
|
|
||||||
}
|
|
||||||
} INSERT AFTER .fini_array;
|
|
||||||
SECTIONS {
|
|
||||||
.fini_array : {
|
|
||||||
*(SORT_BY_INIT_PRIORITY(.fini_array.*))
|
|
||||||
*(EXCLUDE_FILE(*crtend_android.o) .fini_array)
|
|
||||||
}
|
|
||||||
} INSERT BEFORE .init_array;
|
|
Reference in New Issue
Block a user