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
40aab136
Commit
40aab136
authored
Aug 09, 2022
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make IDE recognize we are targeting Android
parent
4c0f72f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
build.py
build.py
+4
-0
config.toml
native/src/.cargo/config.toml
+4
-0
No files found.
build.py
View file @
40aab136
...
@@ -232,6 +232,9 @@ def run_cargo_build(args):
...
@@ -232,6 +232,9 @@ def run_cargo_build(args):
# Install cxxbridge and generate C++ bindings
# Install cxxbridge and generate C++ bindings
native_out
=
op
.
join
(
'..'
,
'out'
)
native_out
=
op
.
join
(
'..'
,
'out'
)
cfg
=
op
.
join
(
'.cargo'
,
'config.toml'
)
cfg_bak
=
op
.
join
(
'.cargo'
,
'config.toml.bak'
)
mv
(
cfg
,
cfg_bak
)
cxx_src
=
op
.
join
(
'external'
,
'cxx-rs'
,
'gen'
,
'cmd'
)
cxx_src
=
op
.
join
(
'external'
,
'cxx-rs'
,
'gen'
,
'cmd'
)
local_cargo_root
=
op
.
join
(
native_out
,
'.cargo'
)
local_cargo_root
=
op
.
join
(
native_out
,
'.cargo'
)
mkdir_p
(
local_cargo_root
)
mkdir_p
(
local_cargo_root
)
...
@@ -239,6 +242,7 @@ def run_cargo_build(args):
...
@@ -239,6 +242,7 @@ def run_cargo_build(args):
if
not
args
.
verbose
:
if
not
args
.
verbose
:
cmds
.
append
(
'-q'
)
cmds
.
append
(
'-q'
)
proc
=
execv
(
cmds
,
env
)
proc
=
execv
(
cmds
,
env
)
mv
(
cfg_bak
,
cfg
)
if
proc
.
returncode
!=
0
:
if
proc
.
returncode
!=
0
:
error
(
'cxxbridge-cmd installation failed!'
)
error
(
'cxxbridge-cmd installation failed!'
)
cxxbridge
=
op
.
join
(
local_cargo_root
,
'bin'
,
'cxxbridge'
+
EXE_EXT
)
cxxbridge
=
op
.
join
(
local_cargo_root
,
'bin'
,
'cxxbridge'
+
EXE_EXT
)
...
...
native/src/.cargo/config.toml
0 → 100644
View file @
40aab136
[build]
# This is only used to make the IDE happy, the actual compilation will
# have the target overriden by command-line
target
=
"aarch64-linux-android"
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