Skip to content

Commit

Permalink
arch fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey committed Oct 2, 2024
1 parent 6757221 commit e449f99
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 3 additions & 1 deletion R/zzz-libs.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ renv_zzz_libs_impl <- function() {
if (is.na(rcmd))
return(FALSE)

libdir <- file.path(dir, "libs")
arch <- .Platform$r_arch
libdir <- paste(c(dir, "libs", if (nzchar(arch)) arch), collapse = "/")
dir.create(libdir, recursive = TRUE, showWarnings = FALSE)

srcfiles <- list.files("tools/ext", pattern = "\\.c$", full.names = TRUE)
file.copy(srcfiles, libdir)

Expand Down
7 changes: 2 additions & 5 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@
# if we were build with a shared library, use it
arch <- .Platform$r_arch
name <- paste0("renv", .Platform$dynlib.ext)
sofile <- paste(
c(libname, pkgname, "libs", if (nzchar(arch)) arch, name),
collapse = "/"
)

parts <- c(libname, pkgname, "libs", if (nzchar(arch)) arch, name)
sofile <- paste(parts, collapse = "/")
if (file.exists(sofile)) {
info <- library.dynam("renv", pkgname, libname)
the$dll_info <- info
Expand Down

0 comments on commit e449f99

Please sign in to comment.