You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/01/14 16:10:53 UTC

[GitHub] [arrow] ianmcook commented on a change in pull request #9202: ARROW-11240: [Packaging][R] Add mimalloc to R packaging [WIP]

ianmcook commented on a change in pull request #9202:
URL: https://github.com/apache/arrow/pull/9202#discussion_r557511872



##########
File path: r/tools/linuxlibs.R
##########
@@ -412,6 +413,23 @@ with_s3_support <- function(env_vars) {
   paste(env_vars, ifelse(arrow_s3, "ARROW_S3=ON", "ARROW_S3=OFF"))
 }
 
+with_mimalloc <- function(env_vars) {
+  arrow_mimalloc <- toupper(Sys.getenv("ARROW_MIMALLOC")) == "ON" || tolower(Sys.getenv("LIBARROW_MINIMAL")) == "false"
+  if (arrow_mimalloc) {
+  # User wants mimalloc. Let's make sure they're not on gcc < 4.9
+    info <- system(paste("export", env_vars, "&& $CMAKE --system-information"), intern = TRUE)
+    info <- grep("^[A-Z_]* .*$", info, value = TRUE)
+    vals <- as.list(sub('^.*? "?(.*?)"?$', "\\1", info))
+    names(vals) <- sub("^(.*?) .*$", "\\1", info)

Review comment:
       This is copy-pasted from `with_s3_support()` above. Consider factoring out into a separate function




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org