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 d1d2246
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 18 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
10 changes: 8 additions & 2 deletions src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
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/mingw$(WIN)
endif

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(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"
} 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/jeroen/V8/releases/download/v3.6.0/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 d1d2246

Please sign in to comment.