blob: 7109cd7f547a9e22599e60135f830c0682ef2471 [file] [log] [blame]
#!/bin/bash
#===-- tools/f18/flang.sh -----------------------------------------*- sh -*-===#
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
#===------------------------------------------------------------------------===#
wd=$(cd $(dirname "$0")/.. && pwd)
module_dir=$wd/include/flang
if [[ ! -d $module_dir ]]; then
module_dir=$wd/tools/flang/include/flang
fi
opts="-module-suffix .f18.mod -intrinsic-module-directory $module_dir"
if ! $wd/bin/f18 $opts "$@"
then status=$?
echo flang: in $PWD, f18 failed with exit status $status: $wd/bin/f18 $opts "$@" >&2
exit $status
fi