From 76f4ec641c8aff0681006699a5923ab6ca86864d Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Tue, 24 Sep 2024 20:26:04 -0700 Subject: [PATCH] Try using Zig instead (#831) --- .github/workflows/build-helper.yml | 6 +++--- .github/workflows/codeql.yml | 6 +++--- Taskfile.yml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-helper.yml b/.github/workflows/build-helper.yml index de7240a3b..59fb372ba 100644 --- a/.github/workflows/build-helper.yml +++ b/.github/workflows/build-helper.yml @@ -39,10 +39,10 @@ jobs: sudo apt-get update sudo apt-get install --no-install-recommends -y libarchive-tools libopenjp2-tools rpm squashfs-tools - # We use musl-gcc instead of glibc for cgo compilation as it is more-easily statically linked - - name: Setup musl-gcc (Linux only) + # We use Zig instead of glibc for cgo compilation as it is more-easily statically linked + - name: Setup Zig (Linux only) if: matrix.platform == 'linux' - uses: ./.github/actions/setup-musl-gcc + run: sudo snap install zig --classic --beta # The pre-installed version of the AWS CLI has a segfault problem so we'll install it via Homebrew instead. - name: Upgrade AWS CLI (Mac only) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 77f778d32..d7ce0e3a4 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -71,10 +71,10 @@ jobs: go-version: stable cache-dependency-path: | go.sum - # We use musl-gcc instead of glibc for cgo compilation as it is more-easily statically linked - - name: Setup musl-gcc (Go only) + # We use Zig instead of glibc for cgo compilation as it is more-easily statically linked + - name: Setup Zig (Go only) if: matrix.language == 'go' - uses: ./.github/actions/setup-musl-gcc + run: sudo snap install zig --classic --beta # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/Taskfile.yml b/Taskfile.yml index bdfe32f59..9106b4149 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -95,7 +95,7 @@ tasks: ARCHS: sh: echo {{if eq "arm" ARCH}}arm64{{else}}{{ARCH}}{{end}} GO_LDFLAGS: -linkmode 'external' -extldflags=-static - GO_ENV_VARS: CC=/usr/local/musl/bin/musl-gcc + GO_ENV_VARS: CC="zig cc" build:server:internal: requires: