我正在尝试为 msm8996 (Android 8.0.0) 构建 msm-3.18 内核。尝试从 Android 源代码顶部目录构建时,它在运行测试时失败。
以下是跟踪
FAILED: out/soong/.bootstrap/soong-cc-config/test/test.passed
out/soong/.bootstrap/bin/gotestrunner -p ./build/soong/cc/config -f out/soong/.bootstrap/soong-cc-config/test/test.passed -- out/soong/.bootstrap/soong-cc-config/test/test -test.short
panic: read /home/vagrant/android-msm: is a directory
goroutine 1 [running]:
android/soong/cc/config.setSdclangVars()
/home/vagrant/android-msm/build/soong/cc/config/global.go:197 +0x20d4
android/soong/cc/config.init.2()
/home/vagrant/android-msm/build/soong/cc/config/global.go:169 +0xcc9
android/soong/cc/config.init()
/home/vagrant/android-msm/build/soong/cc/config/tidy_test.go:42 +0x3969
main.init()
/home/vagrant/android-msm/out/soong/.bootstrap/soong-cc-
config/test/test.go:34 +0x4e
ninja: build stopped: subcommand failed.
15:22:17 soong bootstrap failed with: exit status 1
make: *** [run_soong_ui] Error 1
make: Leaving directory `/home/vagrant/android-msm'
我想这与$SDCLANG_PATH有关,但我需要帮助
您需要在高通开发者网络上注册并下载其专有编译器。
根据他们论坛上的说明:
-
在此处下载Qualcomm LLVM编译器:https://developer.qualcomm.com/download/sdllvm/snapdragon-llvm-compiler-android-linux64.tar.gz
-
提取骁龙-llvm-3.8.4-工具链.tar.gz
-
将工具链\llvm-Snapdragon_LLVM_for_Android_3.8\prebuilt\linux-x86_64移动到 Android 构建环境中的 prebuilts/clang/host/linux-x86/sdclang-3.8
。 将以下行添加到设备的板配置中:
ifneq ($(HOST_OS),darwin) SDCLANG := true SDCLANG_PATH := prebuilts/clang/host/linux-x86/sdclang-3.8/bin SDCLANG_LTO_DEFS := device/qcom/common/sdllvm-lto-defs.mk endif
编译安卓。
以下是他们论坛的说明:https://developer.qualcomm.com/forum/qdn-forums/software/snapdragon-llvm-compiler-android/33437