Skip to content

Commit 48a28d5

Browse files
committed
Remove clang of get_recipe_env
Because as per ndk r19 the default compiler is clang and gcc has been partially removed
1 parent 61e6485 commit 48a28d5

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

pythonforandroid/archs.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def target(self):
4646
return '{triplet}{ndk_api}'.format(
4747
triplet=self.command_prefix, ndk_api=self.ctx.ndk_api)
4848

49-
def get_env(self, with_flags_in_cc=True, clang=False):
49+
def get_env(self, with_flags_in_cc=True):
5050
env = {}
5151

5252
# CFLAGS and CXXFLAGS
@@ -185,8 +185,8 @@ def target(self):
185185
class ArchARMv7_a(ArchARM):
186186
arch = 'armeabi-v7a'
187187

188-
def get_env(self, with_flags_in_cc=True, clang=False):
189-
env = super(ArchARMv7_a, self).get_env(with_flags_in_cc, clang=clang)
188+
def get_env(self, with_flags_in_cc=True):
189+
env = super(ArchARMv7_a, self).get_env(with_flags_in_cc)
190190
env['CFLAGS'] = (env['CFLAGS'] +
191191
(' -march=armv7-a -mfloat-abi=softfp '
192192
'-mfpu=vfp -mthumb'))
@@ -200,8 +200,8 @@ class Archx86(Arch):
200200
command_prefix = 'i686-linux-android'
201201
platform_dir = 'arch-x86'
202202

203-
def get_env(self, with_flags_in_cc=True, clang=False):
204-
env = super(Archx86, self).get_env(with_flags_in_cc, clang=clang)
203+
def get_env(self, with_flags_in_cc=True):
204+
env = super(Archx86, self).get_env(with_flags_in_cc)
205205
env['CFLAGS'] = (env['CFLAGS'] +
206206
' -march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32')
207207
env['CXXFLAGS'] = env['CFLAGS']
@@ -214,8 +214,8 @@ class Archx86_64(Arch):
214214
command_prefix = 'x86_64-linux-android'
215215
platform_dir = 'arch-x86_64'
216216

217-
def get_env(self, with_flags_in_cc=True, clang=False):
218-
env = super(Archx86_64, self).get_env(with_flags_in_cc, clang=clang)
217+
def get_env(self, with_flags_in_cc=True):
218+
env = super(Archx86_64, self).get_env(with_flags_in_cc)
219219
env['CFLAGS'] = (env['CFLAGS'] +
220220
' -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel')
221221
env['CXXFLAGS'] = env['CFLAGS']
@@ -228,8 +228,8 @@ class ArchAarch_64(Arch):
228228
command_prefix = 'aarch64-linux-android'
229229
platform_dir = 'arch-arm64'
230230

231-
def get_env(self, with_flags_in_cc=True, clang=False):
232-
env = super(ArchAarch_64, self).get_env(with_flags_in_cc, clang=clang)
231+
def get_env(self, with_flags_in_cc=True):
232+
env = super(ArchAarch_64, self).get_env(with_flags_in_cc)
233233
incpath = ' -I' + join(dirname(__file__), 'includes', 'arm64-v8a')
234234
env['EXTRA_CFLAGS'] = incpath
235235
env['CFLAGS'] += incpath

pythonforandroid/recipe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,12 +425,12 @@ def unpack(self, arch):
425425
else:
426426
info('{} is already unpacked, skipping'.format(self.name))
427427

428-
def get_recipe_env(self, arch=None, with_flags_in_cc=True, clang=False):
428+
def get_recipe_env(self, arch=None, with_flags_in_cc=True):
429429
"""Return the env specialized for the recipe
430430
"""
431431
if arch is None:
432432
arch = self.filtered_archs[0]
433-
return arch.get_env(with_flags_in_cc=with_flags_in_cc, clang=clang)
433+
return arch.get_env(with_flags_in_cc=with_flags_in_cc)
434434

435435
def prebuild_arch(self, arch):
436436
'''Run any pre-build tasks for the Recipe. By default, this checks if

pythonforandroid/recipes/jpeg/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def build_arch(self, arch):
6363
for lib in glob(join(build_dir, '*.a')):
6464
shprint(sh.cp, '-L', lib, self.ctx.libs_dir)
6565

66-
def get_recipe_env(self, arch=None, with_flags_in_cc=False, clang=True):
66+
def get_recipe_env(self, arch=None, with_flags_in_cc=False):
6767
env = environ.copy()
6868

6969
build_platform = '{system}-{machine}'.format(

pythonforandroid/recipes/openssl/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def should_build(self, arch):
114114
'libcrypto' + self.version + '.so')
115115

116116
def get_recipe_env(self, arch=None):
117-
env = super(OpenSSLRecipe, self).get_recipe_env(arch, clang=not self.use_legacy)
117+
env = super(OpenSSLRecipe, self).get_recipe_env(arch)
118118
env['OPENSSL_VERSION'] = self.version
119119
env['MAKE'] = 'make' # This removes the '-j5', which isn't safe
120120
if self.use_legacy:

pythonforandroid/recipes/pycrypto/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class PyCryptoRecipe(CompiledComponentsPythonRecipe):
1515
call_hostpython_via_targetpython = False
1616
patches = ['add_length.patch']
1717

18-
def get_recipe_env(self, arch=None, clang=True):
18+
def get_recipe_env(self, arch=None):
1919
env = super(PyCryptoRecipe, self).get_recipe_env(arch)
2020
openssl_recipe = Recipe.get_recipe('openssl', self.ctx)
2121
env['CC'] = env['CC'] + openssl_recipe.include_flags(arch)

0 commit comments

Comments
 (0)