Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
48cc76f1
Commit
48cc76f1
authored
Sep 26, 2023
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
python/build/toolchain: add is_android, is_darwin
parent
a0892b85
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
cmake.py
python/build/cmake.py
+2
-2
meson.py
python/build/meson.py
+1
-1
toolchain.py
python/build/toolchain.py
+4
-0
No files found.
python/build/cmake.py
View file @
48cc76f1
...
...
@@ -15,7 +15,7 @@ def __write_cmake_compiler(f: TextIO, language: str, compiler: str) -> None:
print
(
f
'set(CMAKE_{language}_COMPILER {compiler})'
,
file
=
f
)
def
__write_cmake_toolchain_file
(
f
:
TextIO
,
toolchain
:
AnyToolchain
)
->
None
:
if
'-darwin'
in
toolchain
.
actual_arch
:
if
toolchain
.
is_darwin
:
cmake_system_name
=
'Darwin'
elif
toolchain
.
is_windows
:
cmake_system_name
=
'Windows'
...
...
@@ -65,7 +65,7 @@ def configure(toolchain: AnyToolchain, src: str, build: str, args: list[str]=[],
# looking for libraries on the build host (TODO: fix this
# properly); but we must not do that on Android because the NDK
# has a sysroot already
if
'-android'
not
in
toolchain
.
actual_arch
and
'-darwin'
not
in
toolchain
.
actual_arch
:
if
not
toolchain
.
is_android
and
not
toolchain
.
is_darwin
:
cross_args
.
append
(
'-DCMAKE_SYSROOT='
+
toolchain
.
install_prefix
)
os
.
makedirs
(
build
,
exist_ok
=
True
)
...
...
python/build/meson.py
View file @
48cc76f1
...
...
@@ -63,7 +63,7 @@ pkgconfig = '{toolchain.pkg_config}'
root = '{toolchain.install_prefix}'
"""
)
if
'android'
in
toolchain
.
arch
:
if
toolchain
.
is_android
:
f
.
write
(
"""
# Keep Meson from executing Android-x86 test binariees
needs_exe_wrapper = true
...
...
python/build/toolchain.py
View file @
48cc76f1
...
...
@@ -91,6 +91,8 @@ class AndroidNdkToolchain:
self
.
is_armv7
=
self
.
is_arm
and
'armv7'
in
self
.
cflags
self
.
is_aarch64
=
ndk_arch
==
'arm64'
self
.
is_windows
=
False
self
.
is_android
=
True
self
.
is_darwin
=
False
libstdcxx_flags
=
''
libstdcxx_cxxflags
=
''
...
...
@@ -162,6 +164,8 @@ class MingwToolchain:
self
.
is_armv7
=
self
.
is_arm
and
'armv7'
in
self
.
cflags
self
.
is_aarch64
=
arch
==
'aarch64'
self
.
is_windows
=
'mingw32'
in
arch
self
.
is_android
=
False
self
.
is_darwin
=
False
self
.
env
=
dict
(
os
.
environ
)
...
...
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