--- a/src/bootstrap/src/utils/cc_detect.rs +++ b/src/bootstrap/src/utils/cc_detect.rs @@ -244,7 +244,7 @@ // API 19 is the earliest API level supported by NDK r25b but AArch64 and x86_64 support // begins at API level 21. let api_level = - if triple.contains("aarch64") || triple.contains("x86_64") { "21" } else { "19" }; + "@TERMUX_PKG_API_LEVEL@"; let compiler = format!("{}{}-{}", triple_translated, api_level, compiler.clang()); let host_tag = if cfg!(target_os = "macos") { // The NDK uses universal binaries, so this is correct even on ARM.