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
307964d8
Commit
307964d8
authored
Oct 26, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
android/build.py: always build with clang
Support for GCC has been dropped from NDK r13. Let's switch everything to clang before they really remove GCC completely.
parent
f3dd50de
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
11 deletions
+4
-11
build.py
android/build.py
+3
-9
project.py
python/build/project.py
+1
-2
No files found.
android/build.py
View file @
307964d8
...
...
@@ -39,7 +39,7 @@ build_arch = 'linux-x86_64'
class
AndroidNdkToolchain
:
def
__init__
(
self
,
tarball_path
,
src_path
,
build_path
,
use_cxx
,
use_clang
):
use_cxx
):
self
.
tarball_path
=
tarball_path
self
.
src_path
=
src_path
self
.
build_path
=
build_path
...
...
@@ -67,14 +67,10 @@ class AndroidNdkToolchain:
common_flags
=
'-march=armv7-a -mfloat-abi=softfp'
toolchain_bin
=
os
.
path
.
join
(
toolchain_path
,
'bin'
)
if
use_clang
:
llvm_bin
=
os
.
path
.
join
(
llvm_path
,
'bin'
)
self
.
cc
=
os
.
path
.
join
(
llvm_bin
,
'clang'
)
self
.
cxx
=
os
.
path
.
join
(
llvm_bin
,
'clang++'
)
common_flags
+=
' -target '
+
llvm_triple
+
' -integrated-as -gcc-toolchain '
+
toolchain_path
else
:
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
.
ranlib
=
os
.
path
.
join
(
toolchain_bin
,
arch
+
'-ranlib'
)
...
...
@@ -93,8 +89,6 @@ class AndroidNdkToolchain:
libstdcxx_path
=
os
.
path
.
join
(
ndk_path
,
'sources/cxx-stl/gnu-libstdc++'
,
gcc_version
)
libstdcxx_cppflags
=
'-isystem '
+
os
.
path
.
join
(
libstdcxx_path
,
'include'
)
+
' -isystem '
+
os
.
path
.
join
(
libstdcxx_path
,
'libs'
,
android_abi
,
'include'
)
if
use_clang
:
libstdcxx_cppflags
+=
' -D__STRICT_ANSI__'
libstdcxx_ldadd
=
os
.
path
.
join
(
libstdcxx_path
,
'libs'
,
android_abi
,
'libgnustl_static.a'
)
if
use_cxx
:
...
...
@@ -124,13 +118,13 @@ thirdparty_libs = [
# build the third-party libraries
for
x
in
thirdparty_libs
:
toolchain
=
AndroidNdkToolchain
(
tarball_path
,
src_path
,
build_path
,
use_cxx
=
x
.
use_cxx
,
use_clang
=
x
.
use_clang
)
use_cxx
=
x
.
use_cxx
)
if
not
x
.
is_installed
(
toolchain
):
x
.
build
(
toolchain
)
# configure and build MPD
toolchain
=
AndroidNdkToolchain
(
tarball_path
,
src_path
,
build_path
,
use_cxx
=
True
,
use_clang
=
True
)
use_cxx
=
True
)
configure
=
[
os
.
path
.
join
(
mpd_path
,
'configure'
),
...
...
python/build/project.py
View file @
307964d8
...
...
@@ -7,7 +7,7 @@ from build.tar import untar
class
Project
:
def
__init__
(
self
,
url
,
md5
,
installed
,
name
=
None
,
version
=
None
,
base
=
None
,
use_cxx
=
False
,
use_clang
=
False
):
use_cxx
=
False
):
if
base
is
None
:
basename
=
os
.
path
.
basename
(
url
)
m
=
re
.
match
(
r'^(.+)\.(tar(\.(gz|bz2|xz|lzma))?|zip)$'
,
basename
)
...
...
@@ -29,7 +29,6 @@ class Project:
self
.
installed
=
installed
self
.
use_cxx
=
use_cxx
self
.
use_clang
=
use_clang
def
download
(
self
,
toolchain
):
return
download_and_verify
(
self
.
url
,
self
.
md5
,
toolchain
.
tarball_path
)
...
...
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