@@ -386,6 +386,7 @@ process_option_arg(const Context& ctx,
386386 size_t & args_index,
387387 ArgumentProcessingState& state)
388388{
389+ PRINT (stderr, " XXX: process_option_arg {}\n " , args[args_index]);
389390 size_t & i = args_index;
390391
391392 if (option_should_be_ignored (args[i], ctx.ignore_options ())) {
@@ -438,6 +439,9 @@ process_option_arg(const Context& ctx,
438439 if (argpath[-1 ] == ' -' ) {
439440 ++argpath;
440441 }
442+ PRINT (stderr,
443+ " XXX: config.response_file_format() = {}\n " ,
444+ int (config.response_file_format ()));
441445 auto file_args =
442446 util::Args::from_response_file (argpath, config.response_file_format ());
443447 if (!file_args) {
@@ -642,6 +646,7 @@ process_option_arg(const Context& ctx,
642646 if (arg.length () > 3 && arg.starts_with (" -T" )
643647 && (arg[2 ] == ' c' || arg[2 ] == ' p' )) {
644648 args_info.input_file_prefix = arg.substr (0 , 3 );
649+ PRINT (stderr, " XXX: input file {}\n " , arg.substr (3 ));
645650 state.input_files .emplace_back (arg.substr (3 ));
646651 return Statistic::none;
647652 }
@@ -1412,6 +1417,10 @@ process_arg(const Context& ctx,
14121417 process_option_arg (ctx, args_info, config, args, args_index, state);
14131418
14141419 if (statistic && *statistic != Statistic::none) {
1420+ PRINT (stderr,
1421+ " XXX: returning error {} for {}\n " ,
1422+ int (*statistic),
1423+ args[args_index]);
14151424 return *statistic; // error found
14161425 }
14171426
@@ -1420,9 +1429,14 @@ process_arg(const Context& ctx,
14201429 LOG (" Creating PCH with MSVC, disabling base directory" );
14211430 config.set_base_dirs ({});
14221431 restart = true ;
1432+ PRINT (stderr, " XXX: found /Yc, restarting\n " );
14231433 }
14241434
14251435 if (statistic) {
1436+ PRINT (stderr,
1437+ " XXX: returning non-error {} for {}\n " ,
1438+ int (*statistic),
1439+ args[args_index]);
14261440 return *statistic; // processed option without error
14271441 }
14281442
@@ -1435,6 +1449,9 @@ process_arg(const Context& ctx,
14351449 // file when code is testing compiler flags.
14361450 if (!util::is_dev_null_path (args[i])) {
14371451 if (!DirEntry (args[i]).is_regular_file ()) {
1452+ PRINT (stderr,
1453+ " XXX: {} is not a regular file, not considering as input file\n " ,
1454+ args[i]);
14381455 LOG (" {} is not a regular file, not considering as input file" , args[i]);
14391456 state.add_common_arg (args[i]);
14401457 return Statistic::none;
@@ -1443,8 +1460,10 @@ process_arg(const Context& ctx,
14431460
14441461 if (fs::exists (args[i])) {
14451462 LOG (" Detected input file: {}" , args[i]);
1463+ PRINT (stderr, " XXX: input file {}\n " , args[i]);
14461464 state.input_files .emplace_back (args[i]);
14471465 } else {
1466+ PRINT (stderr, " XXX: input file {} does not exist\n " , args[i]);
14481467 LOG (" Not considering {} an input file since it doesn't exist" , args[i]);
14491468 state.add_common_arg (args[i]);
14501469 }
@@ -1515,6 +1534,7 @@ process_args(Context& ctx)
15151534
15161535 if (state.input_files .empty ()) {
15171536 LOG (" No input file found" );
1537+ PRINT (stderr, " XXX: state.input_files.empty()\n " );
15181538 return tl::unexpected (Statistic::no_input_file);
15191539 }
15201540 if (state.input_files .size () > 1 ) {
0 commit comments