Merge "Don't set CC and CXX when running go build on mac" into main

This commit is contained in:
Treehugger Robot
2024-01-19 22:20:04 +00:00
committed by Gerrit Code Review

View File

@@ -32,11 +32,13 @@ export TMPDIR=${abs_out_dir}/gotemp
mkdir -p ${TMPDIR} mkdir -p ${TMPDIR}
${GOROOT}/bin/go env ${GOROOT}/bin/go env
# Building with the race detector enabled uses the host linker, set the if [[ ${OS} = linux ]]; then
# path to use the hermetic one. # Building with the race detector enabled uses the host linker, set the
CLANG_VERSION=$(build/soong/scripts/get_clang_version.py) # path to use the hermetic one.
export CC="${TOP}/prebuilts/clang/host/${OS}-x86/${CLANG_VERSION}/bin/clang" CLANG_VERSION=$(build/soong/scripts/get_clang_version.py)
export CXX="${TOP}/prebuilts/clang/host/${OS}-x86/${CLANG_VERSION}/bin/clang++" export CC="${TOP}/prebuilts/clang/host/${OS}-x86/${CLANG_VERSION}/bin/clang"
export CXX="${TOP}/prebuilts/clang/host/${OS}-x86/${CLANG_VERSION}/bin/clang++"
fi
# androidmk_test.go gets confused if ANDROID_BUILD_TOP is set. # androidmk_test.go gets confused if ANDROID_BUILD_TOP is set.
unset ANDROID_BUILD_TOP unset ANDROID_BUILD_TOP