From e2bcd3b8aa4c651a35cc419490b15d5b37f2afe3 Mon Sep 17 00:00:00 2001 From: g4titanx Date: Tue, 16 Apr 2024 02:19:30 +0100 Subject: [PATCH 1/5] updated build system script commands --- build_system/src/build.rs | 6 ++++-- build_system/src/main.rs | 28 +++++++++++++++++----------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/build_system/src/build.rs b/build_system/src/build.rs index 6313e4ffccb..ed081fbbade 100644 --- a/build_system/src/build.rs +++ b/build_system/src/build.rs @@ -14,9 +14,10 @@ struct BuildArg { } impl BuildArg { + /// Creates a new `BuildArg` instance by parsing command-line arguments. fn new() -> Result, String> { let mut build_arg = Self::default(); - // We skip binary name and the `build` command. + // Skip binary name and the `build` command. let mut args = std::env::args().skip(2); while let Some(arg) = args.next() { @@ -211,6 +212,7 @@ fn build_codegen(args: &mut BuildArg) -> Result<(), String> { Ok(()) } +/// Executes the build process. pub fn run() -> Result<(), String> { let mut args = match BuildArg::new()? { Some(args) => args, @@ -219,4 +221,4 @@ pub fn run() -> Result<(), String> { args.config_info.setup_gcc_path()?; build_codegen(&mut args)?; Ok(()) -} +} \ No newline at end of file diff --git a/build_system/src/main.rs b/build_system/src/main.rs index 1bfba0f9828..158f8d26dd7 100644 --- a/build_system/src/main.rs +++ b/build_system/src/main.rs @@ -26,17 +26,23 @@ macro_rules! arg_error { fn usage() { println!( "\ -Available commands for build_system: +rustc_codegen_gcc build system - cargo : Run cargo command - rustc : Run rustc command - clean : Run clean command - prepare : Run prepare command - build : Run build command - test : Run test command - info : Run info command - clone-gcc : Run clone-gcc command - --help : Show this message" +Usage: build_system [command] [options] + +Options: + --help : Displays this help message. + +Commands: + + cargo : Executes a cargo command. + clean : Cleans the build directory, removing all compiled files and artifacts. + prepare : Prepares the environment for building, including fetching dependencies and setting up configurations. + build : Compiles the project. + test : Runs tests for the project. + info : Displays information about the build environment and project configuration. + clone-gcc : Clones the GCC compiler from a specified source. + " ); } @@ -90,4 +96,4 @@ fn main() { eprintln!("Command failed to run: {e}"); process::exit(1); } -} +} \ No newline at end of file From af62ce1155806c8fdaa0ee88ddfb7734aa2b10fb Mon Sep 17 00:00:00 2001 From: g4titanx Date: Tue, 16 Apr 2024 04:01:48 +0100 Subject: [PATCH 2/5] updated build system script commands --- build_system/src/build.rs | 2 +- build_system/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build_system/src/build.rs b/build_system/src/build.rs index ed081fbbade..92f4b890e34 100644 --- a/build_system/src/build.rs +++ b/build_system/src/build.rs @@ -221,4 +221,4 @@ pub fn run() -> Result<(), String> { args.config_info.setup_gcc_path()?; build_codegen(&mut args)?; Ok(()) -} \ No newline at end of file +} diff --git a/build_system/src/main.rs b/build_system/src/main.rs index 158f8d26dd7..7818790a70a 100644 --- a/build_system/src/main.rs +++ b/build_system/src/main.rs @@ -96,4 +96,4 @@ fn main() { eprintln!("Command failed to run: {e}"); process::exit(1); } -} \ No newline at end of file +} From c793dff426e265235ee11aab91a26296cb84bfd0 Mon Sep 17 00:00:00 2001 From: g4titanx Date: Tue, 16 Apr 2024 16:30:29 +0100 Subject: [PATCH 3/5] updated build system script commands --- build_system/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_system/src/main.rs b/build_system/src/main.rs index 7818790a70a..6572af0bc56 100644 --- a/build_system/src/main.rs +++ b/build_system/src/main.rs @@ -34,11 +34,11 @@ Options: --help : Displays this help message. Commands: - cargo : Executes a cargo command. + rustc : Compiles the program using the GCC compiler. clean : Cleans the build directory, removing all compiled files and artifacts. prepare : Prepares the environment for building, including fetching dependencies and setting up configurations. - build : Compiles the project. + build : Initiates the compilation process for the project, producing executable binaries. test : Runs tests for the project. info : Displays information about the build environment and project configuration. clone-gcc : Clones the GCC compiler from a specified source. From 638547a48c746870861f6e1c81b77232bf11fcde Mon Sep 17 00:00:00 2001 From: g4titanx Date: Tue, 16 Apr 2024 17:42:12 +0100 Subject: [PATCH 4/5] updated build system script commands --- build_system/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_system/src/main.rs b/build_system/src/main.rs index 6572af0bc56..4bbe4e54f0f 100644 --- a/build_system/src/main.rs +++ b/build_system/src/main.rs @@ -38,7 +38,7 @@ Commands: rustc : Compiles the program using the GCC compiler. clean : Cleans the build directory, removing all compiled files and artifacts. prepare : Prepares the environment for building, including fetching dependencies and setting up configurations. - build : Initiates the compilation process for the project, producing executable binaries. + build : Compiles the project. test : Runs tests for the project. info : Displays information about the build environment and project configuration. clone-gcc : Clones the GCC compiler from a specified source. From a063f0e4d21943f0870bb9e8a21790e48b38bbd8 Mon Sep 17 00:00:00 2001 From: g4titanx Date: Tue, 16 Apr 2024 22:18:49 +0100 Subject: [PATCH 5/5] updated build system script commands --- build_system/src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build_system/src/main.rs b/build_system/src/main.rs index 4bbe4e54f0f..9a30490f621 100644 --- a/build_system/src/main.rs +++ b/build_system/src/main.rs @@ -41,8 +41,7 @@ Commands: build : Compiles the project. test : Runs tests for the project. info : Displays information about the build environment and project configuration. - clone-gcc : Clones the GCC compiler from a specified source. - " + clone-gcc : Clones the GCC compiler from a specified source." ); }