File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1197,14 +1197,24 @@ def compile(source):
11971197 if not project :
11981198 # Realistically this should inherit from context.arch, but
11991199 # this works for now.
1200- abi = 'armeabi-v7a'
12011200 sdk = '21'
1201+ abi = {
1202+ 'aarch64' : 'arm64-v8a' ,
1203+ 'amd64' : 'x86_64' ,
1204+ 'arm' : 'armeabi-v7a' ,
1205+ 'i386' : 'x86' ,
1206+ 'mips' : 'mips' ,
1207+ 'mips64' : 'mips64' ,
1208+ }.get (context .arch , None )
12021209
12031210 # If we have an attached device, use its settings.
12041211 if context .device :
12051212 abi = str (properties .ro .product .cpu .abi )
12061213 sdk = str (properties .ro .build .version .sdk )
12071214
1215+ if abi is None :
1216+ log .error ("Unknown CPU ABI" )
1217+
12081218 project = _generate_ndk_project (source , abi , sdk )
12091219
12101220 # Remove any output files
Original file line number Diff line number Diff line change @@ -1127,7 +1127,7 @@ def device(self, device):
11271127 self .os = device .os or self .os
11281128 elif isinstance (device , str ):
11291129 device = Device (device )
1130- else :
1130+ elif device is not None :
11311131 raise AttributeError ("device must be either a Device object or a serial number as a string" )
11321132
11331133 return device
You can’t perform that action at this time.
0 commit comments