Skip to content

Commit

Permalink
Windows: update to libv8 11.8.172.13
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Oct 9, 2023
1 parent 81d346a commit bf0837f
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@ jobs:
- uses: r-lib/actions/check-r-package@v2
env:
_R_CALLS_INVALID_NUMERIC_VERSION_: true
with:
upload-snapshots: true
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: V8
Type: Package
Title: Embedded JavaScript and WebAssembly Engine for R
Version: 4.3.4
Version: 4.4.0
Authors@R: c(
person("Jeroen", "Ooms", role = c("aut", "cre"), email = "[email protected]",
comment = c(ORCID = "0000-0002-4035-0289")),
Expand Down
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
4.4.0
- Windows (R-4.3 and up): update libv8 to 11.8.172.13 + arm64 support.

4.3.4
- MacOS: update libv8 to 11.5
- Windows (R-4.3 and up): update libv8 to 11.8
Expand Down
11 changes: 9 additions & 2 deletions src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
CXX_STD = CXX17
RWINLIB =../windows/mingw$(WIN)
PKG_CPPFLAGS = -I$(RWINLIB)/include $(subst $(WIN),,-DV8_COMPRESS_POINTERS64)
RWINLIB = ../windows/libv8

# old multilib bundles
ifeq ($(R_COMPILED_BY),gcc 8.3.0)
RWINLIB = ../windows/libv8$(R_ARCH)
endif

# Enables pointer compression except for on 32-bit (legacy)
PKG_CPPFLAGS = -I$(RWINLIB)/include -DV8_COMPRESS_POINTERS$(subst 64,,$(WIN))
PKG_LIBS = \
-L$(RWINLIB)/lib \
-lv8_monolith \
Expand Down
32 changes: 16 additions & 16 deletions tools/winlibs.R
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Download a suitable libv8 build
if(grepl('Windows Server 2008', osVersion)){
stop("Windows Vista/2008 is no longer supported")
}
if(!file.exists('../windows/ucrt64/include/v8.h')){
cdn <- if(getRversion() >= "4.3.0"){
'https://github.com/jeroen/V8/releases/download/v3.6.0/v8-11.8.7-ucrt.tar.xz'
if(!file.exists('../windows/libv8/include/v8.h')){
unlink("../windows", recursive = TRUE)
url <- if(grepl("aarch", R.version$platform)){
"https://github.com/r-windows/bundles/releases/download/v8-11.8.172.13/v8-11.8.172.13-clang-aarch64.tar.xz"
} else if(grepl("clang", Sys.getenv('R_COMPILED_BY'))){
"https://github.com/r-windows/bundles/releases/download/v8-11.8.172.13/v8-11.8.172.13-clang-x86_64.tar.xz"
} else if(getRversion() >= "4.3") {
"https://github.com/r-windows/bundles/releases/download/v8-11.8.172.13/v8-11.8.172.13-ucrt-x86_64.tar.xz"
} else if(getRversion() >= "4.2") {
"https://github.com/r-windows/bundles/releases/download/v8-11.8.172.13/v8-9.1.269.38-win-ucrt.tar.xz"
} else {
ifelse(isTRUE(grepl('ucrt', R.version$crt)),
'https://github.com/jeroen/V8/releases/download/v3.6.0/v8-9.1.269.38-win-ucrt.pkg.tar.xz',
'https://github.com/jeroen/V8/releases/download/v3.6.0/v8-9.1.269.38-win-msvcrt.tar.xz')
"https://github.com/r-windows/bundles/releases/download/v8-11.8.172.13/v8-9.1.269.38-win-msvcrt.tar.xz"
}
download.file(cdn, "libv8.tar.xz", quiet = TRUE)
download.file(url, basename(url), quiet = TRUE)
dir.create("../windows", showWarnings = FALSE)
untar('libv8.tar.xz', exdir = "../windows", tar = 'internal')
unlink('libv8.tar.xz')
if(isTRUE(grepl('ucrt', R.version$crt))){
file.rename("../windows/ucrt64", "../windows/mingw64")
}
untar(basename(url), exdir = "../windows", tar = 'internal')
unlink(basename(url))
setwd("../windows")
file.rename(list.files(), 'libv8')
}

0 comments on commit bf0837f

Please sign in to comment.