@@ -205,7 +205,7 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
205
205
raylib .root_module .addCMacro ("PLATFORM_DRM" , "" );
206
206
raylib .root_module .addCMacro ("EGL_NO_X11" , "" );
207
207
raylib .root_module .addCMacro ("DEFAULT_BATCH_BUFFER_ELEMENT" , "" );
208
- } else if (target .result .abi == .android ) {
208
+ } else if (target .result .abi . isAndroid () ) {
209
209
210
210
//these are the only tag options per https://developer.android.com/ndk/guides/other_build_systems
211
211
const hostTuple = switch (builtin .target .os .tag ) {
@@ -215,7 +215,14 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
215
215
else = > @panic ("unsupported host OS" ),
216
216
};
217
217
218
- const androidTriple = try target .result .linuxTriple (b .allocator );
218
+ const androidTriple = switch (target .result .cpu .arch ) {
219
+ .x86 = > "i686-linux-android" ,
220
+ .x86_64 = > "x86_64-linux-android" ,
221
+ .arm = > "arm-linux-androideabi" ,
222
+ .aarch64 = > "aarch64-linux-android" ,
223
+ .riscv64 = > "riscv64-linux-android" ,
224
+ else = > error .InvalidAndroidTarget ,
225
+ } catch @panic ("invalid android target!" );
219
226
const androidNdkPathString : []const u8 = options .android_ndk ;
220
227
if (androidNdkPathString .len < 1 ) @panic ("no ndk path provided and ANDROID_NDK_HOME is not set" );
221
228
const androidApiLevel : []const u8 = options .android_api_version ;
0 commit comments