Skip to content

Commit f55271d

Browse files
GenevieveOliver Fuerstdylanahsmithrogchap
authored
Remove Windows support (#234)
* Remove Windows binary support * Update CHANGELOG.md Co-authored-by: Oliver Fuerst <[email protected]> * Update CHANGELOG.md Co-authored-by: Dylan Thacker-Smith <[email protected]> * Update windows section * Update README.md Co-authored-by: Dylan Thacker-Smith <[email protected]> * Update README.md Co-authored-by: Dylan Thacker-Smith <[email protected]> * Remove windows fossa step * Remove deps/windows_x86_64 Co-authored-by: Oliver Fuerst <[email protected]> Co-authored-by: Dylan Thacker-Smith <[email protected]> Co-authored-by: Roger Chapman <[email protected]>
1 parent a8a4920 commit f55271d

13 files changed

+13
-2226
lines changed

.github/workflows/test.yml

+3-13
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
# We use macos-11 over macos-latest because macos-latest defaults to Catalina(10.15) and not Big Sur(11.0)
1717
# We can switch to macos-latest whenever Big Sur becomes the default
1818
# See https://github.com/actions/virtual-environments#available-environments
19-
platform: [ubuntu-latest, macos-11, windows-latest]
19+
platform: [ubuntu-latest, macos-11]
2020
runs-on: ${{ matrix.platform }}
2121

2222
steps:
@@ -26,10 +26,6 @@ jobs:
2626
go-version: ${{ matrix.go-version }}
2727
- name: Checkout
2828
uses: actions/checkout@v2
29-
- name: Add MINGW to PATH
30-
if: matrix.platform == 'windows-latest'
31-
run: echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH
32-
shell: bash
3329
- name: Go Test
3430
env:
3531
CGO_CXXFLAGS: "-Werror"
@@ -45,16 +41,10 @@ jobs:
4541
- name: Add GOPATH to GITHUB_ENV
4642
run: echo "GOPATH=$(go env GOPATH)" >>"$GITHUB_ENV"
4743
- name: Scan and upload FOSSA data (Linux/Mac)
48-
if: env.FOSSA_API_KEY != '' && github.ref == 'refs/heads/master' && matrix.platform != 'windows-latest'
44+
if: env.FOSSA_API_KEY != '' && github.ref == 'refs/heads/master'
4945
run: |
5046
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | sudo bash
5147
fossa analyze
5248
env:
5349
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
54-
- name: Scan and upload FOSSA data (Windows)
55-
if: env.FOSSA_API_KEY != '' && github.ref == 'refs/heads/master' && matrix.platform == 'windows-latest'
56-
run: |
57-
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/fossas/fossa-cli/master/install.ps1'))
58-
C:\ProgramData\fossa-cli\fossa.exe analyze
59-
env:
60-
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
50+

.github/workflows/v8build.yml

+1-13
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ jobs:
1414
#
1515
# We need xcode 12.4 or newer to cross compile between arm64/amd64
1616
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md#xcode
17-
platform: [ubuntu-18.04, macos-11, windows-latest]
17+
platform: [ubuntu-18.04, macos-11]
1818
arch: [x86_64, arm64]
1919
exclude:
2020
- platform: ubuntu-18.04
2121
arch: arm64
22-
- platform: windows-latest
23-
arch: arm64
2422
runs-on: ${{ matrix.platform }}
2523
steps:
2624
- name: Checkout
@@ -37,16 +35,6 @@ jobs:
3735
- name: Build V8 macOS
3836
if: matrix.platform == 'macos-11'
3937
run: cd deps && ./build.py --arch ${{ matrix.arch }}
40-
- name: Add MSYS2 to PATH
41-
if: matrix.platform == 'windows-latest'
42-
run: echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH
43-
shell: bash
44-
- name: Build V8 windows
45-
if: matrix.platform == 'windows-latest'
46-
run: cd deps; python build.py --no-clang --arch ${{ matrix.arch }}
47-
env:
48-
MSYSTEM: MINGW64
49-
DEPOT_TOOLS_WIN_TOOLCHAIN: 0
5038
- name: Create PR
5139
uses: peter-evans/create-pull-request@v3
5240
with:

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ to run a pre-compiled script in new contexts.
2828
- Removed error return value from Context.Isolate() which never fails
2929
- Removed error return value from NewObjectTemplate and NewFunctionTemplate. Panic if given a nil argument.
3030
- Function Call accepts receiver as first argument.
31+
- Removed Windows support until its build issues are addressed.
3132

3233
### Fixed
3334
- Add some missing error propagation

README.md

+8-9
Original file line numberDiff line numberDiff line change
@@ -192,21 +192,20 @@ please join the [**#v8go**](https://gophers.slack.com/channels/v8go) channel on
192192

193193
### Windows
194194

195-
In order to build a project using v8go on Windows, Go requires a gcc compiler to be installed.
195+
There used to be Windows binary support. For further information see, [PR #234](https://github.com/rogchap/v8go/pull/234).
196196

197-
To set this up:
198-
1. Install MSYS2 (https://www.msys2.org/)
199-
2. Add the Mingw-w64 bin to your PATH environment variable (`C:\msys64\mingw64\bin` by default)
200-
3. Open MSYS2 MSYS and execute `pacman -S mingw-w64-x86_64-toolchain`
201-
202-
V8 requires 64-bit on Windows, therefore it will not work on 32-bit systems.
197+
The v8go library would welcome contributions from anyone able to get an external windows
198+
build of the V8 library linking with v8go, using the version of V8 checked out in the
199+
`deps/v8` git submodule, and documentation of the process involved. This process will likely
200+
involve passing a linker flag when building v8go (e.g. using the `CGO_LDFLAGS` environment
201+
variable.
203202

204203
## V8 dependency
205204

206205
V8 version: **9.0.257.18** (April 2021)
207206

208207
In order to make `v8go` usable as a standard Go package, prebuilt static libraries of V8
209-
are included for Linux, macOS and Windows ie. you *should not* require to build V8 yourself.
208+
are included for Linux and macOS. you *should not* require to build V8 yourself.
210209

211210
Due to security concerns of binary blobs hiding malicious code, the V8 binary is built via CI *ONLY*.
212211

@@ -247,7 +246,7 @@ The next steps are:
247246
1) The build is not yet triggered automatically. To trigger it manually, go to the [V8
248247
Build](https://github.com/rogchap/v8go/actions?query=workflow%3A%22V8+Build%22) Github Action, Select "Run workflow",
249248
and select your pushed branch eg. `v8_upgrade/<v8-version>`.
250-
1) Once built, this should open 3 PRs against your branch to add the `libv8.a` for Linux, macOS and Windows; merge
249+
1) Once built, this should open 3 PRs against your branch to add the `libv8.a` for Linux (for x86_64) and macOS for x86_64 and arm64; merge
251250
these PRs into your branch. You are now ready to raise the PR against `master` with the latest version of V8.
252251

253252
### Flushing after C/C++ standard library printing for debugging

cgo.go

-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ package v8go
1111
// #cgo darwin,amd64 LDFLAGS: -L${SRCDIR}/deps/darwin_x86_64
1212
// #cgo darwin,arm64 LDFLAGS: -L${SRCDIR}/deps/darwin_arm64
1313
// #cgo linux LDFLAGS: -L${SRCDIR}/deps/linux_x86_64
14-
// #cgo windows LDFLAGS: -L${SRCDIR}/deps/windows_x86_64 -static -ldbghelp -lssp -lwinmm -lz
1514
import "C"
1615

1716
// These imports forces `go mod vendor` to pull in all the folders that
@@ -22,5 +21,4 @@ import (
2221
_ "rogchap.com/v8go/deps/darwin_x86_64"
2322
_ "rogchap.com/v8go/deps/include"
2423
_ "rogchap.com/v8go/deps/linux_x86_64"
25-
_ "rogchap.com/v8go/deps/windows_x86_64"
2624
)

deps/windows_x86_64/.gitattributes

-2
This file was deleted.

0 commit comments

Comments
 (0)