|
5 | 5 | from distutils.spawn import find_executable
|
6 | 6 |
|
7 | 7 | from pythonforandroid.recipe import Recipe
|
8 |
| -from pythonforandroid.util import BuildInterruptingException |
| 8 | +from pythonforandroid.util import BuildInterruptingException, build_platform |
9 | 9 |
|
10 | 10 |
|
11 | 11 | class Arch(object):
|
@@ -51,7 +51,8 @@ def get_env(self, with_flags_in_cc=True, clang=False):
|
51 | 51 | toolchain = '{android_host}-{toolchain_version}'.format(
|
52 | 52 | android_host=self.ctx.toolchain_prefix,
|
53 | 53 | toolchain_version=self.ctx.toolchain_version)
|
54 |
| - toolchain = join(self.ctx.ndk_dir, 'toolchains', toolchain, 'prebuilt', 'linux-x86_64') |
| 54 | + toolchain = join(self.ctx.ndk_dir, 'toolchains', toolchain, |
| 55 | + 'prebuilt', build_platform) |
55 | 56 | cflags.append('-gcc-toolchain {}'.format(toolchain))
|
56 | 57 |
|
57 | 58 | env['CFLAGS'] = ' '.join(cflags)
|
@@ -106,7 +107,7 @@ def get_env(self, with_flags_in_cc=True, clang=False):
|
106 | 107 | llvm_dirname = split(
|
107 | 108 | glob(join(self.ctx.ndk_dir, 'toolchains', 'llvm*'))[-1])[-1]
|
108 | 109 | clang_path = join(self.ctx.ndk_dir, 'toolchains', llvm_dirname,
|
109 |
| - 'prebuilt', 'linux-x86_64', 'bin') |
| 110 | + 'prebuilt', build_platform, 'bin') |
110 | 111 | environ['PATH'] = '{clang_path}:{path}'.format(
|
111 | 112 | clang_path=clang_path, path=environ['PATH'])
|
112 | 113 | exe = join(clang_path, 'clang')
|
|
0 commit comments