Changeset 807ce84


Ignore:
Timestamp:
Jun 26, 2017, 12:05:01 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
6385d62
Parents:
c038214
Message:

Added builtins.c for cfa builtins

Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    rc038214 r807ce84  
    3131
    3232src/prelude/builtins.cf
    33 src/prelude/builtins.c
    3433src/prelude/gcc-builtins.cf
    3534src/prelude/gcc-builtins.c
  • src/main.cc

    rc038214 r807ce84  
    186186                if ( ! nopreludep ) {                                                   // include gcc builtins
    187187                        // -l is for initial build ONLY and builtins.cf is not in the lib directory so access it here.
     188                        // Read to cfa builtins, if not generating the cfa library
     189                        FILE * builtins = fopen( libcfap | treep ? "../prelude/builtins.cf" : CFA_LIBDIR "/builtins.cf", "r" );
     190                        assertf( builtins, "cannot open builtins.cf\n" );
     191                        parse( builtins, LinkageSpec::Compiler );
     192
     193                        // Read to gcc builtins, if not generating the cfa library
    188194                        FILE * gcc_builtins = fopen( libcfap | treep ? "../prelude/gcc-builtins.cf" : CFA_LIBDIR "/gcc-builtins.cf", "r" );
    189195                        assertf( gcc_builtins, "cannot open gcc-builtins.cf\n" );
  • src/prelude/Makefile.am

    rc038214 r807ce84  
    2020# put into lib for now
    2121cfalibdir = ${CFA_LIBDIR}
    22 cfalib_DATA = gcc-builtins.cf extras.cf prelude.cf bootloader.c
     22cfalib_DATA = gcc-builtins.cf builtins.cf extras.cf prelude.cf bootloader.c
    2323noinst_DATA = ../libcfa/libcfa-prelude.c
    2424
     
    3838prototypes.awk :
    3939
    40 ../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf ${abs_top_srcdir}/src/driver/cfa-cpp
     40# create forward declarations for cfa builtins
     41builtins.cf : builtins.c
     42        ${AM_V_GEN}@BACKEND_CC@ -E -P ${<} -o ${@}
     43
     44../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_srcdir}/src/driver/cfa-cpp
    4145        ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -l prelude.cf $@  # use src/cfa-cpp as not in lib until after install
    4246
    43 bootloader.c : bootloader.cf prelude.cf extras.cf gcc-builtins.cf ${abs_top_srcdir}/src/driver/cfa-cpp
     47bootloader.c : bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_srcdir}/src/driver/cfa-cpp
    4448        ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -tpmL bootloader.cf $@  # use src/cfa-cpp as not in lib until after install
    4549
    46 MAINTAINERCLEANFILES = gcc-builtins.c gcc-builtins.cf extras.cf bootloader.c ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
     50MAINTAINERCLEANFILES = gcc-builtins.c gcc-builtins.cf builtins.cf extras.cf bootloader.c ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
  • src/prelude/Makefile.in

    rc038214 r807ce84  
    211211# put into lib for now
    212212cfalibdir = ${CFA_LIBDIR}
    213 cfalib_DATA = gcc-builtins.cf extras.cf prelude.cf bootloader.c
     213cfalib_DATA = gcc-builtins.cf builtins.cf extras.cf prelude.cf bootloader.c
    214214noinst_DATA = ../libcfa/libcfa-prelude.c
    215 MAINTAINERCLEANFILES = gcc-builtins.c gcc-builtins.cf extras.cf bootloader.c ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
     215MAINTAINERCLEANFILES = gcc-builtins.c gcc-builtins.cf builtins.cf extras.cf bootloader.c ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
    216216all: all-am
    217217
     
    435435prototypes.awk :
    436436
    437 ../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf ${abs_top_srcdir}/src/driver/cfa-cpp
     437# create forward declarations for cfa builtins
     438builtins.cf : builtins.c
     439        ${AM_V_GEN}@BACKEND_CC@ -E -P ${<} -o ${@}
     440
     441../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_srcdir}/src/driver/cfa-cpp
    438442        ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -l prelude.cf $@  # use src/cfa-cpp as not in lib until after install
    439443
    440 bootloader.c : bootloader.cf prelude.cf extras.cf gcc-builtins.cf ${abs_top_srcdir}/src/driver/cfa-cpp
     444bootloader.c : bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_srcdir}/src/driver/cfa-cpp
    441445        ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -tpmL bootloader.cf $@  # use src/cfa-cpp as not in lib until after install
    442446
Note: See TracChangeset for help on using the changeset viewer.