summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2025-01-21 20:00:06 -0800
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2025-01-21 20:00:06 -0800
commit7f55ca22280ce0632fbd6f3b2751567d295c1e01 (patch)
tree15542b9554e46f35c3ba2ae90710fcf2f0fc8503 /scripts
parent9073d354c06569ead27a62f14867726b683102a0 (diff)
parenta808b319e2de91f01bc33037fd674d1573c27506 (diff)
Merge "Make go test -race more hermetic" into main am: 27c6c1f15a am: a808b319e2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3460660 Change-Id: Ie3c8a8273b2c72c84e1d9007d5cf070a59c77c9b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/run-soong-tests-with-go-tools.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/run-soong-tests-with-go-tools.sh b/scripts/run-soong-tests-with-go-tools.sh
index 1fbb1fc77..82efaa0eb 100755
--- a/scripts/run-soong-tests-with-go-tools.sh
+++ b/scripts/run-soong-tests-with-go-tools.sh
@@ -38,6 +38,11 @@ if [[ ${OS} = linux ]]; then
CLANG_VERSION=$(build/soong/scripts/get_clang_version.py)
export CC="${TOP}/prebuilts/clang/host/${OS}-x86/${CLANG_VERSION}/bin/clang"
export CXX="${TOP}/prebuilts/clang/host/${OS}-x86/${CLANG_VERSION}/bin/clang++"
+ glibc_dir="${TOP}/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8"
+ export CGO_CFLAGS="--sysroot ${glibc_dir}/sysroot/"
+ export CGO_CPPFLAGS="--sysroot ${glibc_dir}/sysroot/"
+ export CGO_CXXFLAGS="--sysroot ${glibc_dir}/sysroot/"
+ export CGO_LDFLAGS="--sysroot ${glibc_dir}/sysroot/ -B ${glibc_dir}/lib/gcc/x86_64-linux/4.8.3 -L ${glibc_dir}/lib/gcc/x86_64-linux/4.8.3 -L ${glibc_dir}/x86_64-linux/lib64"
fi
# androidmk_test.go gets confused if ANDROID_BUILD_TOP is set.