From a17f1f0bb0db1d159b4dfd9226ba01adebf96ef8 Mon Sep 17 00:00:00 2001 From: luoliwoshang <2643523683@qq.com> Date: Tue, 9 Sep 2025 16:08:40 +0800 Subject: [PATCH] set origin test avoid transform --- .github/workflows/release-build.yml | 3 ++- .goreleaser.yaml | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 811310d2..bb8a4423 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -206,7 +206,8 @@ jobs: mod-version: ${{ matrix.go-mod-version }} release: - needs: [setup, test-artifacts] + needs: + [setup, test-artifacts, populate-darwin-sysroot, populate-linux-sysroot] runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/') steps: diff --git a/.goreleaser.yaml b/.goreleaser.yaml index fc8a949f..bbd0104c 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -55,11 +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' 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 -Wl,-rpath,$ORIGIN/../crosscompile/clang/lib + - CGO_LDFLAGS=--sysroot={{.Env.SYSROOT_LINUX_AMD64}} -L{{.Env.SYSROOT_LINUX_AMD64}}/crosscompile/clang/lib -lLLVM-19 - CGO_LDFLAGS_ALLOW=--sysroot.* targets: - linux_amd64 @@ -72,11 +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' 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 -Wl,-rpath,$ORIGIN/../crosscompile/clang/lib + - CGO_LDFLAGS=--sysroot={{.Env.SYSROOT_LINUX_ARM64}} -L{{.Env.SYSROOT_LINUX_ARM64}}/crosscompile/clang/lib -lLLVM-19 - CGO_LDFLAGS_ALLOW=--sysroot.* targets: - linux_arm64