Skip to content

Commit

Permalink
Update configuration variables
Browse files Browse the repository at this point in the history
  • Loading branch information
VoxSciurorum authored and neboat committed Jul 7, 2022
1 parent 13a5e97 commit d2476db
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions tools/build
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,27 @@ OPENCILK_RUNTIMES="cheetah;cilktools" # Required runtimes
# Add compiler-rt project to enable support for Google sanitizers.
case "${OS}" in
Darwin)
: "${COMPILER_RT_COMPONENTS:=";compiler-rt;libcxx;libcxxabi"}" ;;
FreeBSD)
: "${COMPILER_RT_RUNTIMES:=";compiler-rt"}" ;;
: "${COMPILER_RT_COMPONENTS:=";compiler-rt;libcxx;libcxxabi"}"
# Note: We restrict the build to enable only architecture targets on
# the host (via -DLLVM_TARGETS_TO_BUILD=host) in order to work around
# an issue with recent versions of MacOSX and XCode trying to enable
# ARM support (c.f., https://trac.macports.org/ticket/61555).
TARGETS="host"
;;
*BSD)
# An older version required compiler-rt in OPENCILK_RUNTIMES
# but the combination of FreeBSD 13.1 and LLVM 14 does not.
# If compiler-rt is moved back to RUNTIMES the asan variant
# of Cheetah's personality.c file may need an explicit
# dependency on the asan library in compiler-rt.
: "${COMPILER_RT_COMPONENTS:=";compiler-rt"}"
# Standard FreeBSD target list
TARGETS="AArch64;ARM;Mips;PowerPC;RISCV;Sparc;X86"
;;
*)
: "${COMPILER_RT_COMPONENTS:=";compiler-rt"}" ;;
: "${COMPILER_RT_COMPONENTS:=";compiler-rt"}"
TARGETS="AArch64;X86"
;;
esac
# TODO: Add support to optionally enable other popular features on
# systems that support them. Some example features include:
Expand All @@ -94,16 +110,13 @@ esac
COMPONENTS="${OPENCILK_COMPONENTS}${COMPILER_RT_COMPONENTS}"
RUNTIMES="${OPENCILK_RUNTIMES}${COMPILER_RT_RUNTIMES}"

# Note: We restrict the build to enable only architecture targets on
# the host (via -DLLVM_TARGETS_TO_BUILD=host) in order to work around
# an issue with recent versions of MacOSX and XCode trying to enable
# ARM support (c.f., https://trac.macports.org/ticket/61555). This
# build restriction also reduces the overall build size.
cmake -DLLVM_ENABLE_PROJECTS="${COMPONENTS}" \
-DLLVM_ENABLE_RUNTIMES="${RUNTIMES}" \
-DLLVM_TARGETS_TO_BUILD=host \
-DLLVM_ENABLE_ASSERTIONS="${OPENCILK_ASSERTIONS:?}" \
-DLLVM_TARGETS_TO_BUILD="${TARGETS:?}" \
-DCMAKE_BUILD_TYPE="${OPENCILK_RELEASE:?}" \
-DLLVM_OPTIMIZED_TABLEGEN=On \
"${OPENCILK_SOURCE}/llvm"
# Alternatively, make -j "${NCPU}" using the native system make.
# cmake 3.10 neeeds -- before -j. cmake 3.16 understands -j
Expand Down

0 comments on commit d2476db

Please sign in to comment.