2016-08-19 90 views
0
[email protected]:~/Downloads/hello/jni$ ndk-build -B 
[armeabi] Compile thumb : hello <= hello.c 
[armeabi] Executable : hello 
[armeabi] Install : hello => libs/armeabi/hello 
[x86] Compile : hello <= hello.c 
[x86] Executable : hello 
[x86] Install : hello => libs/x86/hello 
[arm64-v8a] Compile : hello <= hello.c 
aarch64-linux-android-gcc: error: unrecognized command line option '-mllvm' 
aarch64-linux-android-gcc: error: unrecognized command line option '-sub' 
aarch64-linux-android-gcc: error: unrecognized command line option '-mllvm' 
aarch64-linux-android-gcc: error: unrecognized command line option '-fla' 
aarch64-linux-android-gcc: error: unrecognized command line option '-mllvm' 
aarch64-linux-android-gcc: error: unrecognized command line option '-bcf' 

的android.mk的教改嘗試:鄰LLVM,不可識別的命令行選項 '-sub' 爲64bits的

LOCAL_PATH := $(call my-dir) 
include $(CLEAR_VARS) 
LOCAL_MODULE := hello 
LOCAL_SRC_FILES := hello.c 
LOCAL_CFLAGS := -mllvm -sub -mllvm -fla -mllvm -bcf 
include $(BUILD_EXECUTABLE) 

當我建立32位這樣的文件,androd-NDK使用我鐺(android-ndk-r10e/wang-llvm-3.6/prebuilt/linux-x86/bin) ,但對於64位,它使用aarch64-linux-android-gcc,任何人都可以幫助我?

回答

0

如果您想使用Obfuscator-LLVM,則必須將其集成到您的構建環境中,適用於32位或64位版本。 -mllvm -sub(指令替代),-mllvm -fla(控制流展平)和-mllvm -bcf(僞控制流注入)是特定於Obfuscator-LLVM的編譯標誌,因此它們不受aarch64-linux-android-gcc支持。

您有兩種解決方案可以解決您的問題:使用Obfuscator-LLVM構建aarch64目標,或者刪除違規標誌(並生成非混淆目標)。

相關問題