import sysimport osclass AndroidNDK:"""This class is used to get the current NDK information."""ndk_dir = ""def __init__(self, ndk_dir):self.ndk_dir = ndk_dir@propertydef host_tag(self):"""Returns the host tag for the current system.Note: The host tag is ``darwin-x86_64`` even on Apple Silicon macs."""return f"{sys.platform}-x86_64"@propertydef llvm_prebuilt_dir(self):return os.path.join(self.ndk_dir, "toolchains", "llvm", "prebuilt", self.host_tag)@propertydef llvm_bin_dir(self):return os.path.join(self.llvm_prebuilt_dir, "bin")@propertydef clang(self):return os.path.join(self.llvm_bin_dir, "clang")@propertydef clang_cxx(self):return os.path.join(self.llvm_bin_dir, "clang++")@propertydef llvm_binutils_prefix(self):return os.path.join(self.llvm_bin_dir, "llvm-")@propertydef llvm_ar(self):return f"{self.llvm_binutils_prefix}ar"@propertydef llvm_ranlib(self):return f"{self.llvm_binutils_prefix}ranlib"@propertydef llvm_objcopy(self):return f"{self.llvm_binutils_prefix}objcopy"@propertydef llvm_objdump(self):return f"{self.llvm_binutils_prefix}objdump"@propertydef llvm_readelf(self):return f"{self.llvm_binutils_prefix}readelf"@propertydef llvm_strip(self):return f"{self.llvm_binutils_prefix}strip"@propertydef sysroot(self):return os.path.join(self.llvm_prebuilt_dir, "sysroot")@propertydef sysroot_include_dir(self):return os.path.join(self.sysroot, "usr", "include")@propertydef sysroot_lib_dir(self):return os.path.join(self.sysroot, "usr", "lib")@propertydef libcxx_include_dir(self):return os.path.join(self.sysroot_include_dir, "c++", "v1")
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。