Changeset 91788fa
- Timestamp:
- Jul 25, 2018, 6:23:58 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- a95c117, f0b3f51
- Parents:
- 40a7d9c (diff), e89f4b1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 2 added
- 20 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
.gitignore
r40a7d9c r91788fa 24 24 include 25 25 share 26 build 26 27 *.class 27 28 -
Makefile.in
r40a7d9c r91788fa 170 170 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ 171 171 cscope distdir dist dist-all distcheck 172 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ 173 $(LISP)config.h.in 172 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) 174 173 # Read a list of newline-separated strings from the standard input, 175 174 # and print each of them once, without duplicates. Input order is … … 192 191 CSCOPE = cscope 193 192 DIST_SUBDIRS = $(SUBDIRS) 194 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ 195 $(top_srcdir)/automake/compile \ 193 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/automake/compile \ 196 194 $(top_srcdir)/automake/config.guess \ 197 195 $(top_srcdir)/automake/config.sub \ 198 196 $(top_srcdir)/automake/install-sh \ 199 $(top_srcdir)/automake/missing INSTALL README automake/compile \ 200 automake/config.guess automake/config.sub automake/depcomp \ 201 automake/install-sh automake/missing automake/ylwrap 197 $(top_srcdir)/automake/missing $(top_srcdir)/src/config.h.in \ 198 INSTALL README automake/compile automake/config.guess \ 199 automake/config.sub automake/depcomp automake/install-sh \ 200 automake/missing automake/ylwrap 202 201 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 203 202 distdir = $(PACKAGE)-$(VERSION) … … 409 408 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 410 409 411 stamp-h1: $( srcdir)/config.h.in $(top_builddir)/config.status410 stamp-h1: $(top_srcdir)/src/config.h.in $(top_builddir)/config.status 412 411 @rm -f stamp-h1 413 412 cd $(top_builddir) && $(SHELL) ./config.status config.h 414 $( srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)413 $(top_srcdir)/src/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 415 414 ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) 416 415 rm -f stamp-h1 -
configure
r40a7d9c r91788fa 2492 2492 2493 2493 #AC_CONFIG_SRCDIR([src/main.cc]) 2494 ac_config_headers="$ac_config_headers config.h "2494 ac_config_headers="$ac_config_headers config.h:src/config.h.in" 2495 2495 2496 2496 # Check whether --enable-silent-rules was given. … … 6295 6295 6296 6296 6297 ac_config_files="$ac_config_files src/tests/config.py" 6298 6297 6299 cat >confcache <<\_ACEOF 6298 6300 # This file is a shell script that caches the results of configure … … 7048 7050 do 7049 7051 case $ac_config_target in 7050 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h " ;;7052 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:src/config.h.in" ;; 7051 7053 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; 7052 7054 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; … … 7061 7063 "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; 7062 7064 "tools/prettyprinter/Makefile") CONFIG_FILES="$CONFIG_FILES tools/prettyprinter/Makefile" ;; 7065 "src/tests/config.py") CONFIG_FILES="$CONFIG_FILES src/tests/config.py" ;; 7063 7066 7064 7067 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; -
configure.ac
r40a7d9c r91788fa 6 6 AC_CONFIG_AUX_DIR([automake]) 7 7 #AC_CONFIG_SRCDIR([src/main.cc]) 8 AC_CONFIG_HEADERS([config.h ])8 AC_CONFIG_HEADERS([config.h:src/config.h.in]) 9 9 AM_SILENT_RULES([no]) 10 10 … … 251 251 ]) 252 252 253 AC_OUTPUT 253 AC_OUTPUT(src/tests/config.py) 254 254 255 255 AM_COND_IF([BUILD_RELEASE], -
src/InitTweak/FixGlobalInit.cc
r40a7d9c r91788fa 74 74 std::string ret = name.substr( 0, name.find( '.' ) ); 75 75 // replace invalid characters with _ 76 static std::string invalid = "/- ";76 static std::string invalid = "/-@"; 77 77 replace_if( ret.begin(), ret.end(), []( char c ) { return invalid.find(c) != std::string::npos; }, '_' ); 78 78 return ret; -
src/Makefile.am
r40a7d9c r91788fa 44 44 driver_cfa_cpp_SOURCES = ${SRC} 45 45 driver_cfa_cpp_LDADD = -ldl # yywrap 46 driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I ${abs_top_srcdir}/src/include -DYY_NO_INPUT -O2 -g -std=c++1446 driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I./Parser -I${abs_top_srcdir}/src/Parser -I${abs_top_srcdir}/src/include -DYY_NO_INPUT -O2 -g -std=c++14 47 47 driver_cfa_cpp_LDFLAGS = -Xlinker -export-dynamic 48 48 -
src/Makefile.in
r40a7d9c r91788fa 327 327 *) (install-info --version) >/dev/null 2>&1;; \ 328 328 esac 329 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) 329 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ 330 $(LISP)config.h.in 330 331 # Read a list of newline-separated strings from the standard input, 331 332 # and print each of them once, without duplicates. Input order is … … 541 542 driver_cfa_cpp_SOURCES = ${SRC} 542 543 driver_cfa_cpp_LDADD = -ldl # yywrap 543 driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I ${abs_top_srcdir}/src/include -DYY_NO_INPUT -O2 -g -std=c++14544 driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I./Parser -I${abs_top_srcdir}/src/Parser -I${abs_top_srcdir}/src/include -DYY_NO_INPUT -O2 -g -std=c++14 544 545 driver_cfa_cpp_LDFLAGS = -Xlinker -export-dynamic 545 546 all: $(BUILT_SOURCES) -
src/config.h.in
r40a7d9c r91788fa 1 /* config.h.in. Generated from configure.ac by autoheader. */1 /* src/config.h.in. Generated from configure.ac by autoheader. */ 2 2 3 3 /* Location of include files. */ -
src/driver/Makefile.am
r40a7d9c r91788fa 28 28 endif 29 29 30 # don't install cfa directly 30 31 noinst_PROGRAMS = cfa 31 cfa_SOURCES = cfa.cc32 32 33 # use 33 34 install-exec-hook: 34 35 @test -z "$(CFA_BINDIR)" || $(MKDIR_P) "$(CFA_BINDIR)" … … 40 41 cd "$(CFA_BINDIR)" && rm -f $(CFA_NAME) 41 42 43 cfa_SOURCES = cfa.cc 44 42 45 # put into lib for now 43 46 cc1libdir = ${CFA_LIBDIR} -
src/driver/Makefile.in
r40a7d9c r91788fa 626 626 627 627 628 # use 628 629 install-exec-hook: 629 630 @test -z "$(CFA_BINDIR)" || $(MKDIR_P) "$(CFA_BINDIR)" -
src/libcfa/Makefile.am
r40a7d9c r91788fa 36 36 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -D__CFA_DEBUG__ -Wall -O0 -c -o $@ $< 37 37 38 EXTRA_FLAGS = -g -Wall -Wno-unused-function -imacros libcfa-prelude.c @CFA_FLAGS@ 38 EXTRA_FLAGS = -g -Wall -Wno-unused-function -imacros libcfa-prelude.c @CFA_FLAGS@ $(DEFAULT_INCLUDES) 39 39 40 40 AM_CCASFLAGS = @CFA_FLAGS@ … … 43 43 #use -no-include-stdhdr to prevent rebuild cycles 44 44 #The built sources must not depend on the installed headers 45 CFLAGS = -quiet -no-include-stdhdr -I${abs_top_srcdir}/src/libcfa/stdhdr -XCFA -t -B${abs_top_ srcdir}/src/driver ${EXTRA_FLAGS}46 CC = ${abs_top_ srcdir}/src/driver/cfa45 CFLAGS = -quiet -no-include-stdhdr -I${abs_top_srcdir}/src/libcfa/stdhdr -XCFA -t -B${abs_top_builddir}/src/driver ${EXTRA_FLAGS} 46 CC = ${abs_top_builddir}/src/driver/cfa 47 47 48 48 headers = fstream iostream iterator limits rational time stdlib common \ … … 92 92 libcfa_d_a_CFLAGS = -debug -O0 #No need for __CFA_DEBUG__ since we pass -debug 93 93 94 stdhdr = ${shell find stdhdr -type f -printf "%p "}94 stdhdr = ${shell find ${srcdir}/stdhdr -type f -printf "%p "} 95 95 96 96 cfa_includedir = $(CFA_INCDIR) -
src/libcfa/Makefile.in
r40a7d9c r91788fa 268 268 containers/result containers/vector concurrency/coroutine \ 269 269 concurrency/thread concurrency/kernel concurrency/monitor \ 270 concurrency/mutex ${shell find stdhdr -type f -printf "%p "} \ 271 math gmp time_t.h bits/align.h bits/containers.h bits/defs.h \ 272 bits/debug.h bits/locks.h concurrency/invoke.h 270 concurrency/mutex ${shell find ${srcdir}/stdhdr -type f \ 271 -printf "%p "} math gmp time_t.h bits/align.h \ 272 bits/containers.h bits/defs.h bits/debug.h bits/locks.h \ 273 concurrency/invoke.h 273 274 HEADERS = $(nobase_cfa_include_HEADERS) 274 275 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) … … 302 303 AWK = @AWK@ 303 304 BACKEND_CC = @BACKEND_CC@ 304 CC = ${abs_top_ srcdir}/src/driver/cfa305 CC = ${abs_top_builddir}/src/driver/cfa 305 306 CCAS = @CCAS@ 306 307 CCASDEPMODE = @CCASDEPMODE@ … … 318 319 #use -no-include-stdhdr to prevent rebuild cycles 319 320 #The built sources must not depend on the installed headers 320 CFLAGS = -quiet -no-include-stdhdr -I${abs_top_srcdir}/src/libcfa/stdhdr -XCFA -t -B${abs_top_ srcdir}/src/driver ${EXTRA_FLAGS}321 CFLAGS = -quiet -no-include-stdhdr -I${abs_top_srcdir}/src/libcfa/stdhdr -XCFA -t -B${abs_top_builddir}/src/driver ${EXTRA_FLAGS} 321 322 CPP = @CPP@ 322 323 CPPFLAGS = @CPPFLAGS@ … … 422 423 ARFLAGS = cr 423 424 lib_LIBRARIES = $(am__append_1) $(am__append_2) 424 EXTRA_FLAGS = -g -Wall -Wno-unused-function -imacros libcfa-prelude.c @CFA_FLAGS@ 425 EXTRA_FLAGS = -g -Wall -Wno-unused-function -imacros libcfa-prelude.c @CFA_FLAGS@ $(DEFAULT_INCLUDES) 425 426 AM_CCASFLAGS = @CFA_FLAGS@ 426 427 headers = fstream iostream iterator limits rational time stdlib common \ … … 435 436 libcfa_d_a_SOURCES = ${libsrc} 436 437 libcfa_d_a_CFLAGS = -debug -O0 #No need for __CFA_DEBUG__ since we pass -debug 437 stdhdr = ${shell find stdhdr -type f -printf "%p "}438 stdhdr = ${shell find ${srcdir}/stdhdr -type f -printf "%p "} 438 439 cfa_includedir = $(CFA_INCDIR) 439 440 nobase_cfa_include_HEADERS = \ -
src/prelude/Makefile.am
r40a7d9c r91788fa 23 23 noinst_DATA = ../libcfa/libcfa-prelude.c 24 24 25 CC = ${abs_top_ srcdir}/src/driver/cfa25 CC = ${abs_top_builddir}/src/driver/cfa 26 26 27 27 $(DEPDIR) : … … 32 32 33 33 # create extra forward types/declarations to reduce inclusion of library files 34 extras.cf : extras.regxextras.c35 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -E ${srcdir}/extras.c | grep -f extras.regx > ${srcdir}/extras.cf34 extras.cf : ${srcdir}/extras.regx ${srcdir}/extras.c 35 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -E ${srcdir}/extras.c | grep -f ${srcdir}/extras.regx > extras.cf 36 36 37 37 # create forward declarations for gcc builtins 38 gcc-builtins.cf : gcc-builtins.c prototypes.sed39 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ - E -P $< | sed -r -fprototypes.sed > $@38 gcc-builtins.cf : gcc-builtins.c ${srcdir}/prototypes.sed 39 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -I${srcdir} -E -P $< | sed -r -f ${srcdir}/prototypes.sed > $@ 40 40 41 gcc-builtins.c : builtins.def prototypes.awk sync-builtins.cf42 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ - E prototypes.c | awk -fprototypes.awk > $@41 gcc-builtins.c : ${srcdir}/builtins.def ${srcdir}/prototypes.awk ${srcdir}/sync-builtins.cf ${srcdir}/prototypes.c 42 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -I${srcdir} -E ${srcdir}/prototypes.c | awk -f ${srcdir}/prototypes.awk > $@ 43 43 44 44 prelude.cf : prelude-gen.cc … … 58 58 include $(DEPDIR)/builtins.Po 59 59 60 ../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_ srcdir}/src/driver/cfa-cpp61 ${AM_V_GEN}${abs_top_ srcdir}/src/driver/cfa-cpp -l prelude.cf $@ # use src/cfa-cpp as not in lib until after install60 ../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp 61 ${AM_V_GEN}${abs_top_builddir}/src/driver/cfa-cpp -l prelude.cf $@ # use src/cfa-cpp as not in lib until after install 62 62 63 bootloader.c : bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_srcdir}/src/driver/cfa-cpp64 ${AM_V_GEN}${abs_top_ srcdir}/src/driver/cfa-cpp -tpmbootloader.cf $@ # use src/cfa-cpp as not in lib until after install63 bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp 64 ${AM_V_GEN}${abs_top_builddir}/src/driver/cfa-cpp -tpm ${srcdir}/bootloader.cf $@ # use src/cfa-cpp as not in lib until after install 65 65 66 66 maintainer-clean-local : -
src/prelude/Makefile.in
r40a7d9c r91788fa 162 162 AWK = @AWK@ 163 163 BACKEND_CC = @BACKEND_CC@ 164 CC = ${abs_top_ srcdir}/src/driver/cfa164 CC = ${abs_top_builddir}/src/driver/cfa 165 165 CCAS = @CCAS@ 166 166 CCASDEPMODE = @CCASDEPMODE@ … … 501 501 502 502 # create extra forward types/declarations to reduce inclusion of library files 503 extras.cf : extras.regxextras.c504 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -E ${srcdir}/extras.c | grep -f extras.regx > ${srcdir}/extras.cf503 extras.cf : ${srcdir}/extras.regx ${srcdir}/extras.c 504 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -E ${srcdir}/extras.c | grep -f ${srcdir}/extras.regx > extras.cf 505 505 506 506 # create forward declarations for gcc builtins 507 gcc-builtins.cf : gcc-builtins.c prototypes.sed508 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ - E -P $< | sed -r -fprototypes.sed > $@509 510 gcc-builtins.c : builtins.def prototypes.awk sync-builtins.cf511 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ - E prototypes.c | awk -fprototypes.awk > $@507 gcc-builtins.cf : gcc-builtins.c ${srcdir}/prototypes.sed 508 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -I${srcdir} -E -P $< | sed -r -f ${srcdir}/prototypes.sed > $@ 509 510 gcc-builtins.c : ${srcdir}/builtins.def ${srcdir}/prototypes.awk ${srcdir}/sync-builtins.cf ${srcdir}/prototypes.c 511 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -I${srcdir} -E ${srcdir}/prototypes.c | awk -f ${srcdir}/prototypes.awk > $@ 512 512 513 513 prelude.cf : prelude-gen.cc … … 527 527 include $(DEPDIR)/builtins.Po 528 528 529 ../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_ srcdir}/src/driver/cfa-cpp530 ${AM_V_GEN}${abs_top_ srcdir}/src/driver/cfa-cpp -l prelude.cf $@ # use src/cfa-cpp as not in lib until after install531 532 bootloader.c : bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_srcdir}/src/driver/cfa-cpp533 ${AM_V_GEN}${abs_top_ srcdir}/src/driver/cfa-cpp -tpmbootloader.cf $@ # use src/cfa-cpp as not in lib until after install529 ../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp 530 ${AM_V_GEN}${abs_top_builddir}/src/driver/cfa-cpp -l prelude.cf $@ # use src/cfa-cpp as not in lib until after install 531 532 bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp 533 ${AM_V_GEN}${abs_top_builddir}/src/driver/cfa-cpp -tpm ${srcdir}/bootloader.cf $@ # use src/cfa-cpp as not in lib until after install 534 534 535 535 maintainer-clean-local : -
src/tests/Makefile.am
r40a7d9c r91788fa 15 15 ############################################################################### 16 16 17 17 18 debug=yes 18 19 … … 24 25 concurrent='-Econcurrent' 25 26 endif 27 28 TEST_PY = python ${srcdir}/test.py 26 29 27 30 # applies to both programs … … 41 44 TEST_FLAGS = $(if $(test), 2> $(test), ) 42 45 AM_CFLAGS = ${TEST_FLAGS} ${BUILD_FLAGS} 43 CC = @CFA_BINDIR@/@CFA_NAME@46 CC = ${abs_top_builddir}/src/driver/cfa -DIN_DIR="${srcdir}/.in/" 44 47 45 48 .PHONY : list … … 53 56 54 57 all-local : 55 @+ python test.py--debug=${debug} ${concurrent} ${quick_test}58 @+${TEST_PY} --debug=${debug} ${concurrent} ${quick_test} 56 59 57 60 all-tests : 58 @+ python test.py--all --debug=${debug} ${concurrent} # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program61 @+${TEST_PY} --all --debug=${debug} ${concurrent} # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program 59 62 60 63 clean-local : … … 62 65 63 66 list : 64 @+ python test.py--list ${concurrent}67 @+${TEST_PY} --list ${concurrent} 65 68 66 69 concurrency : 67 @+ python test.py--debug=${debug} -Iconcurrent70 @+${TEST_PY} --debug=${debug} -Iconcurrent 68 71 69 .dummy : .dummy.c @CFA_BINDIR@/@CFA_NAME@ 70 ${CC} ${BUILD_FLAGS} -XCFA -n ${<} -o ${@} #don't use CFLAGS, this rule is not a real test 71 72 73 % : %.c @CFA_BINDIR@/@CFA_NAME@ 74 ${CC} ${AM_CFLAGS} ${CFLAGS} ${<} -o ${@} 72 % : ${srcdir}/%.c @CFA_BINDIR@/@CFA_NAME@ 73 $(COMPILE) $(abspath ${<}) -o ${@} 75 74 76 75 declarationSpecifier: declarationSpecifier.c @CFA_BINDIR@/@CFA_NAME@ 77 $ {CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<}-o ${@}76 $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} 78 77 79 78 gccExtensions : gccExtensions.c @CFA_BINDIR@/@CFA_NAME@ 80 $ {CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<}-o ${@}79 $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} 81 80 82 81 extension : extension.c @CFA_BINDIR@/@CFA_NAME@ 83 $ {CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<}-o ${@}82 $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} 84 83 85 84 attributes : attributes.c @CFA_BINDIR@/@CFA_NAME@ 86 $ {CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<}-o ${@}85 $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} 87 86 88 87 functions: functions.c @CFA_BINDIR@/@CFA_NAME@ 89 $ {CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<}-o ${@}88 $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} 90 89 91 90 KRfunctions : KRfunctions.c @CFA_BINDIR@/@CFA_NAME@ 92 $ {CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<}-o ${@}91 $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} 93 92 94 93 sched-ext-parse : sched-ext-parse.c @CFA_BINDIR@/@CFA_NAME@ 95 $ {CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<}-o ${@}94 $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} 96 95 97 96 gmp : gmp.c @CFA_BINDIR@/@CFA_NAME@ 98 $ {CC} ${AM_CFLAGS} ${CFLAGS} -lgmp ${<}-o ${@}97 $(COMPILE) -lgmp $(abspath ${<}) -o ${@} 99 98 100 99 completeTypeError : completeTypeError.c @CFA_BINDIR@/@CFA_NAME@ 101 $ {CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<}-o ${@}100 $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} 102 101 103 102 typedefRedef-ERR1: typedefRedef.c @CFA_BINDIR@/@CFA_NAME@ 104 $ {CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<}-o ${@}103 $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} 105 104 106 105 alloc-ERROR: alloc.c @CFA_BINDIR@/@CFA_NAME@ 107 $ {CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<}-o ${@}106 $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} 108 107 109 108 fallthrough-ERROR: fallthrough.c @CFA_BINDIR@/@CFA_NAME@ 110 $ {CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<}-o ${@}109 $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} 111 110 112 111 nested-types-ERR1: nested-types.c @CFA_BINDIR@/@CFA_NAME@ 113 $ {CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<}-o ${@}112 $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} 114 113 115 114 nested-types-ERR2: nested-types.c @CFA_BINDIR@/@CFA_NAME@ 116 $ {CC} ${AM_CFLAGS} ${CFLAGS} -DERR2 ${<}-o ${@}115 $(COMPILE) -DERR2 $(abspath ${<}) -o ${@} 117 116 118 117 # Constructor/destructor tests 119 118 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c @CFA_BINDIR@/@CFA_NAME@ 120 $ {CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<}-o ${@}119 $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} 121 120 122 121 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c @CFA_BINDIR@/@CFA_NAME@ 123 $ {CC} ${AM_CFLAGS} ${CFLAGS} -DERR2 ${<}-o ${@}122 $(COMPILE) -DERR2 $(abspath ${<}) -o ${@} 124 123 125 124 raii/memberCtors-ERR1: raii/memberCtors.c @CFA_BINDIR@/@CFA_NAME@ 126 $ {CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<}-o ${@}125 $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} 127 126 128 127 raii/ctor-autogen-ERR1: raii/ctor-autogen.c @CFA_BINDIR@/@CFA_NAME@ 129 $ {CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<}-o ${@}128 $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} 130 129 131 130 # Warnings 132 131 warnings/self-assignment: warnings/self-assignment.c @CFA_BINDIR@/@CFA_NAME@ 133 $ {CC} ${AM_CFLAGS} ${CFLAGS} ${<}2> ${@} -fsyntax-only132 $(COMPILE) $(abspath ${<}) 2> ${@} -fsyntax-only 134 133 135 134 #builtins 136 135 builtins/sync: builtins/sync.c @CFA_BINDIR@/@CFA_NAME@ 137 $ {CC} ${AM_CFLAGS} ${CFLAGS} ${<}2> ${@} -fsyntax-only136 $(COMPILE) $(abspath ${<}) 2> ${@} -fsyntax-only -
src/tests/Makefile.in
r40a7d9c r91788fa 103 103 mkinstalldirs = $(install_sh) -d 104 104 CONFIG_HEADER = $(top_builddir)/config.h 105 CONFIG_CLEAN_FILES = 105 CONFIG_CLEAN_FILES = config.py 106 106 CONFIG_CLEAN_VPATH_FILES = 107 107 am__dirstamp = $(am__leading_dot)dirstamp … … 180 180 ETAGS = etags 181 181 CTAGS = ctags 182 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/automake/depcomp 182 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.py.in \ 183 $(top_srcdir)/automake/depcomp 183 184 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 184 185 ACLOCAL = @ACLOCAL@ … … 191 192 AWK = @AWK@ 192 193 BACKEND_CC = @BACKEND_CC@ 193 CC = @CFA_BINDIR@/@CFA_NAME@194 CC = ${abs_top_builddir}/src/driver/cfa -DIN_DIR="${srcdir}/.in/" 194 195 CCAS = @CCAS@ 195 196 CCASDEPMODE = @CCASDEPMODE@ … … 306 307 @BUILD_CONCURRENCY_FALSE@concurrent = '-Econcurrent' 307 308 @BUILD_CONCURRENCY_TRUE@concurrent = 309 TEST_PY = python ${srcdir}/test.py 308 310 309 311 # applies to both programs … … 350 352 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 351 353 $(am__aclocal_m4_deps): 354 config.py: $(top_builddir)/config.status $(srcdir)/config.py.in 355 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 352 356 avltree/$(am__dirstamp): 353 357 @$(MKDIR_P) avltree … … 731 735 732 736 all-local : 733 @+ python test.py--debug=${debug} ${concurrent} ${quick_test}737 @+${TEST_PY} --debug=${debug} ${concurrent} ${quick_test} 734 738 735 739 all-tests : 736 @+ python test.py--all --debug=${debug} ${concurrent} # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program740 @+${TEST_PY} --all --debug=${debug} ${concurrent} # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program 737 741 738 742 clean-local : … … 740 744 741 745 list : 742 @+ python test.py--list ${concurrent}746 @+${TEST_PY} --list ${concurrent} 743 747 744 748 concurrency : 745 @+python test.py --debug=${debug} -Iconcurrent 746 747 .dummy : .dummy.c @CFA_BINDIR@/@CFA_NAME@ 748 ${CC} ${BUILD_FLAGS} -XCFA -n ${<} -o ${@} #don't use CFLAGS, this rule is not a real test 749 750 % : %.c @CFA_BINDIR@/@CFA_NAME@ 751 ${CC} ${AM_CFLAGS} ${CFLAGS} ${<} -o ${@} 749 @+${TEST_PY} --debug=${debug} -Iconcurrent 750 751 % : ${srcdir}/%.c @CFA_BINDIR@/@CFA_NAME@ 752 $(COMPILE) $(abspath ${<}) -o ${@} 752 753 753 754 declarationSpecifier: declarationSpecifier.c @CFA_BINDIR@/@CFA_NAME@ 754 $ {CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<}-o ${@}755 $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} 755 756 756 757 gccExtensions : gccExtensions.c @CFA_BINDIR@/@CFA_NAME@ 757 $ {CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<}-o ${@}758 $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} 758 759 759 760 extension : extension.c @CFA_BINDIR@/@CFA_NAME@ 760 $ {CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<}-o ${@}761 $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} 761 762 762 763 attributes : attributes.c @CFA_BINDIR@/@CFA_NAME@ 763 $ {CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<}-o ${@}764 $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} 764 765 765 766 functions: functions.c @CFA_BINDIR@/@CFA_NAME@ 766 $ {CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<}-o ${@}767 $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} 767 768 768 769 KRfunctions : KRfunctions.c @CFA_BINDIR@/@CFA_NAME@ 769 $ {CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<}-o ${@}770 $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} 770 771 771 772 sched-ext-parse : sched-ext-parse.c @CFA_BINDIR@/@CFA_NAME@ 772 $ {CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<}-o ${@}773 $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} 773 774 774 775 gmp : gmp.c @CFA_BINDIR@/@CFA_NAME@ 775 $ {CC} ${AM_CFLAGS} ${CFLAGS} -lgmp ${<}-o ${@}776 $(COMPILE) -lgmp $(abspath ${<}) -o ${@} 776 777 777 778 completeTypeError : completeTypeError.c @CFA_BINDIR@/@CFA_NAME@ 778 $ {CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<}-o ${@}779 $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} 779 780 780 781 typedefRedef-ERR1: typedefRedef.c @CFA_BINDIR@/@CFA_NAME@ 781 $ {CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<}-o ${@}782 $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} 782 783 783 784 alloc-ERROR: alloc.c @CFA_BINDIR@/@CFA_NAME@ 784 $ {CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<}-o ${@}785 $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} 785 786 786 787 fallthrough-ERROR: fallthrough.c @CFA_BINDIR@/@CFA_NAME@ 787 $ {CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<}-o ${@}788 $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} 788 789 789 790 nested-types-ERR1: nested-types.c @CFA_BINDIR@/@CFA_NAME@ 790 $ {CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<}-o ${@}791 $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} 791 792 792 793 nested-types-ERR2: nested-types.c @CFA_BINDIR@/@CFA_NAME@ 793 $ {CC} ${AM_CFLAGS} ${CFLAGS} -DERR2 ${<}-o ${@}794 $(COMPILE) -DERR2 $(abspath ${<}) -o ${@} 794 795 795 796 # Constructor/destructor tests 796 797 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c @CFA_BINDIR@/@CFA_NAME@ 797 $ {CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<}-o ${@}798 $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} 798 799 799 800 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c @CFA_BINDIR@/@CFA_NAME@ 800 $ {CC} ${AM_CFLAGS} ${CFLAGS} -DERR2 ${<}-o ${@}801 $(COMPILE) -DERR2 $(abspath ${<}) -o ${@} 801 802 802 803 raii/memberCtors-ERR1: raii/memberCtors.c @CFA_BINDIR@/@CFA_NAME@ 803 $ {CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<}-o ${@}804 $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} 804 805 805 806 raii/ctor-autogen-ERR1: raii/ctor-autogen.c @CFA_BINDIR@/@CFA_NAME@ 806 $ {CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<}-o ${@}807 $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} 807 808 808 809 # Warnings 809 810 warnings/self-assignment: warnings/self-assignment.c @CFA_BINDIR@/@CFA_NAME@ 810 $ {CC} ${AM_CFLAGS} ${CFLAGS} ${<}2> ${@} -fsyntax-only811 $(COMPILE) $(abspath ${<}) 2> ${@} -fsyntax-only 811 812 812 813 #builtins 813 814 builtins/sync: builtins/sync.c @CFA_BINDIR@/@CFA_NAME@ 814 $ {CC} ${AM_CFLAGS} ${CFLAGS} ${<}2> ${@} -fsyntax-only815 $(COMPILE) $(abspath ${<}) 2> ${@} -fsyntax-only 815 816 816 817 # Tell versions [3.59,3.63) of GNU make to not export all variables. -
src/tests/io2.c
r40a7d9c r91788fa 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // io2.c -- 8 // 6 // 7 // io2.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Wed Mar 2 16:56:02 2016 … … 12 12 // Last Modified On : Thu May 24 21:17:41 2018 13 13 // Update Count : 103 14 // 14 // 15 15 16 16 #include <fstream> 17 18 #define xstr(s) str(s) 19 #define str(s) #s 17 20 18 21 int main() { … … 38 41 char s1[size], s2[size]; 39 42 40 ifstream in = { "io.data" }; // create / open file43 ifstream in = { xstr(IN_DIR) "io.data" }; // create / open file 41 44 42 45 sout | "input bacis types" | endl; -
src/tests/pybin/settings.py
r40a7d9c r91788fa 1 from __future__ import print_function 2 3 import os 1 4 import sys 5 6 try : 7 sys.path.append(os.getcwd()) 8 import config 9 10 SRCDIR = os.path.abspath(config.SRCDIR) 11 BUILDDIR = os.path.abspath(config.BUILDDIR) 12 except: 13 print('ERROR: missing config.py, re-run configure script.', file=sys.stderr) 14 sys.exit(1) 2 15 3 16 class Architecture: … … 5 18 'x64' : 'x64', 6 19 'x86-64' : 'x64', 20 'x86_64' : 'x64', 7 21 'x86' : 'x86', 8 22 'i386' : 'x86', … … 25 39 self.cross_compile = False 26 40 try: 27 arch = machine_default()41 arch = config.HOSTARCH 28 42 self.target = Architecture.makeCanonical( arch ) 29 43 except KeyError: … … 66 80 arch = Architecture(options.arch) 67 81 82 68 83 def updateMakeCmd(force, jobs): 69 84 global make 70 85 71 86 make = "make" if not force else ("make -j%i" % jobs) 72 73 74 def set_machine_default( func ):75 global machine_default76 77 machine_default = func -
src/tests/pybin/test_run.py
r40a7d9c r91788fa 33 33 34 34 def expect(self): 35 return ("%s /.expect/%s%s.txt" % (self.path, self.name, '' if not self.arch else ".%s" % self.arch))35 return ("%s.expect/%s%s.txt" % (os.path.join(settings.SRCDIR, self.path), self.name, '' if not self.arch else ".%s" % self.arch)) 36 36 37 37 def error_log(self): 38 return ("%s /.err/%s.log" % (self.path, self.name))38 return ("%s.err/%s.log" % (os.path.join(settings.BUILDDIR, self.path), self.name)) 39 39 40 40 def output_log(self): 41 return ("%s /.out/%s.log" % (self.path, self.name))41 return ("%s.out/%s.log" % (os.path.join(settings.BUILDDIR, self.path), self.name)) 42 42 43 43 def input(self): 44 return ("%s /.in/%s.txt" % (self.path, self.name))44 return ("%s.in/%s.txt" % (os.path.join(settings.SRCDIR, self.path), self.name)) 45 45 46 46 def target_output(self): … … 49 49 def target(self): 50 50 return os.path.join(self.path, self.name) 51 52 def target_executable(self): 53 return os.path.join(settings.BUILDDIR, self.path, self.name) 51 54 52 55 @classmethod -
src/tests/pybin/tools.py
r40a7d9c r91788fa 9 9 import stat 10 10 import sys 11 import fileinput 11 12 12 13 from pybin import settings … … 33 34 out, err = proc.communicate() 34 35 return proc.returncode, out 36 37 def is_ascii(fname): 38 if not os.path.isfile(fname): 39 return False 40 41 code, out = sh("file %s" % fname, print2stdout = False) 42 if code != 0: 43 return False 44 45 match = re.search(".*: (.*)", out) 46 47 if not match: 48 return False 49 50 return match.group(1) == "ASCII text" 35 51 36 52 # Remove 1 or more files silently … … 105 121 # helper function to replace patterns in a file 106 122 def file_replace(fname, pat, s_after): 107 # first, see if the pattern is even in the file. 108 with open(fname) as f: 109 if not any(re.search(pat, line) for line in f): 110 return # pattern does not occur in file so we are done. 111 112 # pattern is in the file, so perform replace operation. 113 with open(fname) as f: 114 out_fname = fname + ".tmp" 115 out = open(out_fname, "w") 116 for line in f: 117 out.write(re.sub(pat, s_after, line)) 118 out.close() 119 os.rename(out_fname, fname) 123 file = fileinput.FileInput(fname, inplace=True, backup='.bak') 124 for line in file: 125 print(line.replace(pat, s_after), end='') 126 file.close() 120 127 121 128 # helper function to check if a files contains only a specific string … … 140 147 # transform path to canonical form 141 148 def canonicalPath(path): 142 return os.path.join('.', os.path.normpath(path) ) 149 abspath = os.path.abspath(__main__.__file__) 150 dname = os.path.dirname(abspath) 151 return os.path.join(dname, os.path.normpath(path) ) 143 152 144 153 # compare path even if form is different … … 151 160 for name in names: 152 161 path = os.path.join(dirname, name) 153 154 162 op( path ) 155 163 156 164 # Start the walk 157 os.path.walk('.', step, '') 165 abspath = os.path.abspath(__main__.__file__) 166 dname = os.path.dirname(abspath) 167 os.path.walk(dname, step, '') 158 168 159 169 ################################################################################ 160 170 # system 161 171 ################################################################################ 162 163 # parses the Makefile to find the machine type (32-bit / 64-bit)164 def getMachineType():165 sh('echo "void ?{}(int&a,int b){}int main(){return 0;}" > .dummy.c')166 ret, out = make('.dummy', silent = True)167 168 if ret != 0:169 print("Failed to identify architecture:")170 print(out)171 print("Stopping")172 rm( (".dummy.c",".dummy") )173 sys.exit(1)174 175 _, out = sh("file .dummy", print2stdout=False)176 rm( (".dummy.c",".dummy") )177 178 if settings.dry_run :179 return 'x64'180 181 return re.search(r"[^,]+,([^,]+),", out).group(1).strip()182 183 172 # count number of jobs to create 184 173 def jobCount( options, tests ): … … 244 233 else: 245 234 print(text) 246 247 settings.set_machine_default( getMachineType ) -
src/tests/test.py
r40a7d9c r91788fa 19 19 20 20 def matchTest(path): 21 match = re.search(" (\.[\w\/\-_]*)\/.expect\/([\w\-_]+)(\.[\w\-_]+)?\.txt", path)21 match = re.search("%s\/([\w\/\-_]*).expect\/([\w\-_]+)(\.[\w\-_]+)?\.txt" % settings.SRCDIR, path) 22 22 if match : 23 23 test = Test() … … 116 116 # running test functions 117 117 ################################################################################ 118 # fix the absolute paths in the output 119 def fixoutput( fname ): 120 if not is_ascii(fname): 121 return 122 123 file_replace(fname, "%s/" % settings.SRCDIR, "") 124 125 118 126 # logic to run a single test and return the result (No handling of printing or other test framework logic) 119 127 def run_single_test(test): 120 128 121 129 # find the output file based on the test name and options flag 130 exe_file = test.target_executable(); 122 131 out_file = test.target_output() 123 132 err_file = test.error_log() … … 129 138 130 139 # remove any outputs from the previous tests to prevent side effects 131 rm( (out_file, err_file, test.target()) )140 rm( (out_file, err_file, exe_file) ) 132 141 133 142 # build, skipping to next test on error … … 146 155 if make_ret == 0 or settings.dry_run: 147 156 before = time.time() 148 if settings.dry_run or fileIsExecutable( test.target()) :157 if settings.dry_run or fileIsExecutable(exe_file) : 149 158 # run test 150 retcode, _ = sh("timeout 60 %s > %s 2>&1" % ( test.target(), out_file), input = in_file)159 retcode, _ = sh("timeout 60 %s > %s 2>&1" % (exe_file, out_file), input = in_file) 151 160 else : 152 161 # simply cat the result into the output 153 retcode, _ = sh("cat %s > %s" % ( test.target(), out_file))162 retcode, _ = sh("cat %s > %s" % (exe_file, out_file)) 154 163 155 164 after = time.time() … … 170 179 else : 171 180 # fetch return code and error from the diff command 181 fixoutput(out_file) 172 182 retcode, error = diff(cmp_file, out_file) 173 183 … … 241 251 ################################################################################ 242 252 if __name__ == "__main__": 243 #always run from same folder244 chdir()245 253 246 254 # parse the command line arguments
Note: See TracChangeset
for help on using the changeset viewer.