From a4a85b7bbf93eadc56df90b1ac3f24e5955dd8e4 Mon Sep 17 00:00:00 2001 From: Brennan Cottrell <38633801+Wrimo@users.noreply.github.com> Date: Tue, 26 Mar 2024 04:33:47 -0400 Subject: [PATCH] Added print-input command line argument (#1175) * added print-input command line argument --- releasenotes.md | 1 + src/build/build.h | 2 ++ src/build/build_options.c | 6 ++++++ src/build/builder.c | 1 + src/compiler/compiler.c | 9 +++++++++ 5 files changed, 19 insertions(+) diff --git a/releasenotes.md b/releasenotes.md index b7ba215aa..c0a2175ba 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -4,6 +4,7 @@ ### Changes / improvements - Support `defer (catch err)` +- Added `print-input` command argument to print all files used for compilation ### Fixes None diff --git a/src/build/build.h b/src/build/build.h index b1904d7a9..e87b915d8 100644 --- a/src/build/build.h +++ b/src/build/build.h @@ -360,6 +360,7 @@ typedef struct BuildOptions_ bool no_obj; bool read_stdin; bool print_output; + bool print_input; const char *panicfn; const char *benchfn; const char *testfn; @@ -462,6 +463,7 @@ typedef struct bool testing; bool read_stdin; bool print_output; + bool print_input; bool print_linking; bool no_entry; int build_threads; diff --git a/src/build/build_options.c b/src/build/build_options.c index 4a4150a56..219c2e4ba 100644 --- a/src/build/build_options.c +++ b/src/build/build_options.c @@ -167,6 +167,7 @@ static void usage(void) OUTPUT(" --list-type-properties - List all type properties."); OUTPUT(""); OUTPUT(" --print-output - Print the object files created to stdout."); + OUTPUT(" --print-input - Print inputted C3 files to stdout."); OUTPUT(""); OUTPUT(" --winsdk - Set the directory for Windows system library files for cross compilation."); OUTPUT(" --wincrt=