|
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 |
@@ -62,7 +63,15 @@ sourceCpp <- function(file = "", |
62 | 63 | if (grepl(' ', basename(file), fixed=TRUE)) { |
63 | 64 | stop("The filename '", basename(file), "' contains spaces. This ", |
64 | 65 | "is not permitted.") |
65 | | - } # #nocov end |
| 66 | + } |
| 67 | + } else { |
| 68 | + if (windowsDebugDLL) { |
| 69 | + if (verbose) { |
| 70 | + message("The 'windowsDebugDLL' toggle is ignored on ", |
| 71 | + "non-Windows platforms.") |
| 72 | + } |
| 73 | + windowsDebugDLL <- FALSE # now we do not need to deal with OS choice below |
| 74 | + } # #nocov end |
66 | 75 | } |
67 | 76 |
|
68 | 77 | # get the context (does code generation as necessary) |
@@ -121,6 +130,7 @@ sourceCpp <- function(file = "", |
121 | 130 | # prepare the command (output if we are in showOutput mode) |
122 | 131 | cmd <- paste(R.home(component="bin"), .Platform$file.sep, "R ", |
123 | 132 | "CMD SHLIB ", |
| 133 | + ifelse(windowsDebugDLL, "-d ", ""), |
124 | 134 | "-o ", shQuote(context$dynlibFilename), " ", |
125 | 135 | ifelse(rebuild, "--preclean ", ""), |
126 | 136 | ifelse(dryRun, "--dry-run ", ""), |
|
0 commit comments