0ed757604f
The first implementation hit a front-end implementation bug where version conditions are resolved ahead of static if confitions. The logic for whether to use asm implemented fiber_switchContext or libc's swapcontext has been moved from GNU_Enable_CET to version CET. libphobos/ChangeLog: PR d/95680 PR d/97007 * Makefile.am (AM_MAKEFLAGS): Remove $(CET_FLAGS). * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac (DCFG_ENABLE_CET): Remove substitution. (CET_DFLAGS): Substitute. * libdruntime/Makefile.am (AM_DFLAGS): Add $(CET_DFLAGS). (AM_CFLAGS): Add $(CET_FLAGS). (AM_CCASFLAGS): Likewise. * libdruntime/Makefile.in: Regenerate. * libdruntime/core/thread.d: Replace static if GNU_Enable_CET condition with `version (CET)'. * libdruntime/gcc/config.d.in (GNU_Enable_CET): Remove. * src/Makefile.am (AM_DFLAGS): Add $(CET_DFLAGS). (AM_CFLAGS): Add $(CET_FLAGS). * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * testsuite/testsuite_flags.in: Add $(CET_DFLAGS) to --gdcflags.
57 lines
1.3 KiB
Bash
Executable File
57 lines
1.3 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
#
|
|
# This script computes the various flags needed to run D Phobos unittests.
|
|
#
|
|
|
|
# Print a message saying how this script is intended to be invoked
|
|
print_usage() {
|
|
cat <<EOF
|
|
Usage:
|
|
testsuite_flags --gdc
|
|
--gdcflags
|
|
--gdcpaths
|
|
--gdcldflags
|
|
|
|
EOF
|
|
}
|
|
|
|
# Establish configure-generated directory structure.
|
|
BUILD_DIR=@libphobos_builddir@
|
|
SRC_DIR=@libphobos_srcdir@
|
|
query=$1
|
|
|
|
case ${query} in
|
|
--gdc)
|
|
GDC="@GDC@"
|
|
echo ${GDC}
|
|
;;
|
|
--gdcflags)
|
|
GDCFLAGS_default="-fmessage-length=0 -fno-show-column"
|
|
GDCFLAGS_config="@WARN_DFLAGS@ @GDCFLAGS@ @CET_DFLAGS@ -fno-release -funittest"
|
|
echo ${GDCFLAGS_default} ${GDCFLAGS_config}
|
|
;;
|
|
--gdcpaths)
|
|
GDCPATHS_default="-nostdinc"
|
|
GDCPATHS_config="-B${BUILD_DIR}/src
|
|
-I${BUILD_DIR}/libdruntime
|
|
-I${SRC_DIR}/libdruntime"
|
|
# Include phobos in search path if compiling in library.
|
|
if [ "x@ENABLE_LIBDRUNTIME_ONLY_FALSE@" = "x" ]; then
|
|
GDCPATHS_config="${GDCPATHS_config} -I${SRC_DIR}/src"
|
|
fi
|
|
echo ${GDCPATHS_default} ${GDCPATHS_config}
|
|
;;
|
|
--gdcldflags)
|
|
GDCLDFLAGS="-B${BUILD_DIR}/src
|
|
-B${BUILD_DIR}/libdruntime/gcc
|
|
-L${BUILD_DIR}/src/.libs"
|
|
echo ${GDCLDFLAGS}
|
|
;;
|
|
*)
|
|
print_usage
|
|
;;
|
|
esac
|
|
|
|
exit 0
|