File tree 2 files changed +23
-9
lines changed
2 files changed +23
-9
lines changed Original file line number Diff line number Diff line change @@ -98,20 +98,29 @@ def build_arch(self, arch):
98
98
'--enable-shared' ,
99
99
]
100
100
101
+ if 'arm64' in arch .arch :
102
+ cross_prefix = 'aarch64-linux-android-'
103
+ arch_flag = 'aarch64'
104
+ else :
105
+ cross_prefix = 'arm-linux-androideabi-'
106
+ arch_flag = 'arm'
107
+
101
108
# android:
102
109
flags += [
103
110
'--target-os=android' ,
104
- '--cross-prefix=arm-linux-androideabi-' ,
105
- '--arch=arm' ,
111
+ '--cross-prefix={}' . format ( cross_prefix ) ,
112
+ '--arch={}' . format ( arch_flag ) ,
106
113
'--sysroot=' + self .ctx .ndk_platform ,
107
114
'--enable-neon' ,
108
115
'--prefix={}' .format (realpath ('.' )),
109
116
]
110
- cflags += [
111
- '-mfpu=vfpv3-d16' ,
112
- '-mfloat-abi=softfp' ,
113
- '-fPIC' ,
114
- ]
117
+
118
+ if arch_flag == 'arm' :
119
+ cflags += [
120
+ '-mfpu=vfpv3-d16' ,
121
+ '-mfloat-abi=softfp' ,
122
+ '-fPIC' ,
123
+ ]
115
124
116
125
env ['CFLAGS' ] += ' ' + ' ' .join (cflags )
117
126
env ['LDFLAGS' ] += ' ' + ' ' .join (ldflags )
@@ -121,7 +130,8 @@ def build_arch(self, arch):
121
130
shprint (sh .make , '-j4' , _env = env )
122
131
shprint (sh .make , 'install' , _env = env )
123
132
# copy libs:
124
- sh .cp ('-a' , sh .glob ('./lib/lib*.so' ), self .ctx .get_libs_dir (arch .arch ))
133
+ sh .cp ('-a' , sh .glob ('./lib/lib*.so' ),
134
+ self .ctx .get_libs_dir (arch .arch ))
125
135
126
136
127
137
recipe = FFMpegRecipe ()
Original file line number Diff line number Diff line change @@ -14,9 +14,13 @@ def should_build(self, arch):
14
14
def build_arch (self , arch ):
15
15
with current_directory (self .get_build_dir (arch .arch )):
16
16
env = self .get_recipe_env (arch )
17
+ if 'arm64' in arch .arch :
18
+ cross_prefix = 'aarch64-linux-android-'
19
+ else :
20
+ cross_prefix = 'arm-linux-androideabi-'
17
21
configure = sh .Command ('./configure' )
18
22
shprint (configure ,
19
- '--cross-prefix=arm-linux-androideabi-' ,
23
+ '--cross-prefix={}' . format ( cross_prefix ) ,
20
24
'--host=arm-linux' ,
21
25
'--disable-asm' ,
22
26
'--disable-cli' ,
You can’t perform that action at this time.
0 commit comments