8000 Fix build platform hardcoded flags for archs.py · pygame/python-for-android@f570def · GitHub
[go: up one dir, main page]

Skip to content

Commit f570def

Browse files
committed
Fix build platform hardcoded flags for archs.py
1 parent 5dccf9f commit f570def

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pythonforandroid/archs.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from distutils.spawn import find_executable
66

77
from pythonforandroid.recipe import Recipe
8-
from pythonforandroid.util import BuildInterruptingException
8+
from pythonforandroid.util import BuildInterruptingException, build_platform
99

1010

1111
class Arch(object):
@@ -51,7 +51,8 @@ def get_env(self, with_flags_in_cc=True, clang=False):
5151
toolchain = '{android_host}-{toolchain_version}'.format(
5252
android_host=self.ctx.toolchain_prefix,
5353
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)
5556
cflags.append('-gcc-toolchain {}'.format(toolchain))
5657

5758
env['CFLAGS'] = ' '.join(cflags)
@@ -106,7 +107,7 @@ def get_env(self, with_flags_in_cc=True, clang=False):
106107
llvm_dirname = split(
107108
glob(join(self.ctx.ndk_dir, 'toolchains', 'llvm*'))[-1])[-1]
108109
clang_path = join(self.ctx.ndk_dir, 'toolchains', llvm_dirname,
109-
'prebuilt', 'linux-x86_64', 'bin')
110+
'prebuilt', build_platform, 'bin')
110111
environ['PATH'] = '{clang_path}:{path}'.format(
111112
clang_path=clang_path, path=environ['PATH'])
112113
exe = join(clang_path, 'clang')

0 commit comments

Comments
 (0)
0