Skip to content
Snippets Groups Projects
Commit 10909673 authored by Zbyněk Šlajchrt's avatar Zbyněk Šlajchrt
Browse files

[GR-9247] FastR twin-build.

PullRequest: fastr/1460
parents db29c86e 410e9aaa
No related branches found
No related tags found
No related merge requests found
Showing
with 182 additions and 95 deletions
......@@ -156,7 +156,7 @@ public class TruffleLLVM_DLL implements DLLRFFI {
public static LLVMArchive getZipLLVMIR(String path) {
List<String> nativeLibs = Collections.emptyList();
try (ZipInputStream zis = new ZipInputStream(new BufferedInputStream(new FileInputStream(path)))) {
try (ZipInputStream zis = new ZipInputStream(new BufferedInputStream(new FileInputStream(path + "l")))) {
ArrayList<LLVM_IR> irList = new ArrayList<>();
while (true) {
ZipEntry entry = zis.getNextEntry();
......
......@@ -56,6 +56,8 @@ final class TruffleLLVM_Lapack {
callTarget = openLLVMLibraries();
} else {
callTarget = openNativeLibraries();
// libR must be loaded first to put the rpath mechanism in work. It's OS X specific.
callTarget.call(LibPaths.getBuiltinLibPath("R_dummy"), false, false);
callTarget.call(LibPaths.getBuiltinLibPath("gcc_s"), false, true);
callTarget.call(LibPaths.getBuiltinLibPath("quadmath"), false, true);
callTarget.call(LibPaths.getBuiltinLibPath("gfortran"), false, true);
......
......@@ -36,7 +36,9 @@ endif
C_LIBNAME := libR$(DYLIB_EXT)
C_LIB := $(FASTR_LIB_DIR)/$(C_LIBNAME)
R_LIBNAME := libR$(DYLIB_EXT)
R_LIBNAME_DUMMY := libR_dummy$(DYLIB_EXT)
R_LIB := $(FASTR_LIB_DIR)/$(R_LIBNAME)
R_LIB_DUMMY := $(FASTR_LIB_DIR)/$(R_LIBNAME_DUMMY)
ifeq ($(OS_NAME), Darwin)
VERSION_FLAGS := -current_version $(R_VERSION) -compatibility_version $(R_VERSION)
......@@ -56,16 +58,22 @@ ifeq ($(FASTR_RFFI),managed)
# nop
else
ifeq ($(OS_NAME),Darwin)
$(DYLIB_LD) $(DYLIB_LDFLAGS) -Wl,-rpath,@loader_path/ -o $(R_LIB) $(wildcard lib/*.o) -L$(FASTR_LIB_DIR) -ldl -lRblas -lRlapack -lpcre -lz $(VERSION_FLAGS)
ifneq ($(FASTR_RFFI),llvm)
FASTR_RFFI="nfi-only" $(DYLIB_LD) $(DYLIB_LDFLAGS) -Wl,-rpath,@loader_path/ -o $(R_LIB) $(wildcard lib/*.o) -L$(FASTR_LIB_DIR) -ldl -lRblas -lRlapack -lpcre -lz $(VERSION_FLAGS)
ifeq ($(FASTR_RFFI),llvm)
FASTR_RFFI="nfi-only" $(DYLIB_LD) $(DYLIB_LDFLAGS) -Wl,-rpath,@loader_path/ -o $(R_LIB_DUMMY) -L$(FASTR_LIB_DIR) -ldl -lRblas -lRlapack -lpcre -lz $(VERSION_FLAGS)
FASTR_RFFI="llvm-only" $(DYLIB_LD) $(DYLIB_LDFLAGS) -Wl,-rpath,@loader_path/ -o $(R_LIB) $(wildcard lib/*.bc) -L$(FASTR_LIB_DIR) -ldl -lRblas -lRlapack -lpcre -lz $(VERSION_FLAGS)
endif
install_name_tool -change libRblas.dylib @rpath/libRblas.dylib $(R_LIB)
install_name_tool -change libRlapack.dylib @rpath/libRlapack.dylib $(R_LIB)
install_name_tool -id @rpath/libR.dylib $(R_LIB)
# check if we captured libpcre/libz, rpath those in libR
mx rupdatelib $(FASTR_LIB_DIR)
endif
else
$(DYLIB_LD) $(DYLIB_LDFLAGS) $(shell echo $(PKG_LDFLAGS_OVERRIDE)) -Wl,-rpath,'$$ORIGIN' -o $(R_LIB) $(wildcard lib/*.o) -L$(FASTR_LIB_DIR) -lRblas -lRlapack -ldl -lpcre -lz
FASTR_RFFI="nfi-only" $(DYLIB_LD) $(DYLIB_LDFLAGS) $(shell echo $(PKG_LDFLAGS_OVERRIDE)) -Wl,-rpath,'$$ORIGIN' -o $(R_LIB) $(wildcard lib/*.o) -L$(FASTR_LIB_DIR) -lRblas -lRlapack -ldl -lpcre -lz
ifeq ($(FASTR_RFFI),llvm)
FASTR_RFFI="nfi-only" $(DYLIB_LD) $(DYLIB_LDFLAGS) $(shell echo $(PKG_LDFLAGS_OVERRIDE)) -Wl,-rpath,'$$ORIGIN' -o $(R_LIB_DUMMY) -L$(FASTR_LIB_DIR) -lRblas -lRlapack -ldl -lpcre -lz
FASTR_RFFI="llvm-only" $(DYLIB_LD) $(DYLIB_LDFLAGS) $(shell echo $(PKG_LDFLAGS_OVERRIDE)) -Wl,-rpath,'$$ORIGIN' -o $(R_LIB) $(wildcard lib/*.bc) -L$(FASTR_LIB_DIR) -lRblas -lRlapack -ldl -lpcre -lz
endif
endif
endif # managed
......@@ -82,7 +90,8 @@ else
ifeq ($(FASTR_RFFI),llvm)
export R_PACKAGE_DIR="lib"
fficall.done: common.done
$(MAKE) -C src/truffle_llvm all
$(MAKE) FASTR_RFFI="nfi-only" -C src/truffle_nfi all
$(MAKE) FASTR_RFFI="llvm-only" -C src/truffle_llvm all
touch fficall.done
else
$(error unknown value for FASTR_RFFI)
......@@ -91,6 +100,7 @@ endif #nfi
endif #managed
common.done:
echo "src/common FASTR_RFFI: $(FASTR_RFFI)"
$(MAKE) -C src/common all
touch common.done
......@@ -100,6 +110,7 @@ ifeq ($(FASTR_RFFI),nfi)
$(MAKE) -C src/truffle_nfi clean
else
ifeq ($(FASTR_RFFI),llvm)
$(MAKE) -C src/truffle_nfi clean
$(MAKE) -C src/truffle_llvm clean
else
ifneq ($(FASTR_RFFI),managed)
......@@ -108,5 +119,7 @@ endif
endif
endif
rm -rf $(R_LIB)
rm -rf $(R_LIB_DUMMY)
rm -rf "$(R_LIB)l"
rm -rf fficall.done
rm -rf common.done
#
# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -35,11 +35,7 @@ OBJ = ../../lib
GNUR_APPL_C_FILES = pretty.c interv.c
GNUR_APPL_SRC = $(GNUR_HOME)/src/appl
ifneq ($(FASTR_RFFI),llvm)
GNUR_APPL_F_FILES := $(notdir $(wildcard $(GNUR_APPL_SRC)/d*.f))
else
GNUR_APPL_F_FILES :=
endif
GNUR_MAIN_C_FILES = colors.c devices.c engine.c format.c graphics.c plot.c plot3d.c plotmath.c rlocale.c sort.c
GNUR_MAIN_SRC = $(GNUR_HOME)/src/main
......
......@@ -33,33 +33,18 @@ endif
include ../include/gnurheaders.mk
# location of compiled code (.o files)
# location of compiled code (.bc files)
OBJ = ../../lib
GNUR_APPL_C_FILES = pretty.c interv.c
GNUR_APPL_SRC = $(GNUR_HOME)/src/appl
GNUR_APPL_F_FILES := $(wildcard $(GNUR_APPL_SRC)/d*.f)
GNUR_MAIN_C_FILES = colors.c devices.c engine.c format.c graphics.c plot.c plot3d.c plotmath.c rlocale.c sort.c
GNUR_MAIN_SRC = $(GNUR_HOME)/src/main
GNUR_C_OBJECTS := $(addprefix $(OBJ)/, $(GNUR_APPL_C_FILES:.c=.o) $(GNUR_MAIN_C_FILES:.c=.o))
GNUR_F_OBJECTS := $(addprefix $(OBJ)/, $(notdir $(GNUR_APPL_F_FILES:.f=.o)))
C_HDRS := $(wildcard *.h)
LOCAL_C_SOURCES := $(wildcard *.c)
COMMON_C_SOURCES := $(wildcard ../common/*.c)
TRUFFLE_COMMON_C_SOURCES := $(wildcard ../truffle_common/*.c)
TRUFFLE_COMMON_H_SOURCES := $(wildcard ../truffle_common/*.h)
C_SOURCES := $(LOCAL_C_SOURCES) $(COMMON_C_SOURCES) $(TRUFFLE_COMMON_C_SOURCES)
#$(info C_SOURCES=$(C_SOURCES))
LOCAL_C_OBJECTS := $(addprefix $(OBJ)/, $(LOCAL_C_SOURCES:.c=.o))
COMMON_C_OBJECTS := $(addprefix $(OBJ)/, $(notdir $(COMMON_C_SOURCES:.c=.o)))
TRUFFLE_COMMON_C_OBJECTS := $(addprefix $(OBJ)/, $(notdir $(TRUFFLE_COMMON_C_SOURCES:.c=.o)))
C_OBJECTS := $(LOCAL_C_OBJECTS) $(COMMON_C_OBJECTS) $(TRUFFLE_COMMON_C_OBJECTS)
#$(info C_OBJECTS=$(C_OBJECTS))
C_SOURCES := $(LOCAL_C_SOURCES) $(TRUFFLE_COMMON_C_SOURCES)
LOCAL_C_OBJECTS := $(addprefix $(OBJ)/, $(LOCAL_C_SOURCES:.c=.bc))
TRUFFLE_COMMON_C_OBJECTS := $(addprefix $(OBJ)/, $(notdir $(TRUFFLE_COMMON_C_SOURCES:.c=.bc)))
C_OBJECTS := $(LOCAL_C_OBJECTS) $(TRUFFLE_COMMON_C_OBJECTS)
SULONG_DIR = $(abspath $(FASTR_R_HOME)/../sulong)
......@@ -74,34 +59,18 @@ FFLAGS :=
# uncomment to see exactly where headers are being read from
#CFLAGS := $(CFLAGS) -H
all: Makefile $(C_OBJECTS) $(GNUR_C_OBJECTS) $(GNUR_F_OBJECTS)
all: Makefile $(C_OBJECTS)
$(C_OBJECTS): | $(OBJ)
$(GNUR_C_OBJECTS): | $(OBJ)
$(GNUR_F_OBJECTS): | $(OBJ)
$(OBJ):
mkdir -p $(OBJ)
$(OBJ)/%.o: $(GNUR_APPL_SRC)/%.c
$(OBJ)/%.bc: %.c $(FASTR_NATIVE_DIR)/include/Rinternals.h rffiutils.h $(TRUFFLE_COMMON_H_SOURCES) ../common/rffi_upcallsindex.h
$(CC) $(CFLAGS) $(INCLUDES) $(GNUR_HEADER_DEFS) $(SUPPRESS_WARNINGS) -c $< -o $@
$(OBJ)/%.o: $(GNUR_MAIN_SRC)/%.c
$(CC) $(CFLAGS) $(INCLUDES) $(GNUR_HEADER_DEFS) $(SUPPRESS_WARNINGS) -c $< -o $@
$(OBJ)/%.o: %.c $(FASTR_NATIVE_DIR)/include/Rinternals.h rffiutils.h $(TRUFFLE_COMMON_H_SOURCES) ../common/rffi_upcallsindex.h
$(CC) $(CFLAGS) $(INCLUDES) $(GNUR_HEADER_DEFS) $(SUPPRESS_WARNINGS) -c $< -o $@
$(OBJ)/%.o: ../common/%.c $(FASTR_NATIVE_DIR)/include/Rinternals.h
$(CC) $(CFLAGS) $(INCLUDES) $(GNUR_HEADER_DEFS) $(SUPPRESS_WARNINGS) -c $< -o $@
$(OBJ)/%.o: ../truffle_common/%.c
$(OBJ)/%.bc: ../truffle_common/%.c
$(CC) $(CFLAGS) $(INCLUDES) $(SUPPRESS_WARNINGS) -c $< -o $@
$(OBJ)/%.o: $(GNUR_APPL_SRC)/%.f
$(F77) $(FFLAGS) $(FPICFLAGS) -c $< -o $@
clean:
rm -rf $(OBJ)
......@@ -36,11 +36,9 @@ LOCAL_C_SOURCES = $(wildcard *.c)
TRUFFLE_COMMON_C_SOURCES := $(wildcard ../truffle_common/*.c)
TRUFFLE_COMMON_H_SOURCES := $(wildcard ../truffle_common/*.h)
C_SOURCES := $(LOCAL_C_SOURCES) $(TRUFFLE_COMMON_C_SOURCES)
#$(info C_SOURCES=$(C_SOURCES))
TRUFFLE_COMMON_C_OBJECTS := $(addprefix $(OBJ)/, $(notdir $(TRUFFLE_COMMON_C_SOURCES:.c=.o)))
LOCAL_C_OBJECTS := $(patsubst %.c,$(OBJ)/%.o,$(LOCAL_C_SOURCES))
C_OBJECTS := $(LOCAL_C_OBJECTS) $(TRUFFLE_COMMON_C_OBJECTS)
#$(info C_OBJECTS=$(C_OBJECTS))
FFI_INCLUDES = -I$(TOPDIR)/include -I$(TOPDIR)/include/R_ext
#NFI_INCLUDES is set in environment (by mx)
......
#
# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -104,7 +104,10 @@ $(LIB_PKG): $(C_OBJECTS) $(F_OBJECTS) $(PKGDIR) $(XTRA_C_OBJECTS)
mkdir -p $(LIBDIR)
$(DYLIB_LD) $(DYLIB_LDFLAGS) -o $(LIB_PKG) $(C_OBJECTS) $(F_OBJECTS) $(XTRA_C_OBJECTS) $(PKG_LIBS)
mkdir -p $(FASTR_LIBRARY_DIR)/$(PKG)/libs
cp $(LIB_PKG) $(FASTR_LIBRARY_DIR)/$(PKG)/libs
cp "$(LIB_PKG)" $(FASTR_LIBRARY_DIR)/$(PKG)/libs
ifeq ($(FASTR_RFFI),llvm)
cp "$(LIB_PKG)l" $(FASTR_LIBRARY_DIR)/$(PKG)/libs
endif
ifeq ($(OS_NAME),Darwin)
ifneq ($(FASTR_RFFI),llvm)
install_name_tool -id @rpath/../library/$(PKG)/libs/$(PKG).so $(FASTR_LIBRARY_DIR)/$(PKG)/libs/$(PKG).so
......
......@@ -22,9 +22,23 @@
# questions.
#
if [[ "$FASTR_RFFI" != 'llvm-only' ]]; then
ar "$@"
fi
if [[ "$FASTR_RFFI" == 'nfi-only' ]]; then
exit 0
fi
SOURCE="$0"
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
. $DIR/llvm-helper
create_bc_archive $@
errorOccurred || {
try
(
create_bc_archive $@
) || catch || {
recordError
}
}
\ No newline at end of file
......@@ -22,10 +22,22 @@
# questions.
#
if [[ "$FASTR_RFFI" != 'llvm-only' ]]; then
g++ "$@"
fi
if [[ "$FASTR_RFFI" == 'nfi-only' ]]; then
exit 0
fi
SOURCE="$0"
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
. $DIR/llvm-helper
errorOccurred || {
try
(
fortran=0
analyze_args "$@"
......@@ -56,10 +68,16 @@ else
if [[ $ecode -ne 0 ]]; then
exit $ecode
fi
fake_obj
ecode=$?
if [[ $ecode -ne 0 ]]; then
exit $ecode
fi
#fake_obj
#ecode=$?
#if [[ $ecode -ne 0 ]]; then
# exit $ecode
#fi
fi
fi
) || catch || {
recordError
}
}
......@@ -22,10 +22,22 @@
# questions.
#
if [[ "$FASTR_RFFI" != 'llvm-only' ]]; then
gcc "$@"
fi
if [[ "$FASTR_RFFI" == 'nfi-only' ]]; then
exit 0
fi
SOURCE="$0"
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
. $DIR/llvm-helper
errorOccurred || {
try
(
fortran=0
analyze_args "$@"
......@@ -52,10 +64,15 @@ else
if [[ $ecode -ne 0 ]]; then
exit $ecode
fi
fake_obj
ecode=$?
if [[ $ecode -ne 0 ]]; then
exit $ecode
fi
#fake_obj
#ecode=$?
#if [[ $ecode -ne 0 ]]; then
# exit $ecode
#fi
fi
fi
) || catch || {
recordError
}
}
......@@ -22,10 +22,26 @@
# questions.
#
echo "ARGS: $@"
echo "llvm-fc FASTR_RFFI $FASTR_RFFI"
if [[ "$FASTR_RFFI" != 'llvm-only' ]]; then
gfortran "$@"
fi
if [[ "$FASTR_RFFI" == 'nfi-only' ]]; then
exit 0
fi
SOURCE="$0"
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
. $DIR/llvm-helper
errorOccurred || {
try
(
fortran=1
analyze_args "$@"
......@@ -53,7 +69,6 @@ function ll_to_bc() {
llvm_ir_bc_file=${d}/${f%%.*}.bc
}
runit $FASTR_LLVM_GFORTRAN -fplugin=$FASTR_LLVM_DRAGONEGG -fplugin-arg-dragonegg-emit-ir $llvm_args
ll_to_bc
runit $FASTR_LLVM_GFORTRAN_LLVM_AS $llvm_ir_file -o $llvm_ir_bc_file
......@@ -62,5 +77,10 @@ llvm_ir_file=$llvm_ir_bc_file
# the llvm_ir_file is empty if the result is sent to stdout
if [ -n "$llvm_ir_file" ]; then
mem2reg_opt
fake_obj
#fake_obj
fi
) || catch || {
recordError
}
}
......@@ -77,14 +77,14 @@ function analyze_args() {
f=`basename $p`
d=`dirname $p`
ext=${f##*.}
if [ $ext == 'so' ] || [ $ext == 'dylib' ]
if [ $ext == 'so' ] || [ $ext == 'dylib' ] || [ $ext == 'sol' ] || [ $ext == 'dylibl' ]
then
is_link=1
elif [ $ext == 'o' ]
then
llvm_ir_file=${d}/${f%%.*}
llvm_ir_file="${llvm_ir_file}${llvm_file_ext}"
llvm_ir_file_opt="-o ${llvm_ir_file}"
elif [ $ext == 'o' ] || [ $ext == 'bc' ]
then
llvm_ir_file=${d}/${f%%.*}
llvm_ir_file="${llvm_ir_file}${llvm_file_ext}"
llvm_ir_file_opt="-o ${llvm_ir_file}"
else
out_file_opt="-o $p"
fi
......@@ -147,12 +147,6 @@ function mem2reg_opt() {
fi
}
function fake_obj() {
f=`basename $llvm_ir_file`
d=`dirname $llvm_ir_file`
runit touch ${d}/${f%%.*}.o
}
# Input: all the arguments to the original command line
function create_bc_lib() {
bcfiles=""
......@@ -165,17 +159,17 @@ function create_bc_lib() {
case $1 in
-o)
shift
lib=$1
lib="$1l"
;;
-l*)
linkedLib=`echo $1 | cut -c 3-`
statLibFound='0'
if [ -f "$statlibs" ]; then
statLibFound=`cat "$statlibs" | grep "lib${linkedLib}.a" | wc -l`
statLibFound=`cat "$statlibs" | grep "lib${linkedLib}.al" | wc -l`
fi
if [ $statLibFound == '0' ]
then
echo $linkedLib >> $linkedLibs
echo $linkedLib >> $linkedLibs
fi
;;
-*)
......@@ -183,12 +177,12 @@ function create_bc_lib() {
;;
*)
f=$(basename $1)
ext=${f##*.}
if [ $ext == 'o' ]
then
fn="$(dirname $1)/${f%%.*}.bc"
bcfiles+="$fn "
fi
ext=${f##*.}
if [ $ext == 'o' ] || [ $ext == 'bc' ]
then
fn="$(dirname $1)/${f%%.*}.bc"
bcfiles+="$fn "
fi
;;
esac
shift
......@@ -204,6 +198,9 @@ function create_bc_lib() {
runit $llvm_tool_bin $bcfiles -o $lib.bc
runit zip -r $lib $lib.bc $linkedLibs
rm $lib.bc
if [ -d "$R_PACKAGE_DIR/libs" ]; then
cp $lib "$R_PACKAGE_DIR/libs"
fi
}
# It appends objects constituting a static library to the list of extra object files.
......@@ -220,7 +217,7 @@ function create_bc_archive() {
# symbols objects (see below) to get the final list of objects to be linked with
# the package dynamic library in the end.
shift
archname=$1
archname="$1l"
arargs="rcs $archname "
shift
......@@ -265,3 +262,39 @@ function create_bc_archive() {
# Record the archive (static library) name to distinguish between LLVM static libs and native libs when linking (via -l)
echo $archname >> "$R_PACKAGE_DIR/statlibs"
}
# A simple try-catch mimicking apparatus
function try()
{
[[ $- = *e* ]]; SAVED_OPT_E=$?
set -e
}
function throw()
{
exit $1
}
function catch()
{
export ex_code=$?
(( $SAVED_OPT_E )) && set +e
return $ex_code
}
function recordError()
{
echo "***************************************************************"
echo "The LLVM build failed. Only the native libraries will be built."
echo "***************************************************************"
errorFlagFile="$R_PACKAGE_DIR/errorFlag"
touch $errorFlagFile
}
function errorOccurred()
{
errorFlagFile="$R_PACKAGE_DIR/errorFlag"
[[ -f $errorFlagFile ]]
}
......@@ -512,7 +512,7 @@ public class DLL {
public static final String R_INIT_PREFIX = "R_init_";
public static class LoadPackageDLLNode extends Node {
public static final class LoadPackageDLLNode extends Node {
@Child private InvokeVoidCallNode invokeVoidCallNode;
@Child private DLLRFFI.DLSymNode dlSymNode = RFFIFactory.getDLLRFFI().createDLSymNode();
@Child private DLLRFFI.DLOpenNode dlOpenNode = RFFIFactory.getDLLRFFI().createDLOpenNode();
......
......@@ -60,7 +60,7 @@ public abstract class RFFIContext extends RFFI {
/**
* The GC in GNUR is cooperative, which means that unless native code calls back to the R engine
* (GNUR/FastR) it may assume (and unfortunately people do that) that GC will not run and will
* (GNUR/FastR) one may assume (and unfortunately people do that) that GC will not run and will
* not collect anything that may be not reachable anymore, including the result of the last
* up-call and including the objects popped off the PROTECT/UNPROTECT stack! Moreover, some
* R-API functions are known to be not calling GC, therefore people may (and do) count on them
......@@ -68,8 +68,7 @@ public abstract class RFFIContext extends RFFI {
* variants and for macros like {@code INTEGER}. This behavior is required e.g. for
* {@code C_parseRd}. We keep a list of all the objects that may not be reachable anymore, but
* must not be collected, because no garbage collecting R-API function has been called since
* they became unreachable. This method clears this list so that Java GC can collect the
* objects.
* they became unreachable.
*/
public final void registerReferenceUsedInNative(Object obj) {
protectedNativeReferences.add(obj);
......@@ -91,6 +90,11 @@ public abstract class RFFIContext extends RFFI {
// empty by default
}
/**
* @param canRunGc Causes that the list of additionally protected objects is cleared so that
* Java GC can collect the objects. See
* {@link RFFIContext#registerReferenceUsedInNative(Object)}.
*/
public void afterUpcall(boolean canRunGc) {
if (canRunGc) {
cooperativeGc();
......
......@@ -165,7 +165,7 @@ def updatelib(args):
def get_captured_libs():
cap_libs = []
for lib in os.listdir(fastr_libdir):
if not '.dylib' in lib:
if not ('.dylib' in lib) or '.dylibl' in lib:
# ignore non-libraries
continue
if locally_built(lib) or os.path.islink(os.path.join(fastr_libdir, lib)):
......@@ -177,7 +177,7 @@ def updatelib(args):
cap_libs = get_captured_libs()
libs = []
for lib in os.listdir(libdir):
if not ('.dylib' in lib or '.so' in lib):
if (not ('.dylib' in lib or '.so' in lib)) or '.dylibl' in lib or '.sol' in lib:
# ignore non-libraries
continue
if not os.path.islink(os.path.join(libdir, lib)):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment