diff --git a/build.py b/build.py index cc110629b..e4015f465 100755 --- a/build.py +++ b/build.py @@ -80,7 +80,7 @@ support_targets = {"magisk", "magiskinit", "magiskboot", "magiskpolicy", "resetp default_targets = support_targets - {"resetprop"} rust_targets = default_targets.copy() clean_targets = {"native", "cpp", "rust", "app"} -ondk_version = "r29.3" +ondk_version = "r29.4" # Global vars config = {} diff --git a/native/src/.cargo/config.toml b/native/src/.cargo/config.toml index 113c980e0..8bf89eed5 100644 --- a/native/src/.cargo/config.toml +++ b/native/src/.cargo/config.toml @@ -3,12 +3,19 @@ # The actual compilation will have the target overriden by command-line. target = "aarch64-linux-android" # Enable cross language LTO, and explicitly set dwarf-version for ThinLTO -rustflags = ["-Z", "dwarf-version=4", "-C", "linker-plugin-lto"] +rustflags = [ + "-Z", + "dwarf-version=4", + "-C", + "linker-plugin-lto", + "-C", + "force-unwind-tables=no", +] target-dir = "../out/rust" [unstable] build-std = ["std", "panic_abort"] -build-std-features = ["panic_immediate_abort", "optimize_for_size"] +build-std-features = ["optimize_for_size"] profile-rustflags = true [profile.release] diff --git a/native/src/Cargo.toml b/native/src/Cargo.toml index 2c500947e..1cac88c49 100644 --- a/native/src/Cargo.toml +++ b/native/src/Cargo.toml @@ -1,3 +1,5 @@ +cargo-features = ["panic-immediate-abort"] + [workspace] exclude = ["external"] members = ["base", "base/derive", "boot", "core", "init", "sepolicy"] @@ -59,12 +61,12 @@ unwrap_used = "deny" [profile.dev] opt-level = "z" lto = "thin" -panic = "abort" +panic = "immediate-abort" debug = "none" [profile.release] opt-level = "z" lto = "fat" codegen-units = 1 -panic = "abort" +panic = "immediate-abort" strip = true