Changeset b110bcc for driver/cfa.cc
- Timestamp:
- Apr 21, 2023, 5:36:12 PM (2 years ago)
- Branches:
- ADT, master
- Children:
- 28f8f15, 6e4c44d
- Parents:
- 2ed94a9 (diff), 699a97d (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
driver/cfa.cc
r2ed94a9 rb110bcc 10 10 // Created On : Tue Aug 20 13:44:49 2002 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jul 14 21:55:12 202113 // Update Count : 4 6712 // Last Modified On : Mon Apr 10 21:16:00 2023 13 // Update Count : 476 14 14 // 15 15 … … 44 44 static int flags = 0; 45 45 46 // This allocation 'leaks' memory from the program to the execution 47 // environment, as putenv does not manage the storage of the string used 48 // as an environment variable. This leak is necessary to ensure the 49 // underlying C string is allocated long enough. 46 50 if ( putenv( (char *)( *new string( string( __CFA_FLAGPREFIX__ + to_string( flags++ ) + "__=" ) + arg ) ).c_str() ) ) { 47 51 cerr << argv[0] << " error, cannot set environment variable." << endl; … … 198 202 } // if 199 203 } else if ( arg == "-CFA" ) { 200 CFA_flag = true; // strip the-CFA flag204 CFA_flag = true; // strip -CFA flag 201 205 link = false; 202 206 args[nargs++] = "-fsyntax-only"; // stop after stage 2 203 207 } else if ( arg == "-debug" ) { 204 debug = true; // strip thedebug flag208 debug = true; // strip debug flag 205 209 } else if ( arg == "-nodebug" ) { 206 debug = false; // strip thenodebug flag210 debug = false; // strip nodebug flag 207 211 } else if ( arg == "-quiet" ) { 208 quiet = true; // strip thequiet flag212 quiet = true; // strip quiet flag 209 213 } else if ( arg == "-noquiet" ) { 210 quiet = false; // strip the noquiet flag 214 quiet = false; // strip noquiet flag 215 } else if ( arg == "-invariant" ) { 216 Putenv( argv, "-" + arg ); 217 } else if ( arg == "--invariant" ) { 218 Putenv( argv, arg ); 211 219 } else if ( arg == "-no-include-stdhdr" ) { 212 noincstd_flag = true; // strip theno-include-stdhdr flag220 noincstd_flag = true; // strip no-include-stdhdr flag 213 221 } else if ( arg == "-nolib" ) { 214 nolib = true; // strip thenolib flag222 nolib = true; // strip nolib flag 215 223 } else if ( arg == "-help" ) { 216 help = true; // strip thehelp flag224 help = true; // strip help flag 217 225 } else if ( arg == "-nohelp" ) { 218 help = false; // strip thenohelp flag226 help = false; // strip nohelp flag 219 227 } else if ( arg == "-cfalib") { 220 228 compiling_libs = true; … … 274 282 } // if 275 283 } else if ( prefix( arg, "-B" ) ) { 276 bprefix = arg.substr(2); // strip the-B flag284 bprefix = arg.substr(2); // strip -B flag 277 285 } else if ( arg == "-c" || arg == "-S" || arg == "-E" || arg == "-M" || arg == "-MM" ) { 278 286 args[nargs++] = argv[i]; // pass flag along … … 444 452 445 453 args[nargs++] = "-fexceptions"; // add exception flags (unconditionally) 454 args[nargs++] = "-D_GNU_SOURCE"; // force gnu libraries 446 455 447 456 // add flags based on the type of compile
Note:
See TracChangeset
for help on using the changeset viewer.