|
1 | 1 |
|
2 | | -# Copyright (C) 2012 - 2018 JJ Allaire, Dirk Eddelbuettel and Romain Francois |
| 2 | +# Copyright (C) 2012 - 2019 JJ Allaire, Dirk Eddelbuettel and Romain Francois |
3 | 3 | # |
4 | 4 | # This file is part of Rcpp. |
5 | 5 | # |
@@ -27,7 +27,8 @@ sourceCpp <- function(file = "", |
27 | 27 | cleanupCacheDir = FALSE, |
28 | 28 | showOutput = verbose, |
29 | 29 | verbose = getOption("verbose"), |
30 | | - dryRun = FALSE) { |
| 30 | + dryRun = FALSE, |
| 31 | + windowsDebugDLL = FALSE) { |
31 | 32 |
|
32 | 33 | # use an architecture/version specific subdirectory of the cacheDir |
33 | 34 | # (since cached dynlibs can now perist across sessions we need to be |
@@ -63,6 +64,11 @@ sourceCpp <- function(file = "", |
63 | 64 | stop("The filename '", basename(file), "' contains spaces. This ", |
64 | 65 | "is not permitted.") |
65 | 66 | } # #nocov end |
| 67 | + } else { |
| 68 | + if (verbose && windowsDebugDLL) { |
| 69 | + message("The 'windowsDebugDLL' toggle is ignored on non-Windows platforms.") |
| 70 | + windowsDebugDLL <- FALSE # no we do not need to for OS below |
| 71 | + } |
66 | 72 | } |
67 | 73 |
|
68 | 74 | # get the context (does code generation as necessary) |
@@ -121,6 +127,7 @@ sourceCpp <- function(file = "", |
121 | 127 | # prepare the command (output if we are in showOutput mode) |
122 | 128 | cmd <- paste(R.home(component="bin"), .Platform$file.sep, "R ", |
123 | 129 | "CMD SHLIB ", |
| 130 | + ifelse(windowsDebugDLL, "-d ", ""), |
124 | 131 | "-o ", shQuote(context$dynlibFilename), " ", |
125 | 132 | ifelse(rebuild, "--preclean ", ""), |
126 | 133 | ifelse(dryRun, "--dry-run ", ""), |
|
0 commit comments