Changeset e3215c5 for src/driver/cc1.cc


Ignore:
Timestamp:
May 13, 2018, 8:28:32 AM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
Children:
a83d08b
Parents:
a8de0f4
Message:

add gcc -x flag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/driver/cc1.cc

    ra8de0f4 re3215c5  
    1010// Created On       : Fri Aug 26 14:23:51 2005
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jan 18 08:14:21 2017
    13 // Update Count     : 81
     12// Last Modified On : Sat May 12 16:11:53 2018
     13// Update Count     : 94
    1414//
    1515
     
    3232string compiler_name( CFA_BACKEND_CC );                                 // path/name of C compiler
    3333
     34string D__GCC_X__( "-D__GCC_X__=" );
    3435string D__GCC_BPREFIX__( "-D__GCC_BPREFIX__=" );
    3536string D__CFA_FLAGPREFIX__( "-D__CFA_FLAG__=" );
     
    162163                                cargs[ncargs] = ( *new string( string( argv[i + 1] ).substr( D__CFA_FLAGPREFIX__.size() - 2 ) ) ).c_str();
    163164                                ncargs += 1;
     165                                i += 1;                                                                 // and the argument
     166                        } else if ( prefix( arg, D__GCC_X__ ) ) {
     167                                args[nargs] = "-x";
     168                                nargs += 1;
     169                                args[nargs] = ( *new string( arg.substr( D__GCC_X__.size() ) ) ).c_str(); // pass the flag along
     170                                nargs += 1;
     171                        } else if ( arg == "-D" && prefix( argv[i + 1], D__GCC_X__.substr(2) ) ) {
     172                                args[nargs] = "-x";
     173                                nargs += 1;
     174                                args[nargs] = ( *new string( string( argv[i + 1] ).substr( D__GCC_X__.size() - 2 ) ) ).c_str(); // pass the flag along
     175                                nargs += 1;
    164176                                i += 1;                                                                 // and the argument
    165177                        } else if ( prefix( arg, D__GCC_BPREFIX__ ) ) {
Note: See TracChangeset for help on using the changeset viewer.