PR libstdc++/77854 document size_type for containers
[official-gcc.git] / libstdc++-v3 / scripts / check_compile
blob76762e675ee13310ba5fe653c071fd3921181e71
1 #!/usr/bin/env bash
3 # Script to do performance testing.
5 # Invocation
6 # check_performance SRC_DIR BUILD_DIR
8 # 1: variables
10 SRC_DIR=$1
11 BUILD_DIR=$2
13 # Now that we've successfully translated the numerical option into
14 # a symbolic one, we can safely ignore it.
15 shift
17 # This has been true all along. Found out about it the hard way...
18 case $BASH_VERSION in
19 1*)
20 echo 'You need bash 2.x to run check_performance. Exiting.';
21 exit 1 ;;
22 *) ;;
23 esac
25 flags_script=$BUILD_DIR/scripts/testsuite_flags
26 INCLUDES=`$flags_script --build-includes`
27 PCH_FLAGS=`$flags_script --cxxpchflags`
28 FLAGS=`$flags_script --cxxflags`
29 TEST_FLAGS="-S"
30 COMPILER=`$flags_script --build-cxx`
31 CXX="$COMPILER $INCLUDES $PCH_FLAGS $FLAGS -Wfatal-errors $TEST_FLAGS"
33 echo "compile line is:"
34 echo $CXX
35 echo ""
37 TESTS_FILE="testsuite_files"
39 #mkdir binaries
40 UNIQUE_ID=0
42 for NAME in `cat $TESTS_FILE`
44 if $RUN; then
45 echo $NAME
46 OUTPUT_NAME=$UNIQUE_ID
47 $CXX $SRC_DIR/testsuite/$NAME -o $OUTPUT_NAME
48 if [ -f $OUTPUT_NAME ]; then
49 # mv $OUTPUT_NAME binaries
50 rm $OUTPUT_NAME
52 let UNIQUE_ID+=1
54 done
56 exit 0