Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
a7ab8216
Commit
a7ab8216
authored
Jul 24, 2022
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Proper build scripts
parent
b9e89a1a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
build.py
build.py
+3
-2
Android-rs.mk
native/src/Android-rs.mk
+8
-0
No files found.
build.py
View file @
a7ab8216
...
...
@@ -231,10 +231,11 @@ def run_cargo_build(args):
env
[
'CARGO_BUILD_RUSTC'
]
=
op
.
join
(
rust_bin
,
'rustc'
+
EXE_EXT
)
# Install cxxbridge and generate C++ bindings
native_out
=
op
.
join
(
'..'
,
'..'
,
'native'
,
'out'
)
native_out
=
op
.
join
(
'..'
,
'out'
)
cxx_src
=
op
.
join
(
'external'
,
'cxx-rs'
,
'gen'
,
'cmd'
)
local_cargo_root
=
op
.
join
(
native_out
,
'.cargo'
)
mkdir_p
(
local_cargo_root
)
cmds
=
[
cargo
,
'install'
,
'--root'
,
local_cargo_root
,
'
cxxbridge-cmd'
]
cmds
=
[
cargo
,
'install'
,
'--root'
,
local_cargo_root
,
'
--path'
,
cxx_src
]
if
not
args
.
verbose
:
cmds
.
append
(
'-q'
)
proc
=
execv
(
cmds
,
env
)
...
...
native/src/Android-rs.mk
View file @
a7ab8216
...
...
@@ -4,22 +4,30 @@ LOCAL_PATH := $(call my-dir)
# Rust compilation outputs
###########################
ifdef B_MAGISK
include $(CLEAR_VARS)
LOCAL_MODULE := magisk-rs
LOCAL_SRC_FILES := ../out/$(TARGET_ARCH_ABI)/libmagisk-rs.a
include $(PREBUILT_STATIC_LIBRARY)
endif
ifdef B_BOOT
include $(CLEAR_VARS)
LOCAL_MODULE := boot-rs
LOCAL_SRC_FILES := ../out/$(TARGET_ARCH_ABI)/libmagiskboot-rs.a
include $(PREBUILT_STATIC_LIBRARY)
endif
ifdef B_INIT
include $(CLEAR_VARS)
LOCAL_MODULE := init-rs
LOCAL_SRC_FILES := ../out/$(TARGET_ARCH_ABI)/libmagiskinit-rs.a
include $(PREBUILT_STATIC_LIBRARY)
endif
ifdef B_POLICY
include $(CLEAR_VARS)
LOCAL_MODULE := policy-rs
LOCAL_SRC_FILES := ../out/$(TARGET_ARCH_ABI)/libmagiskpolicy-rs.a
include $(PREBUILT_STATIC_LIBRARY)
endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment