Changeset 97392b69 for driver


Ignore:
Timestamp:
Jun 10, 2020, 4:19:30 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum, stuck-waitfor-destruct
Children:
ab8a023
Parents:
a5873bd (diff), ee06db5c (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.
Message:

Merge branch 'master' into relaxed_ready

Location:
driver
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • driver/cc1.cc

    ra5873bd r97392b69  
    1010// Created On       : Fri Aug 26 14:23:51 2005
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Oct 20 08:14:33 2019
    13 // Update Count     : 385
     12// Last Modified On : Sat May 30 18:09:05 2020
     13// Update Count     : 404
    1414//
    1515
     
    3838static string o_file;
    3939static string bprefix;
     40static string lang;                                                                             // -x flag
    4041
    4142
     
    7374                        if ( prefix( val, "-compiler=" ) ) {
    7475                                compiler_path = val.substr( 10 );
     76                        } else if ( prefix( val, "-x=" ) ) {
     77                                lang = val.substr( 3 );
    7578                        } // if
    7679                } // if
     
    100103                        } else if ( prefix( val, "-B=" ) ) {            // location of cfa-cpp
    101104                                bprefix = val.substr( 3 );
     105                        } else if ( prefix( val, "-x=" ) ) {            // ignore
    102106                        } else {                                                                        // normal flag for cfa-cpp
    103107                                args[nargs++] = ( *new string( arg.substr( arg.find_first_of( "=" ) + 1 ) ) ).c_str();
     
    247251
    248252                args[0] = compiler_path.c_str();
    249                 suffix( cpp_in, args, nargs );                                  // check suffix
     253                if ( lang.size() == 0 ) {
     254                        suffix( cpp_in, args, nargs );                          // check suffix
     255                } else {
     256                        args[nargs++] = "-x";
     257                        args[nargs++] = ( *new string( lang.c_str() ) ).c_str();
     258                } // if
    250259                args[nargs++] = cpp_in;
    251260                if ( o_flag ) {                                                                 // location for output
     
    280289
    281290                args[0] = compiler_path.c_str();
    282                 suffix( cpp_in, args, nargs );                                  // check suffix
     291                if ( lang.size() == 0 ) {
     292                        suffix( cpp_in, args, nargs );                          // check suffix
     293                } else {
     294                        args[nargs++] = "-x";
     295                        args[nargs++] = ( *new string( lang.c_str() ) ).c_str();
     296                } // if
    283297                args[nargs++] = cpp_in;                                                 // input to cpp
    284298                args[nargs] = nullptr;                                                  // terminate argument list
  • driver/cfa.cc

    ra5873bd r97392b69  
    1010// Created On       : Tue Aug 20 13:44:49 2002
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 18 13:26:26 2020
    13 // Update Count     : 424
     12// Last Modified On : Sat May 30 18:28:23 2020
     13// Update Count     : 433
    1414//
    1515
     
    243243                                        lang = arg.substr( 2 );
    244244                                } // if
    245                                 x_flag = lang != "none";
     245                                if ( x_flag ) {
     246                                        cerr << argv[0] << " warning, only one -x flag per compile, ignoring subsequent flag." << endl;
     247                                } else {
     248                                        x_flag = true;
     249                                        Putenv( argv, string( "-x=" ) + lang );
     250                                } // if
    246251                        } else if ( prefix( arg, "-std=" ) || prefix( arg, "--std=" ) ) {
    247252                                std_flag = true;                                                // -std=XX provided
     
    301306        } // for
    302307
     308        #ifdef __x86_64__
     309        args[nargs++] = "-mcx16";                                                       // allow double-wide CAS
     310        #endif // __x86_64__
     311
    303312        #ifdef __DEBUG_H__
    304313        cerr << "args:";
     
    415424                args[nargs++] = "-lcfa";
    416425                args[nargs++] = "-Wl,--pop-state";
     426                args[nargs++] = "-pthread";
    417427                #ifdef __x86_64__
    418                 args[nargs++] = "-mcx16";                                               // allow double-wide CAS
    419                 args[nargs++] = "-latomic";
     428                args[nargs++] = "-latomic";                                             // allow double-wide CAS
    420429                #endif // __x86_64__
    421                 args[nargs++] = "-pthread";
    422430                args[nargs++] = "-ldl";
    423431                args[nargs++] = "-lrt";
Note: See TracChangeset for help on using the changeset viewer.