Changeset 22f94a4 for driver/cfa.cc


Ignore:
Timestamp:
Aug 11, 2020, 4:40:15 PM (5 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
Children:
0d070ca
Parents:
07d867b (diff), 129674b (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 new-ast

File:
1 edited

Legend:

Unmodified
Added
Removed
  • driver/cfa.cc

    r07d867b r22f94a4  
    1010// Created On       : Tue Aug 20 13:44:49 2002
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jan 31 16:48:03 2020
    13 // Update Count     : 421
     12// Last Modified On : Sat May 30 18:28:23 2020
     13// Update Count     : 433
    1414//
    1515
     
    185185                                args[nargs++] = argv[i];                                // pass argument along
    186186                                if ( arg == "-o" ) o_file = i;                  // remember file
    187                         } else if ( arg == "-XCFA" ) {                          // CFA pass through
    188                                 i += 1;
    189                                 if ( i == argc ) continue;                              // next argument available ?
    190                                 Putenv( argv, argv[i] );
    191 
    192                                 // CFA specific arguments
     187                        } else if ( strncmp(arg.c_str(), "-XCFA", 5) == 0 ) {                           // CFA pass through
     188                                if(arg.size() == 5) {
     189                                        i += 1;
     190                                        if ( i == argc ) continue;                              // next argument available ?
     191                                        Putenv( argv, argv[i] );
     192
     193                                        // CFA specific arguments
     194                                }
     195                                else if(arg[5] == ',') {
     196                                        Putenv( argv, argv[i] + 6 );
     197
     198                                        // CFA specific arguments
     199                                }
     200                                else {
     201                                        args[nargs++] = argv[i];
     202                                }
    193203
    194204                        } else if ( arg == "-CFA" ) {
     
    243253                                        lang = arg.substr( 2 );
    244254                                } // if
    245                                 x_flag = lang != "none";
     255                                if ( x_flag ) {
     256                                        cerr << argv[0] << " warning, only one -x flag per compile, ignoring subsequent flag." << endl;
     257                                } else {
     258                                        x_flag = true;
     259                                        Putenv( argv, string( "-x=" ) + lang );
     260                                } // if
    246261                        } else if ( prefix( arg, "-std=" ) || prefix( arg, "--std=" ) ) {
    247262                                std_flag = true;                                                // -std=XX provided
     
    302317
    303318        #ifdef __x86_64__
    304         args[nargs++] = "-mcx16";                                                       // allow double-wide CAA
     319        args[nargs++] = "-mcx16";                                                       // allow double-wide CAS
    305320        #endif // __x86_64__
    306321
     
    420435                args[nargs++] = "-Wl,--pop-state";
    421436                args[nargs++] = "-pthread";
     437                #ifdef __x86_64__
     438                args[nargs++] = "-latomic";                                             // allow double-wide CAS
     439                #endif // __x86_64__
    422440                args[nargs++] = "-ldl";
    423441                args[nargs++] = "-lrt";
Note: See TracChangeset for help on using the changeset viewer.