From d2476db3b03bae7319a7fff0c92fda7ce8dbf984 Mon Sep 17 00:00:00 2001 From: "John F. Carr" Date: Wed, 22 Jun 2022 08:32:11 -0400 Subject: [PATCH] Update configuration variables --- tools/build | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/tools/build b/tools/build index e14f7ea..290b1be 100755 --- a/tools/build +++ b/tools/build @@ -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: @@ -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