Closed androiddisk closed 3 months ago
root@0d112bc30355:/projects# rustup target add aarch64-linux-android
error: toolchain 'ollvm-rust-1.70.0' does not support components: ollvm-rust-1.70.0 is a custom toolchai
Hello
Current targets specified in https://github.com/joaovarelas/Obfuscator-LLVM-16.0/blob/main/Dockerfile#L102
are ["x86_64-unknown-linux-gnu", "x86_64-pc-windows-gnu"]
I don't know if it works for android. You can test and let me know
EDIT: look into https://obfuscator.re/omvll/
--- config.toml.example 2024-03-07 21:01:34.072409871 +0800
+++ config.toml 2024-03-08 02:40:51.750035970 +0800
@@ -207,7 +207,7 @@
# host triples to this list as well in order for those host toolchains to be
# able to compile programs for their native target.
#target = ["x86_64-unknown-linux-gnu"] (as an example)
-
+target = ["x86_64-unknown-linux-gnu", "aarch64-linux-android"]
# Use this directory to store build artifacts.
# You can use "$ROOT" to indicate the root of the git repository.
#build-dir = "build"
@@ -400,7 +400,7 @@
# "maximally debuggable" environment (notably libstd) takes
# hours to build.
#
-#debug = false
+debug = false
# Whether to download the stage 1 and 2 compilers from CI.
# This is mostly useful for tools; if you have changes to `compiler/` they will be ignored.
@@ -527,7 +527,7 @@
# The "channel" for the Rust build to produce. The stable/beta channels only
# allow using stable features, whereas the nightly and dev channels allow using
# nightly features
-#channel = "dev"
+channel = "nightly"
# A descriptive string to be appended to `rustc --version` output, which is
# also used in places like debuginfo `DW_AT_producer`. This may be useful for
@@ -617,7 +617,7 @@
#thin-lto-import-instr-limit = if incremental { 10 } else { LLVM default (currently 100) }
# Map debuginfo paths to `/rust/$sha/...`, generally only set for releases
-#remap-debuginfo = false
+remap-debuginfo = true
# Link the compiler against `jemalloc`, where on Linux and OSX it should
# override the default allocator for rustc and LLVM.
@@ -757,6 +757,11 @@
# These options are related to distribution, mostly for the Rust project itself.
# You probably won't need to concern yourself with any of these options
# =============================================================================
+
+[target.aarch64-linux-android]
+android-ndk = "/root/kooapk/kooapk-kitchen/tmp/android-ndk-r25b/android-ndk"
+ar = "/root/kooapk/kooapk-kitchen/tmp/android-ndk-r25b/android-ndk/bin/llvm-ar"
+linker = "/root/kooapk/kooapk-kitchen/tmp/android-ndk-r25b/android-ndk/bin/aarch64-linux-android-clang"
[dist]
# This is the folder of artifacts that the build system will sign. All files in
need
target = ["x86_64-unknown-linux-gnu", "aarch64-linux-android"]
[target.aarch64-linux-android]
android-ndk = "/root/kooapk/kooapk-kitchen/tmp/android-ndk-r25b/android-ndk"
ar = "/root/kooapk/kooapk-kitchen/tmp/android-ndk-r25b/android-ndk/bin/llvm-ar"
linker = "/root/kooapk/kooapk-kitchen/tmp/android-ndk-r25b/android-ndk/bin/aarch64-linux-android-clang"
@joaovarelas Compilation requires referencing android NDK files
May I ask how to solve it