summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stapelberg <stapelberg@debian.org>2013-06-06 21:54:49 +0200
committerMichael Stapelberg <michael@stapelberg.de>2013-06-06 21:54:49 +0200
commit5775df42605ddf6c984570597bd36764d3c45841 (patch)
tree01f8992c24b82379f7d8db771eae35adf0208670
parent815f2971ca6128b418b32da6b26fe07b29366ab1 (diff)
downloadgolang-5775df42605ddf6c984570597bd36764d3c45841.tar.gz
race detector: install the std lib with race detector enabled
-rwxr-xr-xdebian/rules7
1 files changed, 7 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
index 5f4897269..13b18a6c8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -60,6 +60,13 @@ debian/build.stamp:
rm -f debian/build.stamp
mkdir -p $(GOBIN)
+cd src && bash ./make.bash --no-banner
+ # For the race detector to work (go test -race), we need to install the
+ # std library with the race detector enabled. This will result in
+ # having an additional “architecture” directory, e.g. linux_amd64_race.
+ #
+ # The race detector currently only works on linux/amd64. The following
+ # check works precisely the same way src/race.bash does.
+ -[ "$(shell uname -m)" = "x86_64" ] && [ "$(shell uname)" = "Linux" ] && $(CURDIR)/bin/go install -race std
>debian/build.stamp
opt_no_act =