JavaEar 专注于收集分享传播有价值的技术资料

在setSdclangVars()上的soong-cc-config测试中构建Android msm-3.18内核失败 (Building Android msm-3.18 kernel fails on soong-cc-config test on setSdclangVars())

I am trying to build msm-3.18 kernel for msm8996 (Android 8.0.0). When trying to build from Android source top directory, it fails on running tests.

Following is the trace

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'

I guess it has something to do with $SDCLANG_PATH but I need help

1个回答

    最佳答案

  1. 英文原文

    You need to register on Qualcomm Developer Network and download their proprietary compiler.

    According to instruction on their forum:

    1. Download the Qualcomm LLVM Compiler here: https://developer.qualcomm.com/download/sdllvm/snapdragon-llvm-compiler-android-linux64.tar.gz

    2. Extract Snapdragon-llvm-3.8.4-toolchain.tar.gz

    3. Move toolchains\llvm-Snapdragon_LLVM_for_Android_3.8\prebuilt\linux-x86_64 to prebuilts/clang/linux-x86/host/sdclang-3.8 within your Android build environment.

    4. Add the following lines to your device's BoardConfig:

      ifneq ($(HOST_OS),darwin)
      SDCLANG := true
      SDCLANG_PATH := prebuilts/clang/linux-x86/host/sdclang-3.8/bin
      SDCLANG_LTO_DEFS := device/qcom/common/sdllvm-lto-defs.mk
      endif
      
    5. Compile Android.

    Here is instruction from their forum: https://developer.qualcomm.com/forum/qdn-forums/software/snapdragon-llvm-compiler-android/33437


    中文翻译

    您需要在Qualcomm Developer Network上注册并下载其专有编译器。

    根据论坛上的说明:

    1. 在此处下载Qualcomm LLVM编译器: https://developer.qualcomm.com/download/sdllvm/snapdragon-llvm-compiler-android-linux64.tar.gz

    2. 提取Snapdragon-llvm-3.8.4-toolchain.tar.gz

    3. 在Android构建环境中将工具链\ llvm-Snapdragon_LLVM_for_Android_3.8 \ prebuilt \ linux-x86_64移至prebuilts / clang / linux-x86 / host / sdclang-3.8。

    4. 将以下行添加到设备的BoardConfig:

        ifneq($(HOST_OS),darwin)
      SDCLANG:=真
      SDCLANG_PATH:= prebuilts / clang / linux-x86 / host / sdclang-3.8 / bin
      SDCLANG_LTO_DEFS:= device / qcom / common / sdllvm-lto-defs.mk
      万一
       
    5. 编译Android。

    以下是他们论坛的说明: https://developer.qualcomm.com/forum/qdn-forums/software/snapdragon-llvm-compiler-android/33437

    You need to register on Qualcomm Developer Network and download their proprietary compiler.

    According to instruction on their forum:

    1. Download the Qualcomm LLVM Compiler here: https://developer.qualcomm.com/download/sdllvm/snapdragon-llvm-compiler-android-linux64.tar.gz

    2. Extract Snapdragon-llvm-3.8.4-toolchain.tar.gz

    3. Move toolchains\llvm-Snapdragon_LLVM_for_Android_3.8\prebuilt\linux-x86_64 to prebuilts/clang/linux-x86/host/sdclang-3.8 within your Android build environment.

    4. Add the following lines to your device's BoardConfig:

      ifneq ($(HOST_OS),darwin)
      SDCLANG := true
      SDCLANG_PATH := prebuilts/clang/linux-x86/host/sdclang-3.8/bin
      SDCLANG_LTO_DEFS := device/qcom/common/sdllvm-lto-defs.mk
      endif
      
    5. Compile Android.

    Here is instruction from their forum: https://developer.qualcomm.com/forum/qdn-forums/software/snapdragon-llvm-compiler-android/33437

    您需要在Qualcomm Developer Network上注册并下载其专有编译器。

    根据论坛上的说明:

    1. 在此处下载Qualcomm LLVM编译器: https://developer.qualcomm.com/download/sdllvm/snapdragon-llvm-compiler-android-linux64.tar.gz

    2. 提取Snapdragon-llvm-3.8.4-toolchain.tar.gz

    3. 在Android构建环境中将工具链\ llvm-Snapdragon_LLVM_for_Android_3.8 \ prebuilt \ linux-x86_64移至prebuilts / clang / linux-x86 / host / sdclang-3.8。

    4. 将以下行添加到设备的BoardConfig:

        ifneq($(HOST_OS),darwin)
      SDCLANG:=真
      SDCLANG_PATH:= prebuilts / clang / linux-x86 / host / sdclang-3.8 / bin
      SDCLANG_LTO_DEFS:= device / qcom / common / sdllvm-lto-defs.mk
      万一
       
    5. 编译Android。

    以下是他们论坛的说明: https://developer.qualcomm.com/forum/qdn-forums/software/snapdragon-llvm-compiler-android/33437