File tree Expand file tree Collapse file tree 1 file changed +16
-8
lines changed
Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -459,13 +459,6 @@ def include_dirs(self):
459459 d .format (arch = self ))
460460 for d in self .ctx .include_dirs ]
461461
462- def get_env (self ):
463- raise ValueError ('Tried to get_env of Arch, this needs '
464- 'a specific Arch subclass' )
465-
466- class ArchARM (Arch ):
467- arch = "armeabi"
468-
469462 def get_env (self ):
470463 include_dirs = [
471464 "-I{}/{}" .format (
@@ -536,6 +529,9 @@ def get_env(self):
536529
537530 return env
538531
532+ class ArchARM (Arch ):
533+ arch = "armeabi"
534+
539535class ArchARMv7_a (ArchARM ):
540536 arch = 'armeabi-v7'
541537
@@ -548,7 +544,19 @@ class Archx86(Arch):
548544 arch = 'x86'
549545
550546 def get_env (self ):
551- raise ValueError ('Archx86 not supported yet!' )
547+ env = super (ArchARMv7_a , self ).get_env ()
548+ env ['CFLAGS' ] = env ['CFLAGS' ] + ' -march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32'
549+ env ['CXXFLAGS' ] = env ['CFLAGS' ]
550+ return env
551+
552+ class Archx86_64 (Arch ):
553+ arch = 'x86_64'
554+
555+ def get_env (self ):
556+ env = super (ArchARMv7_a , self ).get_env ()
557+ env ['CFLAGS' ] = env ['CFLAGS' ] + ' -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel'
558+ env ['CXXFLAGS' ] = env ['CFLAGS' ]
559+ return env
552560
553561# class ArchSimulator(Arch):
554562# sdk = "iphonesimulator"
You can’t perform that action at this time.
0 commit comments