Skip to content

Commit

Permalink
Temporarily use fastbuild for OS X workerd release builds
Browse files Browse the repository at this point in the history
The root cause of bus errors from workerd opt builds are being
investigated. In the interim, use fastbuild instead.

The impact of this workaround is that the uncompressed macOS arm64
binary goes from 61MB to 155MB. The compressed binary increases from
21MB to 35MB.

Bug: cloudflare/workers-sdk#2386
Bug: CUSTESC-29094
  • Loading branch information
ohodson committed Jun 14, 2023
1 parent 6535767 commit d0ac3f3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions build-releases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ TAG_NAME=$(curl -sL https://api.github.com/repos/cloudflare/workerd/releases/lat
git checkout $TAG_NAME

# Build macOS binary
pnpm exec bazelisk build --disk_cache=./.bazel-cache -c opt //src/workerd/server:workerd

cp bazel-bin/src/workerd/server/workerd ./workerd-darwin-arm64
#
# This is using fastbuild rather than opt until SIGBUS issue with the opt binary are resolved.
# The issue is tracked in https://github.com/cloudflare/workers-sdk/issues/2386.
pnpm exec bazelisk build -c fastbuild //src/workerd/server:workerd
echo Stripping binary
strip bazel-bin/src/workerd/server/workerd -o ./workerd-darwin-arm64

docker buildx build --platform linux/arm64 -f Dockerfile.release -t workerd:$TAG_NAME --target=artifact --output type=local,dest=$(pwd) .

Expand Down

0 comments on commit d0ac3f3

Please sign in to comment.