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
da7f32bd
Commit
da7f32bd
authored
Sep 26, 2023
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
python/build/toolchain: rename `arch` to `host_triplet`
parent
9a5eac4e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
24 deletions
+22
-24
autotools.py
python/build/autotools.py
+1
-1
cmake.py
python/build/cmake.py
+3
-3
meson.py
python/build/meson.py
+1
-1
openssl.py
python/build/openssl.py
+1
-1
toolchain.py
python/build/toolchain.py
+16
-18
No files found.
python/build/autotools.py
View file @
da7f32bd
...
...
@@ -58,7 +58,7 @@ class AutotoolsProject(MakeProject):
'ARFLAGS='
+
toolchain
.
arflags
,
'RANLIB='
+
toolchain
.
ranlib
,
'STRIP='
+
toolchain
.
strip
,
'--host='
+
toolchain
.
arch
,
'--host='
+
toolchain
.
host_triplet
,
'--prefix='
+
toolchain
.
install_prefix
,
'--disable-silent-rules'
,
]
...
...
python/build/cmake.py
View file @
da7f32bd
...
...
@@ -24,10 +24,10 @@ def __write_cmake_toolchain_file(f: TextIO, toolchain: AnyToolchain) -> None:
f
.
write
(
f
"""
set(CMAKE_SYSTEM_NAME {cmake_system_name})
set(CMAKE_SYSTEM_PROCESSOR {toolchain.
actual_arch
.split('-', 1)[0]})
set(CMAKE_SYSTEM_PROCESSOR {toolchain.
host_triplet
.split('-', 1)[0]})
set(CMAKE_C_COMPILER_TARGET {toolchain.
actual_arch
})
set(CMAKE_CXX_COMPILER_TARGET {toolchain.
actual_arch
})
set(CMAKE_C_COMPILER_TARGET {toolchain.
host_triplet
})
set(CMAKE_CXX_COMPILER_TARGET {toolchain.
host_triplet
})
set(CMAKE_C_FLAGS_INIT "{toolchain.cflags} {toolchain.cppflags}")
set(CMAKE_CXX_FLAGS_INIT "{toolchain.cxxflags} {toolchain.cppflags}")
...
...
python/build/meson.py
View file @
da7f32bd
...
...
@@ -30,7 +30,7 @@ def make_cross_file(toolchain: AnyToolchain) -> str:
cpu
=
'arm64-v8a'
else
:
cpu_family
=
'x86'
if
'x86_64'
in
toolchain
.
arch
:
if
'x86_64'
in
toolchain
.
host_triplet
:
cpu
=
'x86_64'
else
:
cpu
=
'i686'
...
...
python/build/openssl.py
View file @
da7f32bd
...
...
@@ -53,7 +53,7 @@ class OpenSSLProject(MakeProject):
'aarch64-apple-darwin'
:
'darwin64-arm64-cc'
,
}
openssl_arch
=
openssl_archs
[
toolchain
.
arch
]
openssl_arch
=
openssl_archs
[
toolchain
.
host_triplet
]
configure
=
[
'./Configure'
,
...
...
python/build/toolchain.py
View file @
da7f32bd
...
...
@@ -38,9 +38,9 @@ class AndroidNdkToolchain:
# select the NDK target
abi_info
=
android_abis
[
android_abi
]
arch
=
abi_info
[
'arch'
]
host_triplet
=
abi_info
[
'arch'
]
arch_path
=
os
.
path
.
join
(
lib_path
,
arch
)
arch_path
=
os
.
path
.
join
(
lib_path
,
host_triplet
)
self
.
tarball_path
=
tarball_path
self
.
src_path
=
src_path
...
...
@@ -51,12 +51,11 @@ class AndroidNdkToolchain:
install_prefix
=
os
.
path
.
join
(
arch_path
,
'root'
)
self
.
arch
=
arch
self
.
actual_arch
=
arch
self
.
host_triplet
=
host_triplet
self
.
install_prefix
=
install_prefix
llvm_path
=
os
.
path
.
join
(
ndk_path
,
'toolchains'
,
'llvm'
,
'prebuilt'
,
build_arch
)
llvm_triple
=
arch
+
android_api_level
llvm_triple
=
host_triplet
+
android_api_level
common_flags
=
'-Os -g'
common_flags
+=
' '
+
abi_info
[
'cflags'
]
...
...
@@ -118,24 +117,23 @@ class AndroidNdkToolchain:
class
MingwToolchain
:
def
__init__
(
self
,
top_path
:
str
,
toolchain_path
,
arch
,
x64
:
bool
,
toolchain_path
,
host_triplet
,
x64
:
bool
,
tarball_path
,
src_path
,
build_path
,
install_prefix
):
self
.
arch
=
arch
self
.
actual_arch
=
arch
self
.
host_triplet
=
host_triplet
self
.
tarball_path
=
tarball_path
self
.
src_path
=
src_path
self
.
build_path
=
build_path
self
.
install_prefix
=
install_prefix
toolchain_bin
=
os
.
path
.
join
(
toolchain_path
,
'bin'
)
self
.
cc
=
os
.
path
.
join
(
toolchain_bin
,
arch
+
'-gcc'
)
self
.
cxx
=
os
.
path
.
join
(
toolchain_bin
,
arch
+
'-g++'
)
self
.
ar
=
os
.
path
.
join
(
toolchain_bin
,
arch
+
'-ar'
)
self
.
cc
=
os
.
path
.
join
(
toolchain_bin
,
host_triplet
+
'-gcc'
)
self
.
cxx
=
os
.
path
.
join
(
toolchain_bin
,
host_triplet
+
'-g++'
)
self
.
ar
=
os
.
path
.
join
(
toolchain_bin
,
host_triplet
+
'-ar'
)
self
.
arflags
=
'rcs'
self
.
ranlib
=
os
.
path
.
join
(
toolchain_bin
,
arch
+
'-ranlib'
)
self
.
nm
=
os
.
path
.
join
(
toolchain_bin
,
arch
+
'-nm'
)
self
.
strip
=
os
.
path
.
join
(
toolchain_bin
,
arch
+
'-strip'
)
self
.
windres
=
os
.
path
.
join
(
toolchain_bin
,
arch
+
'-windres'
)
self
.
ranlib
=
os
.
path
.
join
(
toolchain_bin
,
host_triplet
+
'-ranlib'
)
self
.
nm
=
os
.
path
.
join
(
toolchain_bin
,
host_triplet
+
'-nm'
)
self
.
strip
=
os
.
path
.
join
(
toolchain_bin
,
host_triplet
+
'-strip'
)
self
.
windres
=
os
.
path
.
join
(
toolchain_bin
,
host_triplet
+
'-windres'
)
common_flags
=
'-O2 -g'
...
...
@@ -156,10 +154,10 @@ class MingwToolchain:
# enable it.
self
.
cppflags
+=
' -D_FORTIFY_SOURCE=0'
self
.
is_arm
=
arch
.
startswith
(
'arm'
)
self
.
is_arm
=
host_triplet
.
startswith
(
'arm'
)
self
.
is_armv7
=
self
.
is_arm
and
'armv7'
in
self
.
cflags
self
.
is_aarch64
=
arch
==
'aarch64'
self
.
is_windows
=
'mingw32'
in
arch
self
.
is_aarch64
=
host_triplet
==
'aarch64'
self
.
is_windows
=
'mingw32'
in
host_triplet
self
.
is_android
=
False
self
.
is_darwin
=
False
...
...
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