Changeset 4dcaed2
- Timestamp:
- Aug 5, 2018, 1:13:35 PM (6 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:
- 37fe352
- Parents:
- 534e4e4
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
configure
r534e4e4 r4dcaed2 3279 3279 TOP_SRCDIR=$ac_pwd/$ac_confdir/ 3280 3280 TOP_BUILDDIR=$ac_pwd/ 3281 PRELUDE_BUILDDIR=$ac_pwd/libcfa-x86_64-debug/prelude/3282 3281 3283 3282 … … 3289 3288 cat >>confdefs.h <<_ACEOF 3290 3289 #define TOP_BUILDDIR "$TOP_BUILDDIR" 3291 _ACEOF3292 3293 3294 cat >>confdefs.h <<_ACEOF3295 #define PRELUDE_BUILDDIR "$PRELUDE_BUILDDIR"3296 3290 _ACEOF 3297 3291 -
configure.ac
r534e4e4 r4dcaed2 90 90 TOP_SRCDIR=$ac_pwd/$ac_confdir/ 91 91 TOP_BUILDDIR=$ac_pwd/ 92 PRELUDE_BUILDDIR=$ac_pwd/libcfa-x86_64-debug/prelude/93 92 94 93 AC_DEFINE_UNQUOTED(TOP_SRCDIR, "$TOP_SRCDIR", [Top src directory]) 95 94 AC_DEFINE_UNQUOTED(TOP_BUILDDIR, "$TOP_BUILDDIR", [Top build directory]) 96 AC_DEFINE_UNQUOTED(PRELUDE_BUILDDIR, "$PRELUDE_BUILDDIR", [Directory where the prelude files are built])97 95 98 96 DRIVER_DIR=${TOP_BUILDDIR}driver/ -
libcfa/prelude/Makefile.am
r534e4e4 r4dcaed2 59 59 60 60 ../src/prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@ 61 ${AM_V_GEN}@CFACPP@ - l prelude.cf $@ # use src/cfa-cpp as not in lib until after install61 ${AM_V_GEN}@CFACPP@ --prelude-dir=${builddir} -l prelude.cf $@ # use src/cfa-cpp as not in lib until after install 62 62 63 63 bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@ 64 ${AM_V_GEN}@CFACPP@ - tpm ${srcdir}/bootloader.cf $@ # use src/cfa-cpp as not in lib until after install64 ${AM_V_GEN}@CFACPP@ --prelude-dir=${builddir} -tpm ${srcdir}/bootloader.cf $@ # use src/cfa-cpp as not in lib until after install 65 65 66 66 maintainer-clean-local : -
libcfa/prelude/Makefile.in
r534e4e4 r4dcaed2 516 516 517 517 ../src/prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@ 518 ${AM_V_GEN}@CFACPP@ - l prelude.cf $@ # use src/cfa-cpp as not in lib until after install518 ${AM_V_GEN}@CFACPP@ --prelude-dir=${builddir} -l prelude.cf $@ # use src/cfa-cpp as not in lib until after install 519 519 520 520 bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@ 521 ${AM_V_GEN}@CFACPP@ - tpm ${srcdir}/bootloader.cf $@ # use src/cfa-cpp as not in lib until after install521 ${AM_V_GEN}@CFACPP@ --prelude-dir=${builddir} -tpm ${srcdir}/bootloader.cf $@ # use src/cfa-cpp as not in lib until after install 522 522 523 523 maintainer-clean-local : -
libcfa/src/Makefile.am
r534e4e4 r4dcaed2 28 28 # use -no-include-stdhdr to prevent rebuild cycles 29 29 # The built sources must not depend on the installed headers 30 AM_CFAFLAGS = -quiet -no-include-stdhdr -XCFA -t -B@DRIVER_DIR@ - imacros prelude.c -I$(srcdir)/stdhdr30 AM_CFAFLAGS = -quiet -no-include-stdhdr -XCFA -t -B@DRIVER_DIR@ -XCFA --prelude-dir=$(top_builddir)/prelude -imacros prelude.c -I$(srcdir)/stdhdr 31 31 AM_CFLAGS = -g -Wall -Wno-unused-function 32 32 CFACC = @CFACC@ … … 43 43 44 44 # not all platforms support concurrency, add option do disable it 45 libsrc += concurrency/CtxSwitch-@host_ alias@.S concurrency/alarm.cfa concurrency/invoke.c concurrency/preemption.cfa45 libsrc += concurrency/CtxSwitch-@host_cpu@.S concurrency/alarm.cfa concurrency/invoke.c concurrency/preemption.cfa 46 46 47 47 # extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing -
libcfa/src/Makefile.in
r534e4e4 r4dcaed2 151 151 interpose.$(OBJEXT) bits/debug.$(OBJEXT) assert.$(OBJEXT) \ 152 152 exception.$(OBJEXT) virtual.$(OBJEXT) heap.$(OBJEXT) \ 153 $(am__objects_1) concurrency/CtxSwitch-@host_ alias@.$(OBJEXT) \153 $(am__objects_1) concurrency/CtxSwitch-@host_cpu@.$(OBJEXT) \ 154 154 concurrency/alarm.$(OBJEXT) concurrency/invoke.$(OBJEXT) \ 155 155 concurrency/preemption.$(OBJEXT) … … 344 344 # use -no-include-stdhdr to prevent rebuild cycles 345 345 # The built sources must not depend on the installed headers 346 AM_CFAFLAGS = -quiet -no-include-stdhdr -XCFA -t -B@DRIVER_DIR@ - imacros prelude.c -I$(srcdir)/stdhdr346 AM_CFAFLAGS = -quiet -no-include-stdhdr -XCFA -t -B@DRIVER_DIR@ -XCFA --prelude-dir=$(top_builddir)/prelude -imacros prelude.c -I$(srcdir)/stdhdr 347 347 AM_CFLAGS = -g -Wall -Wno-unused-function 348 348 … … 357 357 libsrc = prelude.c startup.cfa interpose.cfa bits/debug.cfa assert.cfa \ 358 358 exception.c virtual.c heap.cfa ${headers:=.cfa} \ 359 concurrency/CtxSwitch-@host_ alias@.S concurrency/alarm.cfa \359 concurrency/CtxSwitch-@host_cpu@.S concurrency/alarm.cfa \ 360 360 concurrency/invoke.c concurrency/preemption.cfa 361 361 libcfa_a_SOURCES = ${libsrc} … … 479 479 concurrency/mutex.$(OBJEXT): concurrency/$(am__dirstamp) \ 480 480 concurrency/$(DEPDIR)/$(am__dirstamp) 481 concurrency/CtxSwitch-@host_ alias@.$(OBJEXT): \481 concurrency/CtxSwitch-@host_cpu@.$(OBJEXT): \ 482 482 concurrency/$(am__dirstamp) \ 483 483 concurrency/$(DEPDIR)/$(am__dirstamp) … … 506 506 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude.Po@am__quote@ 507 507 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virtual.Po@am__quote@ 508 @AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/CtxSwitch-@host_ alias@.Po@am__quote@508 @AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/CtxSwitch-@host_cpu@.Po@am__quote@ 509 509 @AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/invoke.Po@am__quote@ 510 510 -
src/config.h.in
r534e4e4 r4dcaed2 141 141 /* Define to the version of this package. */ 142 142 #undef PACKAGE_VERSION 143 144 /* Directory where the prelude files are built */145 #undef PRELUDE_BUILDDIR146 143 147 144 /* If using the C implementation of alloca, define if you know the -
src/main.cc
r534e4e4 r4dcaed2 98 98 linemarks = false; 99 99 100 std::string PreludeDirector = ""; 101 100 102 static void parse_cmdline( int argc, char *argv[], const char *& filename ); 101 103 static void parse( FILE * input, LinkageSpec::Spec linkage, bool shouldExit = false ); … … 207 209 // -l is for initial build ONLY and builtins.cf is not in the lib directory so access it here. 208 210 211 assertf( (libcfap | treep) != PreludeDirector.empty(), "When building in tree option --prelude-dir must be used." ); 212 209 213 // Read to gcc builtins, if not generating the cfa library 210 FILE * gcc_builtins = fopen( libcfap | treep ? PRELUDE_BUILDDIR "/gcc-builtins.cf": CFA_LIBDIR "/gcc-builtins.cf", "r" );214 FILE * gcc_builtins = fopen( libcfap | treep ? (PreludeDirector + "/gcc-builtins.cf").c_str() : CFA_LIBDIR "/gcc-builtins.cf", "r" ); 211 215 assertf( gcc_builtins, "cannot open gcc-builtins.cf\n" ); 212 216 parse( gcc_builtins, LinkageSpec::Compiler ); 213 217 214 218 // read the extra prelude in, if not generating the cfa library 215 FILE * extras = fopen( libcfap | treep ? PRELUDE_BUILDDIR "/extras.cf": CFA_LIBDIR "/extras.cf", "r" );219 FILE * extras = fopen( libcfap | treep ? (PreludeDirector + "/extras.cf").c_str() : CFA_LIBDIR "/extras.cf", "r" ); 216 220 assertf( extras, "cannot open extras.cf\n" ); 217 221 parse( extras, LinkageSpec::BuiltinC ); … … 219 223 if ( ! libcfap ) { 220 224 // read the prelude in, if not generating the cfa library 221 FILE * prelude = fopen( treep ? PRELUDE_BUILDDIR "/prelude.cf": CFA_LIBDIR "/prelude.cf", "r" );225 FILE * prelude = fopen( treep ? (PreludeDirector + "/prelude.cf").c_str() : CFA_LIBDIR "/prelude.cf", "r" ); 222 226 assertf( prelude, "cannot open prelude.cf\n" ); 223 227 parse( prelude, LinkageSpec::Intrinsic ); 224 228 225 229 // Read to cfa builtins, if not generating the cfa library 226 FILE * builtins = fopen( libcfap | treep ? PRELUDE_BUILDDIR "/builtins.cf": CFA_LIBDIR "/builtins.cf", "r" );230 FILE * builtins = fopen( libcfap | treep ? (PreludeDirector + "/builtins.cf").c_str() : CFA_LIBDIR "/builtins.cf", "r" ); 227 231 assertf( builtins, "cannot open builtins.cf\n" ); 228 232 parse( builtins, LinkageSpec::BuiltinCFA ); … … 348 352 PASS( "codegen", CodeGen::generate( translationUnit, *output, ! noprotop, prettycodegenp, true, linemarks ) ); 349 353 350 CodeGen::FixMain::fix( *output, treep ? PRELUDE_BUILDDIR "/bootloader.c": CFA_LIBDIR "/bootloader.c" );354 CodeGen::FixMain::fix( *output, treep ? (PreludeDirector + "/bootloader.c").c_str() : CFA_LIBDIR "/bootloader.c" ); 351 355 if ( output != &cout ) { 352 356 delete output; … … 397 401 398 402 void parse_cmdline( int argc, char * argv[], const char *& filename ) { 399 enum { Ast, Bbox, Bresolver, CtorInitFix, DeclStats, Expr, ExprAlt, Grammar, LibCFA, Linemarks, Nolinemarks, Nopreamble, Parse, Pr ototypes, Resolver, Symbol, Tree, TupleExpansion, Validate, };403 enum { Ast, Bbox, Bresolver, CtorInitFix, DeclStats, Expr, ExprAlt, Grammar, LibCFA, Linemarks, Nolinemarks, Nopreamble, Parse, PreludeDir, Prototypes, Resolver, Symbol, Tree, TupleExpansion, Validate, }; 400 404 401 405 static struct option long_opts[] = { … … 413 417 { "no-preamble", no_argument, 0, Nopreamble }, 414 418 { "parse", no_argument, 0, Parse }, 419 { "prelude-dir", required_argument, 0, PreludeDir }, 415 420 { "no-prototypes", no_argument, 0, Prototypes }, 416 421 { "resolver", no_argument, 0, Resolver }, … … 485 490 case 'p': // generate prototypes for preamble functions 486 491 noprotop = true; 492 break; 493 case PreludeDir: 494 PreludeDirector = optarg; 487 495 break; 488 496 case 'm': // don't replace the main
Note: See TracChangeset
for help on using the changeset viewer.