Changeset 1ee048fd
- Timestamp:
- Aug 13, 2019, 3:25:57 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- d65f92c
- Parents:
- ef46abb
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
driver/cfa.cc
ref46abb r1ee048fd 38 38 39 39 40 bool prefix( string arg, stringpre ) {40 bool prefix( const string & arg, const string & pre ) { 41 41 return arg.substr( 0, pre.size() ) == pre; 42 42 } // prefix 43 43 44 bool suffix( string arg ) { 45 enum { NumSuffixes = 3 }; 46 static const string suffixes[NumSuffixes] = { "cfa", "hfa", "ifa" }; 47 //std::cerr << arg << std::endl; 48 size_t dot = arg.find_last_of( "." ); 49 //std::cerr << dot << " " << (dot != string::npos ? arg.substr( dot + 1 ) : "fred" ) << std::endl; 50 if ( dot == string::npos ) return false; 51 const string * end = suffixes + NumSuffixes; 52 return std::find( suffixes, end, arg.substr( dot + 1 ) ) != end; 44 inline bool ends_with(const string & str, const string & sfix) { 45 if (sfix.size() > str.size()) return false; 46 return std::equal(str.rbegin(), str.rbegin() + sfix.size(), sfix.rbegin(), sfix.rend()); 47 } 48 49 bool suffix( const string & arg ) { 50 static const string suffixes[] = { ".cfa", ".hfa", ".cfa.ii" }; 51 for(const auto sfix : suffixes) { 52 if(arg.size() <= sfix.size()) continue; 53 size_t pos = arg.find_last_of(sfix); 54 size_t exp = (arg.size() - 1); 55 if(pos == exp) return true; 56 } 57 return false; 53 58 } // suffix 54 59 … … 116 121 bool m64 = false; // -m64 flag 117 122 bool intree = false; 123 bool compiling_libs = false; 118 124 bool disttree = false; 119 125 … … 133 139 134 140 // process command-line arguments 135 136 args[nargs] = "-x"; // turn off language137 nargs += 1;138 args[nargs] = "c";139 nargs += 1;140 141 141 142 for ( int i = 1; i < argc; i += 1 ) { … … 183 184 } else if ( arg == "-dist-tree" ) { 184 185 disttree = true; 186 } else if ( arg == "-cfalib") { 187 compiling_libs = true; 185 188 } else if ( arg == "-compiler" ) { 186 189 // use the user specified compiler … … 375 378 } else { 376 379 libbase = TOP_BUILDDIR "libcfa/"; 380 } 381 382 if( compiling_libs ) { 377 383 args[nargs] = "-D__CFA_FLAG__=-t"; 378 384 nargs += 1; … … 564 570 cerr << "args:" << endl; 565 571 for ( int i = 0; args[i] != NULL; i += 1 ) { 566 cerr << " \"" << args[i] << "\" " << endl;572 cerr << " \"" << args[i] << "\" "; 567 573 } // for 574 cerr << endl; 568 575 #endif // __DEBUG_H__ 569 576 -
libcfa/prelude/Makefile.am
ref46abb r1ee048fd 72 72 distribution: @LOCAL_CFACC@ @CFACPP@ gcc-builtins.cf builtins.cf extras.cf prelude.cfa bootloader.c $(srcdir)/../../tools/build/push2dist.sh 73 73 ${AM_V_GEN}$(srcdir)/../../tools/build/push2dist.sh @CFADIR_HASH@ 74 echo "Dummy file to track distribution to remote hosts" > ${@}74 @echo "Dummy file to track distribution to remote hosts" > ${@} 75 75 76 76 all: all-am distribution -
libcfa/prelude/Makefile.in
ref46abb r1ee048fd 572 572 @ENABLE_DISTCC_TRUE@distribution: @LOCAL_CFACC@ @CFACPP@ gcc-builtins.cf builtins.cf extras.cf prelude.cfa bootloader.c $(srcdir)/../../tools/build/push2dist.sh 573 573 @ENABLE_DISTCC_TRUE@ ${AM_V_GEN}$(srcdir)/../../tools/build/push2dist.sh @CFADIR_HASH@ 574 @ENABLE_DISTCC_TRUE@ echo "Dummy file to track distribution to remote hosts" > ${@}574 @ENABLE_DISTCC_TRUE@ @echo "Dummy file to track distribution to remote hosts" > ${@} 575 575 576 576 @ENABLE_DISTCC_TRUE@all: all-am distribution -
libcfa/src/Makefile.am
ref46abb r1ee048fd 30 30 # use -no-include-stdhdr to prevent rebuild cycles 31 31 # The built sources must not depend on the installed headers 32 AM_CFAFLAGS = -quiet @PRELUDEFLAG@ -I$(srcdir)/stdhdr@CONFIG_CFAFLAGS@32 AM_CFAFLAGS = -quiet -cfalib @PRELUDEFLAG@ -I$(srcdir)/stdhdr @CONFIG_CFAFLAGS@ 33 33 AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@ 34 34 AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@ -
libcfa/src/Makefile.in
ref46abb r1ee048fd 443 443 # use -no-include-stdhdr to prevent rebuild cycles 444 444 # The built sources must not depend on the installed headers 445 AM_CFAFLAGS = -quiet @PRELUDEFLAG@ -I$(srcdir)/stdhdr@CONFIG_CFAFLAGS@445 AM_CFAFLAGS = -quiet -cfalib @PRELUDEFLAG@ -I$(srcdir)/stdhdr @CONFIG_CFAFLAGS@ 446 446 AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@ 447 447 AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
Note: See TracChangeset
for help on using the changeset viewer.