Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
- os: macos-15
compiler: flang
brew_via_install: 1
CONFIGURE_ARGS: --without-cxx # just for argument coverage
- os: macos-26
compiler: flang
brew_via_install: 1
Expand Down Expand Up @@ -144,6 +145,7 @@ jobs:
compiler: flang
version: 21
container: phhargrove/llvm-flang:21.1.0-latest
CONFIGURE_ARGS: --without-cxx # just for argument coverage
- os: ubuntu-24.04
compiler: flang
version: 20
Expand Down Expand Up @@ -196,6 +198,7 @@ jobs:
compiler: lfortran
version: 0.64
container: ghcr.io/lfortran/lfortran:v0.64.0
CONFIGURE_ARGS: --without-cxx # just for argument coverage

- os: ubuntu-22.04
compiler: lfortran
Expand Down Expand Up @@ -524,7 +527,7 @@ jobs:
run: |
echo "FC=gfortran-${COMPILER_VERSION}" >> "$GITHUB_ENV"
echo "CC=gcc-${COMPILER_VERSION}" >> "$GITHUB_ENV"
echo "CXX=g++-${COMPILER_VERSION}" >> "$GITHUB_ENV"
grep -q without-cxx <<< "$CONFIGURE_ARGS" || echo "CXX=g++-${COMPILER_VERSION}" >> "$GITHUB_ENV"
# XCode 26 / gfortran bug workaround
if [[ ${{ matrix.os }} =~ macos-26 ]] ; then
echo "CONFIGURE_ARGS=$CONFIGURE_ARGS --enable-force-posix-realtime" >> "$GITHUB_ENV"
Expand All @@ -540,7 +543,7 @@ jobs:
echo "FC=flang" >> "$GITHUB_ENV"
fi
echo "CC=clang" >> "$GITHUB_ENV"
echo "CXX=clang++" >> "$GITHUB_ENV"
grep -q without-cxx <<< "$CONFIGURE_ARGS" || echo "CXX=clang++" >> "$GITHUB_ENV"
fi

- name: Setup lfortran dependencies and variables
Expand All @@ -554,7 +557,7 @@ jobs:
fi
echo "FC=lfortran" >> "$GITHUB_ENV"
echo "CC=clang" >> "$GITHUB_ENV"
echo "CXX=clang++" >> "$GITHUB_ENV"
grep -q without-cxx <<< "$CONFIGURE_ARGS" || echo "CXX=clang++" >> "$GITHUB_ENV"
ls -R $(lfortran --print-c-include-dir)
#find / -name $HEADER_NAME -exec ls -al {} \; -exec md5sum {} \; -exec head {} \; -exec echo --- \;

Expand Down
25 changes: 17 additions & 8 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ Options:
thread-safe GASNet, for use in threaded do-concurrent.
--enable-cmake or --disable-fpm
Build Caffeine library using CMake instead of FPM (the default).
--without-cxx Disable optional use of the C++ compiler

All unrecognized arguments will be passed to GASNet's configure.

Some influential environment variables:
FC Fortran compiler command
FFLAGS Fortran compiler flags
CC C compiler command
CXX C++ compiler command (optional)
CFLAGS C compiler flags
CPPFLAGS C preprocessor flags, e.g. -I<include dir> if you have
headers in a nonstandard directory <include dir>
Expand Down Expand Up @@ -217,6 +219,8 @@ while [ "$1" != "" ]; do
--enable-debug) GASNET_CODEMODE=debug ; append_gasnet_configure_arg "$orig_arg" ;;
--disable-debug) GASNET_CODEMODE=opt ; append_gasnet_configure_arg "$orig_arg" ;;

--without-cxx) CXX=false ; append_gasnet_configure_arg "$orig_arg" ;;

*) # Pass unrecognized args unmodified to GASNet configure
append_gasnet_configure_arg "$orig_arg"
;;
Expand Down Expand Up @@ -469,7 +473,9 @@ EOF
# Homebrew does not inject clang/clang++ into PATH on macOS
export PATH="$BREW_PREFIX/opt/llvm/bin:$PATH"
CC="clang"
CXX="clang++"
if [ -z ${CXX:+x} ] || [[ $(basename ${CXX}) != false ]] ; then
CXX="clang++"
fi
FC="flang-new"
for tool in CC CXX FC ; do
if ! type -P ${!tool} > /dev/null 2>&1 ; then
Expand Down Expand Up @@ -661,15 +667,18 @@ if ! $PKG_CONFIG $pkg ; then
cd $GASNET_DIR
cmd="set -x ; ./configure --prefix=\"$PREFIX\""
# user-provided overrides:
cmd="$cmd $GASNET_CONFIGURE_ARGS"
cmd+=" $GASNET_CONFIGURE_ARGS"
# pass-thru compiler settings:
cmd="$cmd --with-cc=\"$CC\" --with-cxx=\"$CXX\""
cmd+=" --with-cc=\"$CC\""
if [[ $(basename ${CXX}) != false ]] ; then
cmd+=" --with-cxx=\"$CXX\""
fi
# select the GASNet config settings Caffeine requires, and disable unused features:
cmd="$cmd --enable-$GASNET_CONDUIT"
cmd="$cmd --enable-seq --enable-par --disable-parsync"
cmd="$cmd --disable-segment-everything"
cmd+=" --enable-$GASNET_CONDUIT"
cmd+=" --enable-seq --enable-par --disable-parsync"
cmd+=" --disable-segment-everything"
# TEMPORARY: disable MPI compatibility until we figure out how to support in fpm
cmd="$cmd --disable-mpi-compat"
cmd+=" --disable-mpi-compat"
eval $cmd
$MAKE -j 8 all
$MAKE -j 8 install
Expand Down Expand Up @@ -891,7 +900,7 @@ info)
echo NATIVEFLAGS=\$NATIVEFLAGS
echo CFLAGS=\$CFLAGS
echo LDFLAGS=\$LDFLAGS
grep -e link \$SRCDIR/fpm.toml
echo '$FPM_TOML_LINK_ENTRY'
echo GASNET=\$GASNETDIR
echo GASNET_CONDUIT=$GASNET_CONDUIT
echo GASNET_CODEMODE=$GASNET_CODEMODE
Expand Down
Loading