Skip to content

Commit 49265f4

Browse files
author
hornik
committed
Add _R_CHECK_COMPILED_CODE_USE_OBJECTS_SYMBOL_TABLES_ env var to allow experimenting with PR#18789.
git-svn-id: https://svn.r-project.org/R/trunk@87941 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent ea31dea commit 49265f4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/library/tools/R/sotools.R

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,16 @@ if(.Platform$OS.type == "windows") {
965965
if(!length(so_files)) return(invisible(NULL)) # typically a fake install
966966

967967
bad <- Filter(length, lapply(so_files, check_so_symbols))
968+
## Allow experimenting with finding bad symbols not in
969+
## symbols.rds, likely from following the "best approach" from
970+
## section "Compiling in sub-directories" of WRE and compiling
971+
## code in subdirs into static libraries instead of adding to
972+
## OBJECTS.
973+
## See PR#18789 <https://bugs.r-project.org/show_bug.cgi?id=18789>,
974+
## "R CMD check does not check symbol tables of linked static
975+
## libraries".
976+
if(config_val_to_logical(Sys.getenv("_R_CHECK_COMPILED_CODE_USE_OBJECTS_SYMBOL_TABLES_",
977+
"TRUE"))) {
968978
objects_symbol_tables_file <- if(nzchar(r_arch))
969979
file.path(dir, "libs", r_arch, "symbols.rds")
970980
else file.path(dir, "libs", "symbols.rds")
@@ -973,6 +983,7 @@ if(.Platform$OS.type == "windows") {
973983
bad <- Filter(length, lapply(bad, compare))
974984
} else if(useST)
975985
cat("Note: information on .o files is not available\n")
986+
}
976987
nAPIs <- lapply(lapply(so_files, check_so_symbols),
977988
function(x) if(length(z <- attr(x, "nonAPI")))
978989
structure(z,

0 commit comments

Comments
 (0)