-
Notifications
You must be signed in to change notification settings - Fork 26
/
.goreleaser.yaml
145 lines (131 loc) · 5.22 KB
/
.goreleaser.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
version: 2
dist: .dist
env:
- SYSROOT_DARWIN_AMD64={{.Env.PWD}}/.sysroot/darwin/amd64
- SYSROOT_DARWIN_ARM64={{.Env.PWD}}/.sysroot/darwin/arm64
- SYSROOT_LINUX_AMD64={{.Env.PWD}}/.sysroot/linux/amd64
- SYSROOT_LINUX_ARM64={{.Env.PWD}}/.sysroot/linux/arm64
- CGO_ENABLED=1
- CGO_CXXFLAGS=-std=c++17
before:
hooks:
- go mod download
builds:
- id: llgo-darwin-amd64
main: ./cmd/llgo
flags:
- -tags=darwin,amd64,byollvm
ldflags:
- -X github.com/goplus/llgo/x/env.buildVersion=v{{.Version}}
- -X github.com/goplus/llgo/x/env.buildTime={{.Date}}
- -X github.com/goplus/llgo/xtool/env/llvm.ldLLVMConfigBin=/usr/local/opt/llvm@18/bin/llvm-config
env:
- CC=o64-clang
- CXX=o64-clang++
- CGO_CPPFLAGS=-I{{.Env.SYSROOT_DARWIN_AMD64}}/usr/local/opt/llvm@18/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
- CGO_LDFLAGS=-L{{.Env.SYSROOT_DARWIN_AMD64}}/usr/local/opt/llvm@18/lib -Wl,-search_paths_first -Wl,-headerpad_max_install_names -lLLVM-18 -lz -lm
targets:
- darwin_amd64
mod_timestamp: "{{.CommitTimestamp}}"
- id: llgo-darwin-arm64
main: ./cmd/llgo
flags:
- -tags=darwin,arm64,byollvm
ldflags:
- -X github.com/goplus/llgo/x/env.buildVersion=v{{.Version}}
- -X github.com/goplus/llgo/x/env.buildTime={{.Date}}
- -X github.com/goplus/llgo/xtool/env/llvm.ldLLVMConfigBin=/opt/homebrew/opt/llvm@18/bin/llvm-config
env:
- CC=oa64-clang
- CXX=oa64-clang++
- CGO_CPPFLAGS=-I{{.Env.SYSROOT_DARWIN_ARM64}}/opt/homebrew/opt/llvm@18/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
- CGO_LDFLAGS=-L{{.Env.SYSROOT_DARWIN_ARM64}}/opt/homebrew/opt/llvm@18/lib -Wl,-search_paths_first -Wl,-headerpad_max_install_names -lLLVM-18 -lz -lm
targets:
- darwin_arm64
mod_timestamp: "{{.CommitTimestamp}}"
- id: llgo-linux-amd64
main: ./cmd/llgo
flags:
- -tags=linux,amd64,byollvm
ldflags:
- -X github.com/goplus/llgo/x/env.buildVersion=v{{.Version}}
- -X github.com/goplus/llgo/x/env.buildTime={{.Date}}
- -X github.com/goplus/llgo/xtool/env/llvm.ldLLVMConfigBin=/usr/lib/llvm-18/bin/llvm-config
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}}/usr/include/llvm-18 -I{{.Env.SYSROOT_LINUX_AMD64}}/usr/include/llvm-c-18 -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}}/usr/lib/llvm-18/lib -lLLVM-18
targets:
- linux_amd64
mod_timestamp: "{{.CommitTimestamp}}"
- id: llgo-linux-arm64
main: ./cmd/llgo
flags:
- -tags=linux,arm64,byollvm
ldflags:
- -X github.com/goplus/llgo/x/env.buildVersion=v{{.Version}}
- -X github.com/goplus/llgo/x/env.buildTime={{.Date}}
- -X github.com/goplus/llgo/xtool/env/llvm.ldLLVMConfigBin=/usr/lib/llvm-18/bin/llvm-config
env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
- CGO_CPPFLAGS=--sysroot={{.Env.SYSROOT_LINUX_ARM64}} -I{{.Env.SYSROOT_LINUX_ARM64}}/usr/include/llvm-18 -I{{.Env.SYSROOT_LINUX_ARM64}}/usr/include/llvm-c-18 -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}}/usr/lib/llvm-18/lib -lLLVM-18
targets:
- linux_arm64
mod_timestamp: "{{.CommitTimestamp}}"
archives:
- format: tar.gz
name_template: >-
{{.ProjectName}}{{.Version}}.{{.Os}}-{{.Arch}}
{{- if .Arm}}v{{.Arm}}{{end}}
files:
- LICENSE
- README.md
checksum:
name_template: "{{.ProjectName}}{{.Version}}.checksums.txt"
nfpms:
- package_name: llgo
vendor: goplus
homepage: https://github.com/goplus/llgo
maintainer: Aofei Sheng <[email protected]>
description: |
LLGo is a Go compiler based on LLVM in order to better integrate Go with the C ecosystem including Python. It's a
subproject of the Go+ project.
LLGo aims to expand the boundaries of Go/Go+, providing limitless possibilities such as:
- Game development
- AI and data science
- WebAssembly
- Embedded development
- ...
license: Apache-2.0
formats:
- deb
- rpm
file_name_template: >-
{{.ProjectName}}{{.Version}}.{{.Os}}-{{.Arch}}
{{- if .Arm}}v{{.Arm}}{{end}}
bindir: /usr/local/bin
snapcrafts:
- name: llgo
title: A Go compiler based on LLVM
summary: A Go compiler based on LLVM
description: |
LLGo is a Go compiler based on LLVM in order to better integrate Go with the C ecosystem including Python. It's a
subproject of the Go+ project.
LLGo aims to expand the boundaries of Go/Go+, providing limitless possibilities such as:
- Game development
- AI and data science
- WebAssembly
- Embedded development
- ...
license: Apache-2.0
confinement: classic
name_template: >-
{{.ProjectName}}{{.Version}}.{{.Os}}-{{.Arch}}
{{- if .Arm}}v{{.Arm}}{{end}}
snapshot:
name_template: '{{trimprefix .Summary "v"}}'
release:
prerelease: auto