diff --git a/src/install.libs.R b/src/install.libs.R index e4fcec88..37c33c02 100644 --- a/src/install.libs.R +++ b/src/install.libs.R @@ -236,6 +236,10 @@ useBundledTbb <- function() { full.names = TRUE ) + # clear any artifacts from prior builds, so that we only ship + # the libraries produced by the build above + unlink("tbb/build/lib_release", recursive = TRUE) + dir.create("tbb/build/lib_release", recursive = TRUE, showWarnings = FALSE) file.copy(tbbFiles, "tbb/build/lib_release", overwrite = TRUE) unlink("tbb/build-tbb", recursive = TRUE) diff --git a/tools/config/cleanup.R b/tools/config/cleanup.R index 7746f1bc..1141a790 100644 --- a/tools/config/cleanup.R +++ b/tools/config/cleanup.R @@ -2,8 +2,11 @@ # Clean up files generated during configuration here. # Use 'remove_file()' to remove files generated during configuration. -# unlink("src/tbb/build", recursive = TRUE) -# unlink("src/tbb/build-tbb", recursive = TRUE) +# NOTE: stale artifacts in src/tbb/build can otherwise be swept into the +# installed package; the bundled TBB is rebuilt from scratch on each +# install, so nothing is lost by removing these +unlink("src/tbb/build", recursive = TRUE) +unlink("src/tbb/build-tbb", recursive = TRUE) unlink("inst/lib", recursive = TRUE) unlink("inst/libs", recursive = TRUE) unlink("inst/include/index.html", recursive = TRUE)