Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify toolchain setup #134

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/puku.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: Build puku
run: ./pleasew build -p -v notice --profile release //package:release_files
run: ./pleasew build -p -v notice //package:release_files
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 0 additions & 2 deletions .plzconfig.release

This file was deleted.

6 changes: 2 additions & 4 deletions knownimports/BUILD
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
root = f"third_party/go/toolchain/pkg/{CONFIG.OS}_{CONFIG.ARCH}"

genrule(
name = "go_root_packages",
srcs = ["//third_party/go:toolchain"],
srcs = ["//third_party/go:std"],
outs = ["go_root_packages"],
cmd = f'find {root} -name "*.a" | sed -e s=^{root}/== | sed -e s="\.a\$"== > $OUT',
cmd = 'find $SRCS -name "*.a" | sed -re s=^third_party/go/std/pkg/[^/]+_[^/]+/== | sed -e s="\.a\$"== > $OUT',
)

go_library(
Expand Down
3 changes: 1 addition & 2 deletions knownimports/known_imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ func IsInGoRoot(i string) bool {
if strings.HasPrefix(i, "crypto/") {
return true
}
_, ok := goRootImports[i]
if ok {
if _, ok := goRootImports[i]; ok {
return true
}

Expand Down
20 changes: 7 additions & 13 deletions package/BUILD
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
subinclude("//:version")

filegroup(
name = "architectures",
srcs = ["architectures.build_defs"],
visibility = ["PUBLIC"],
)

subinclude(":architectures")

go_toolchain(
name = "release_toolchain",
architectures = architectures,
version = CONFIG.GO_VERSION,
)
architectures = [
"darwin_amd64",
"darwin_arm64",
"freebsd_amd64",
"linux_amd64",
"linux_arm64",
]

def cross_compile(version, arch):
return build_rule(
Expand Down
7 changes: 0 additions & 7 deletions package/architectures.build_defs

This file was deleted.

4 changes: 2 additions & 2 deletions third_party/go/BUILD
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
subinclude("///go//build_defs:go", "//package:architectures")
subinclude("///go//build_defs:go")

go_toolchain(
name = "toolchain",
architectures = architectures,
version = CONFIG.GO_VERSION,
install_std = False,
)

go_stdlib(
Expand Down
Loading