Add bootstrap support for android
This commit is contained in:
parent
e621e1c73f
commit
a42c0257c7
1 changed files with 16 additions and 6 deletions
|
@ -415,6 +415,10 @@ class RustBuild(object):
|
||||||
# The goal here is to come up with the same triple as LLVM would,
|
# The goal here is to come up with the same triple as LLVM would,
|
||||||
# at least for the subset of platforms we're willing to target.
|
# at least for the subset of platforms we're willing to target.
|
||||||
if ostype == 'Linux':
|
if ostype == 'Linux':
|
||||||
|
os = subprocess.check_output(['uname', '-o']).strip().decode(default_encoding)
|
||||||
|
if os == 'Android':
|
||||||
|
ostype = 'linux-android'
|
||||||
|
else:
|
||||||
ostype = 'unknown-linux-gnu'
|
ostype = 'unknown-linux-gnu'
|
||||||
elif ostype == 'FreeBSD':
|
elif ostype == 'FreeBSD':
|
||||||
ostype = 'unknown-freebsd'
|
ostype = 'unknown-freebsd'
|
||||||
|
@ -472,15 +476,21 @@ class RustBuild(object):
|
||||||
cputype = 'i686'
|
cputype = 'i686'
|
||||||
elif cputype in {'xscale', 'arm'}:
|
elif cputype in {'xscale', 'arm'}:
|
||||||
cputype = 'arm'
|
cputype = 'arm'
|
||||||
|
if ostype == 'linux-android':
|
||||||
|
ostype = 'linux-androideabi'
|
||||||
elif cputype == 'armv6l':
|
elif cputype == 'armv6l':
|
||||||
cputype = 'arm'
|
cputype = 'arm'
|
||||||
|
if ostype == 'linux-android':
|
||||||
|
ostype = 'linux-androideabi'
|
||||||
|
else:
|
||||||
ostype += 'eabihf'
|
ostype += 'eabihf'
|
||||||
elif cputype in {'armv7l', 'armv8l'}:
|
elif cputype in {'armv7l', 'armv8l'}:
|
||||||
cputype = 'armv7'
|
cputype = 'armv7'
|
||||||
|
if ostype == 'linux-android':
|
||||||
|
ostype = 'linux-androideabi'
|
||||||
|
else:
|
||||||
ostype += 'eabihf'
|
ostype += 'eabihf'
|
||||||
elif cputype == 'aarch64':
|
elif cputype in {'aarch64', 'arm64'}:
|
||||||
cputype = 'aarch64'
|
|
||||||
elif cputype == 'arm64':
|
|
||||||
cputype = 'aarch64'
|
cputype = 'aarch64'
|
||||||
elif cputype == 'mips':
|
elif cputype == 'mips':
|
||||||
if sys.byteorder == 'big':
|
if sys.byteorder == 'big':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue