From 1bbf3e9346ac7bd082d65613a3180caf31251c38 Mon Sep 17 00:00:00 2001 From: Alexander Martinz Date: Sat, 5 Nov 2016 15:27:43 +0100 Subject: [PATCH] envsetup: block SDCLANG on Darwin for now Snapdragon LLVM is not supported on Darwin yet. There might be the case where the directory structure is set up by default and the build system will try to execute the linux binaries. This will fail obviously: /bin/bash: /Volumes/Android/build/prebuilts/snapdragon-llvm/toolchains/llvm-Snapdragon_LLVM_for_Android_3.8/prebuilt/linux-x86_64/bin/clang: cannot execute binary file Change-Id: I1f4d0bbda88b540b7ac3159f8e83de4501b9073b Signed-off-by: Alexander Martinz --- build/envsetup.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/build/envsetup.sh b/build/envsetup.sh index 3cc10e7a..74d8f4d2 100644 --- a/build/envsetup.sh +++ b/build/envsetup.sh @@ -937,7 +937,14 @@ function fixup_common_out_dir() { # Enable SD-LLVM if available if [ -d $(gettop)/prebuilts/snapdragon-llvm/toolchains ]; then - export SDCLANG=true - export SDCLANG_PATH=$(gettop)/prebuilts/snapdragon-llvm/toolchains/llvm-Snapdragon_LLVM_for_Android_3.8/prebuilt/linux-x86_64/bin - export SDCLANG_LTO_DEFS=$(gettop)/device/qcom/common/sdllvm-lto-defs.mk + case `uname -s` in + Darwin) + # Darwin is not supported yet + ;; + *) + export SDCLANG=true + export SDCLANG_PATH=$(gettop)/prebuilts/snapdragon-llvm/toolchains/llvm-Snapdragon_LLVM_for_Android_3.8/prebuilt/linux-x86_64/bin + export SDCLANG_LTO_DEFS=$(gettop)/device/qcom/common/sdllvm-lto-defs.mk + ;; + esac fi