public static bool ValidateNdkPlatform(TaskLoggingHelper log, string ndkPath, AndroidTargetArch arch, bool requireLibm) { // Check that we have a compatible NDK version for the targeted ABIs. NdkUtil.NdkVersion ndkVersion; bool hasNdkVersion = NdkUtil.GetNdkToolchainRelease (ndkPath, out ndkVersion); if (NdkUtil.IsNdk64BitArch(arch) && hasNdkVersion && ndkVersion.Version < 10) { log.LogMessage (MessageImportance.High, "The detected Android NDK version is incompatible with the targeted 64-bit architecture, " + "please upgrade to NDK r10 or newer."); } // NDK r10d is buggy and cannot link x86_64 ABI shared libraries because they are 32-bits. // See https://code.google.com/p/android/issues/detail?id=161421 if (requireLibm && ndkVersion.Version == 10 && ndkVersion.Revision == "d" && arch == AndroidTargetArch.X86_64) { log.LogCodedError ("XA3004", "Android NDK r10d is buggy and provides an incompatible x86_64 libm.so. " + "See https://code.google.com/p/android/issues/detail?id=161422."); return false; } return true; }
static bool ValidateAotConfiguration(TaskLoggingHelper log, AndroidTargetArch arch, bool enableLLVM) { if (arch == AndroidTargetArch.Arm64 && enableLLVM) { log.LogCodedError ("XA3004", "arm64-v8a architecture is not currently supported on LLVM AOT mode."); return false; } if (arch == AndroidTargetArch.X86_64) { log.LogCodedError ("XA3004", "x86_64 architecture is not currently supported on AOT mode."); return false; } return true; }