From 7180f203667620623e4404fc4c9182d678aa851c Mon Sep 17 00:00:00 2001 From: luoliwoshang <2643523683@qq.com> Date: Thu, 25 Sep 2025 15:24:21 +0800 Subject: [PATCH] ci:build-essential --- .github/workflows/populate_linux_sysroot.sh | 1 + .goreleaser.yaml | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/populate_linux_sysroot.sh b/.github/workflows/populate_linux_sysroot.sh index 52212862..85a1c873 100755 --- a/.github/workflows/populate_linux_sysroot.sh +++ b/.github/workflows/populate_linux_sysroot.sh @@ -18,6 +18,7 @@ export DEBIAN_FRONTEND=noninteractive apt-get update apt-get install -y lsb-release gnupg2 wget rsync +apt-get install -y build-essential echo "deb http://apt.llvm.org/\$(lsb_release -cs)/ llvm-toolchain-\$(lsb_release -cs)-19 main" | tee /etc/apt/sources.list.d/llvm.list wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - diff --git a/.goreleaser.yaml b/.goreleaser.yaml index bbd0104c..79a2f801 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -55,12 +55,12 @@ builds: ldflags: - -X github.com/goplus/llgo/internal/env.buildVersion=v{{.Version}} - -X github.com/goplus/llgo/internal/env.buildTime={{.Date}} - - '-extldflags=-Wl,-rpath,$ORIGIN/../crosscompile/clang/lib' + - "-extldflags=-Wl,-rpath,$ORIGIN/../crosscompile/clang/lib" env: - CC=x86_64-linux-gnu-gcc - CXX=x86_64-linux-gnu-g++ - - CGO_CPPFLAGS=--sysroot={{.Env.SYSROOT_LINUX_AMD64}} -I{{.Env.SYSROOT_LINUX_AMD64}}/crosscompile/clang/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS - - CGO_LDFLAGS=--sysroot={{.Env.SYSROOT_LINUX_AMD64}} -L{{.Env.SYSROOT_LINUX_AMD64}}/crosscompile/clang/lib -lLLVM-19 + - CGO_CPPFLAGS=-I{{.Env.SYSROOT_LINUX_AMD64}}/crosscompile/clang/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS + - CGO_LDFLAGS=-L{{.Env.SYSROOT_LINUX_AMD64}}/crosscompile/clang/lib -lLLVM-19 - CGO_LDFLAGS_ALLOW=--sysroot.* targets: - linux_amd64 @@ -73,12 +73,12 @@ builds: ldflags: - -X github.com/goplus/llgo/internal/env.buildVersion=v{{.Version}} - -X github.com/goplus/llgo/internal/env.buildTime={{.Date}} - - '-extldflags=-Wl,-rpath,$ORIGIN/../crosscompile/clang/lib' + - "-extldflags=-Wl,-rpath,$ORIGIN/../crosscompile/clang/lib" env: - CC=aarch64-linux-gnu-gcc - CXX=aarch64-linux-gnu-g++ - - CGO_CPPFLAGS=--sysroot={{.Env.SYSROOT_LINUX_ARM64}} -I{{.Env.SYSROOT_LINUX_ARM64}}/crosscompile/clang/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS - - CGO_LDFLAGS=--sysroot={{.Env.SYSROOT_LINUX_ARM64}} -L{{.Env.SYSROOT_LINUX_ARM64}}/crosscompile/clang/lib -lLLVM-19 + - CGO_CPPFLAGS=-I{{.Env.SYSROOT_LINUX_ARM64}}/crosscompile/clang/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS + - CGO_LDFLAGS=-L{{.Env.SYSROOT_LINUX_ARM64}}/crosscompile/clang/lib -lLLVM-19 - CGO_LDFLAGS_ALLOW=--sysroot.* targets: - linux_arm64