Skip to content

Commit

Permalink
Switch to hack-pad Go fork
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnStarich committed Jul 30, 2021
1 parent b541931 commit ee12cfa
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 252 deletions.
19 changes: 2 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,9 @@ cache/go${GO_VERSION}: cache
git clone \
--depth 1 \
--single-branch \
--branch go${GO_VERSION} \
https://github.com/golang/go.git \
--branch hackpad-go${GO_VERSION} \
https://github.com/hack-pad/go.git \
"$$TMP"; \
$(MAKE) -e TMP_GO="$$TMP" go-ext; \
pushd "$$TMP/src"; \
./make.bash; \
export PATH="$$TMP/bin:$$PATH"; \
Expand All @@ -100,20 +99,6 @@ server/public/wasm/main.wasm: server/public/wasm go
server/public/wasm/wasm_exec.js: go
cp cache/go/misc/wasm/wasm_exec.js server/public/wasm/wasm_exec.js

.PHONY: go-ext
go-ext:
[[ -d "${TMP_GO}" ]]
sed -i'' -e '/^func Pipe(/,/^}/d' "${TMP_GO}"/src/syscall/fs_js.go
sed -i'' -e '/^func StartProcess(/,/^}/d' "${TMP_GO}"/src/syscall/syscall_js.go
sed -i'' -e '/^func Wait4(/,/^}/d' "${TMP_GO}"/src/syscall/syscall_js.go
sed -i'' -e '/^func (w WaitStatus) ExitStatus() int/d' "${TMP_GO}"/src/syscall/syscall_js.go
sed -i'' -e '/^func (w WaitStatus) Exited() bool/d' "${TMP_GO}"/src/syscall/syscall_js.go
cp internal/testdata/fs_* "${TMP_GO}"/src/syscall/
cp internal/testdata/syscall_* "${TMP_GO}"/src/syscall/
cp internal/testdata/filelock_* "${TMP_GO}"/src/cmd/go/internal/lockedfile/internal/filelock/
sed -i'' -e 's/+build\( [^j].*\)*$$/+build\1 js,wasm/' "${TMP_GO}"/src/os/exec/lp_unix.go
rm "${TMP_GO}"/src/os/exec/lp_js.go

.PHONY: watch
watch:
@if [[ ! -d server/node_modules ]]; then \
Expand Down
44 changes: 0 additions & 44 deletions internal/testdata/filelock_js.go

This file was deleted.

36 changes: 0 additions & 36 deletions internal/testdata/filelock_other.go

This file was deleted.

21 changes: 0 additions & 21 deletions internal/testdata/fs_js_ext.go

This file was deleted.

134 changes: 0 additions & 134 deletions internal/testdata/syscall_js_ext.go

This file was deleted.

0 comments on commit ee12cfa

Please sign in to comment.