Skip to content

Commit

Permalink
Windows/LLVM support for sotools.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@84972 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
kalibera committed Aug 17, 2023
1 parent ab1e9cb commit 8fd5a97
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/gnuwin32/fixed/Makeconf
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ MKINSTALLDIRS = mkdir -p
INSTALL_DATA = cp
SHELL = sh
USE_NLS = yes
USE_LLVM = @USE_LLVM@

R_EXE = R_ENABLE_JIT=0 $(top_builddir)/@BINDIR@/Rterm.exe --vanilla --no-echo
4 changes: 3 additions & 1 deletion src/gnuwin32/fixed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ else
-e "s|LTO_OPT =|LTO_OPT = $(LTO_OPT)|" \
etc/Makeconf > $(R_HOME)/etc$(R_ARCH)/Makeconf
endif
$(SED) -e "s+@BINDIR@+$(BINDIR)+" Makeconf > $(R_HOME)/Makeconf
$(SED) -e "s+@BINDIR@+$(BINDIR)+" \
-e "s+@USE_LLVM@+$(USE_LLVM)+" \
Makeconf > $(R_HOME)/Makeconf
@$(ECHO) done > fixetc

fixdoc: $(wildcard ../CHANGES?)
Expand Down
6 changes: 5 additions & 1 deletion src/library/tools/Makefile.win
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ pkg = tools

RSRC = `LC_COLLATE=C ls $(srcdir)/R/*.R`

R_SYSTEM_ABI = "windows,gcc,g++,gfortran,gfortran"
ifdef USE_LLVM
R_SYSTEM_ABI = "windows,clang,clang++,flang,flang"
else
R_SYSTEM_ABI = "windows,gcc,g++,gfortran,gfortran"
endif

## We first use mkdesc2 (with date) to install the DESCRIPTION, then re-install
all:
Expand Down
65 changes: 64 additions & 1 deletion src/library/tools/R/sotools.R
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,70 @@ so_symbol_names_table <-
"windows, C, gcc, srand48, srand48",
"windows, Fortran, gfortran, stop, exit",
## next will not show up with static libgfortran
"windows, Fortran, gfortran, rand, _gfortran_rand"
"windows, Fortran, gfortran, rand, _gfortran_rand",

## currently copy from Linux
## flang-new but executable already named 'flang'
"windows, Fortran, flang, stop, _FortranAStopStatement",
"windows, Fortran, flang, stop, _FortranAStopStatementText",
"windows, Fortran, flang, open, _FortranAioBeginOpenUnit",
"windows, Fortran, flang, close, _FortranAioBeginClose",
"windows, Fortran, flang, rewind, _FortranAioBeginRewind",
"windows, Fortran, flang, read, _FortranAioInputAscii",
"windows, Fortran, flang, read, _FortranAioInputCharacter",
"windows, Fortran, flang, read, _FortranAioInputComplex32",
"windows, Fortran, flang, read, _FortranAioInputComplex64",
"windows, Fortran, flang, read, _FortranAioOutputExternalListInput",
"windows, Fortran, flang, read, _FortranAioInputInteger",
"windows, Fortran, flang, read, _FortranAioInputLogical",
"windows, Fortran, flang, read, _FortranAioInputNamelist",
"windows, Fortran, flang, read, _FortranAioInputReal32",
"windows, Fortran, flang, read, _FortranAioInputReal64",
"windows, Fortran, flang, read, _FortranAioInputUnformattedBlock",
"windows, Fortran, flang, print, _FortranAioOutputAscii",
"windows, Fortran, flang, print, _FortranAioOutputCharacter",
"windows, Fortran, flang, print, _FortranAioOutputComplex32",
"windows, Fortran, flang, print, _FortranAioOutputComplex64",
"windows, Fortran, flang, print, _FortranAioOutputExternalListOutput",
"windows, Fortran, flang, print, _FortranAioOutputInteger128",
"windows, Fortran, flang, print, _FortranAioOutputInteger16",
"windows, Fortran, flang, print, _FortranAioOutputInteger32",
"windows, Fortran, flang, print, _FortranAioOutputInteger64",
"windows, Fortran, flang, print, _FortranAioOutputInteger8",
"windows, Fortran, flang, print, _FortranAioOutputLogical",
"windows, Fortran, flang, print, _FortranAioOutputNamelist",
"windows, Fortran, flang, print, _FortranAioOutputReal32",
"windows, Fortran, flang, print, _FortranAioOutputReal64",
"windows, Fortran, flang, write, _FortranAioOutputAscii",
"windows, Fortran, flang, write, _FortranAioOutputCharacter",
"windows, Fortran, flang, write, _FortranAioOutputComplex32",
"windows, Fortran, flang, write, _FortranAioOutputComplex64",
"windows, Fortran, flang, write, _FortranAioOutputExternalListOutput",
"windows, Fortran, flang, write, _FortranAioOutputInteger128",
"windows, Fortran, flang, write, _FortranAioOutputInteger16",
"windows, Fortran, flang, write, _FortranAioOutputInteger32",
"windows, Fortran, flang, write, _FortranAioOutputInteger64",
"windows, Fortran, flang, write, _FortranAioOutputInteger8",
"windows, Fortran, flang, write, _FortranAioOutputLogical",
"windows, Fortran, flang, write, _FortranAioOutputNamelist",
"windows, Fortran, flang, write, _FortranAioOutputReal32",
"windows, Fortran, flang, write, _FortranAioOutputReal64",
"windows, Fortran, flang, write, _FortranAioOutputUnformatedBlock",
"windows, Fortran, flang, rand, rand_",

"windows, C++, clang++, std::cout, _ZNSt3__14coutE",
"windows, C++, clang++, std::cerr, _ZNSt3__14cerrE",
"windows, C++, clang++, std::terminate, _ZSt9terminatev",
"windows, C, clang, exit, exit",
"windows, C, clang, printf, printf",
"windows, C, clang, printf, puts",
"windows, C, clang, puts, puts",
"windows, C, clang, putchar, putchar",
"windows, C, clang, sprintf, sprintf",
"windows, C, clang, vprintf, vprintf",
"windows, C, clang, vsprintf, vsprintf",
"windows, C, clang, rand, rand",
"windows, C, clang, srand, srand"
)
so_symbol_names_table <-
do.call(rbind,
Expand Down

0 comments on commit 8fd5a97

Please sign in to comment.