mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-22 07:57:39 +00:00
Skip cargo build if possible
This commit is contained in:
parent
4c45775131
commit
96e559fb0e
8
build.py
8
build.py
@ -259,7 +259,6 @@ def run_cargo(cmds, triple="aarch64-linux-android"):
|
||||
|
||||
|
||||
def run_cargo_build(args):
|
||||
os.chdir(op.join("native", "src"))
|
||||
native_out = op.join("..", "out")
|
||||
mkdir(native_out)
|
||||
|
||||
@ -267,6 +266,9 @@ def run_cargo_build(args):
|
||||
if "resetprop" in args.target:
|
||||
targets.add("magisk")
|
||||
|
||||
if len(targets) == 0:
|
||||
return
|
||||
|
||||
# Start building the actual build commands
|
||||
cmds = ["build"]
|
||||
for target in targets:
|
||||
@ -298,8 +300,6 @@ def run_cargo_build(args):
|
||||
target = op.join(arch_out, f"lib{tgt}-rs.a")
|
||||
mv(source, target)
|
||||
|
||||
os.chdir(op.join("..", ".."))
|
||||
|
||||
|
||||
def run_cargo_cmd(args):
|
||||
global STDOUT
|
||||
@ -382,7 +382,9 @@ def build_binary(args):
|
||||
|
||||
header("* Building binaries: " + " ".join(args.target))
|
||||
|
||||
os.chdir(op.join("native", "src"))
|
||||
run_cargo_build(args)
|
||||
os.chdir(op.join("..", ".."))
|
||||
|
||||
dump_flag_header()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user