Skip to content

Commit 16929a4

Browse files
committed
fixed detection of GCC from Android NDK >= 18b (+windows)
1 parent 27bd606 commit 16929a4

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
* 2018.12.15 - [FGG] fixed registration of Clang from Android NDK >= 17 with LLVM C++ lib
2+
fixed detection of GCC from Android NDK >= 18b (+windows)
23

34
* 2018.12.11 - [FGG] fixed ck snapshot artifact (with Leo's feedback)
45

module/soft/module.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2203,6 +2203,7 @@ def get_version(i):
22032203
# Calling customized script to parse version
22042204
ii={'output':lst,
22052205
'host_os_dict':hosd,
2206+
'full_path':fp,
22062207
'ck_kernel':ck}
22072208
rx=cs.parse_version(ii)
22082209
if rx['return']>0 and rx['return']!=16: return rx

soft/compiler.gcc.android.ndk/customize.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ def limit(i):
5858
return {'return':1, 'error':'android_compiler_prefix is not specified in target OS meta'}
5959

6060
fn=acp+'-gcc'
61+
fn1=''
6162
if phosd=='win':
63+
fn1=fn+'.cmd' # After NDK 18b, no more gcc
6264
fn+='.exe'
6365

6466
atc=tosd.get('android_toolchain','')
@@ -83,6 +85,10 @@ def limit(i):
8385
p2=os.path.join(p1,f,'prebuilt',prebuilt,'bin',fn)
8486
if os.path.isfile(p2):
8587
drx.append(p2)
88+
elif fn1!='':
89+
p2=os.path.join(p1,f,'prebuilt',prebuilt,'bin',fn1)
90+
if os.path.isfile(p2):
91+
drx.append(p2)
8692

8793
return {'return':0, 'list':drx}
8894

@@ -95,6 +101,8 @@ def parse_version(i):
95101

96102
ver=''
97103

104+
fp=i.get('full_path','')
105+
98106
for q in lst:
99107
q=q.strip()
100108
if q!='':
@@ -107,6 +115,9 @@ def parse_version(i):
107115
ver=q
108116
break
109117

118+
if ver=='' and fp.endswith('.cmd'):
119+
ver='unused'
120+
110121
return {'return':0, 'version':ver}
111122

112123
##############################################################################

0 commit comments

Comments
 (0)