Skip to content

Commit d91e0e3

Browse files
author
qinwf
committed
support R 3.3.0 Windows new toolchain
R 3.3.0 Windows uses a new toolchain based on gcc 4.9.3 and mingw-w64 v3.
1 parent 682c0d4 commit d91e0e3

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

R/Attributes.R

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -705,9 +705,11 @@ sourceCppFunction <- function(func, isVoid, dll, symbol) {
705705

706706
# Check version
707707
ver <- key$`Current Version`
708-
if (ver %in% (c("2.15", "2.16", "3.0", "3.1", "3.2", "3.3"))) {
708+
if (ver %in% (c("2.15", "2.16", "3.0", "3.1", "3.2", "3.3", "3.4"))) {
709709
# See if the InstallPath leads to the expected directories
710-
isGcc49 <- FALSE
710+
# R version 3.3.0 alpha (2016-03-25 r70378)
711+
isGcc49 <- ver %in% c("3.3", "3.4") && as.numeric(R.Version()$`svn rev`) >= 70378
712+
711713
rToolsPath <- key$`InstallPath`
712714
if (!is.null(rToolsPath)) {
713715
# add appropriate path entries
@@ -721,8 +723,10 @@ sourceCppFunction <- function(func, isVoid, dll, symbol) {
721723
env <- list()
722724
path <- paste(path, collapse = .Platform$path.sep)
723725
env$PATH <- paste(path, Sys.getenv("PATH"), sep=.Platform$path.sep)
724-
if (isGcc49)
725-
env$RTOOLS <- .rtoolsPath(rToolsPath)
726+
if (isGcc49) {
727+
env$RTOOLS <- .rtoolsPath(rToolsPath)
728+
env$BINPREF <- file.path(env$RTOOLS, "mingw_$(WIN)/bin//", fsep = "/")
729+
}
726730
return(env)
727731
}
728732
}

0 commit comments

Comments
 (0)