Make -no-pie option work for native Windows
[official-gcc.git] / libphobos / testsuite / testsuite_flags.in
blobbafd5ad4502f4bd810981ea2c33fc7045cb6c153
1 #!/bin/sh
4 # This script computes the various flags needed to run D Phobos unittests.
7 # Print a message saying how this script is intended to be invoked
8 print_usage() {
9 cat <<EOF
10 Usage:
11 testsuite_flags --gdc
12 --gdcflags
13 --gdcpaths
14 --gdcldflags
16 EOF
19 # Establish configure-generated directory structure.
20 BUILD_DIR=@libphobos_builddir@
21 SRC_DIR=@libphobos_srcdir@
22 query=$1
24 case ${query} in
25 --gdc)
26 GDC="@GDC@"
27 echo ${GDC}
29 --gdcflags)
30 GDCFLAGS_default="-fmessage-length=0 -fno-show-column"
31 GDCFLAGS_config="@WARN_DFLAGS@ @GDCFLAGS@ @CET_DFLAGS@
32 @phobos_compiler_shared_flag@ -fno-release -funittest"
33 echo ${GDCFLAGS_default} ${GDCFLAGS_config}
35 --gdcpaths)
36 GDCPATHS_default="-nostdinc"
37 GDCPATHS_config="-B${BUILD_DIR}/src
38 -I${BUILD_DIR}/libdruntime
39 -I${SRC_DIR}/libdruntime"
40 # Include phobos in search path if compiling in library.
41 if [ "x@ENABLE_LIBDRUNTIME_ONLY_FALSE@" = "x" ]; then
42 GDCPATHS_config="${GDCPATHS_config} -I${SRC_DIR}/src"
44 echo ${GDCPATHS_default} ${GDCPATHS_config}
46 --gdcldflags)
47 GDCLDFLAGS="-B${BUILD_DIR}/src
48 -B${BUILD_DIR}/libdruntime/gcc
49 -L${BUILD_DIR}/src/.libs"
50 echo ${GDCLDFLAGS}
53 print_usage
55 esac
57 exit 0