File tree 2 files changed +18
-11
lines changed
2 files changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,10 @@ struct BuildArg {
14
14
}
15
15
16
16
impl BuildArg {
17
+ /// Creates a new `BuildArg` instance by parsing command-line arguments.
17
18
fn new ( ) -> Result < Option < Self > , String > {
18
19
let mut build_arg = Self :: default ( ) ;
19
- // We skip binary name and the `build` command.
20
+ // Skip binary name and the `build` command.
20
21
let mut args = std:: env:: args ( ) . skip ( 2 ) ;
21
22
22
23
while let Some ( arg) = args. next ( ) {
@@ -211,6 +212,7 @@ fn build_codegen(args: &mut BuildArg) -> Result<(), String> {
211
212
Ok ( ( ) )
212
213
}
213
214
215
+ /// Executes the build process.
214
216
pub fn run ( ) -> Result < ( ) , String > {
215
217
let mut args = match BuildArg :: new ( ) ? {
216
218
Some ( args) => args,
Original file line number Diff line number Diff line change @@ -26,17 +26,22 @@ macro_rules! arg_error {
26
26
fn usage ( ) {
27
27
println ! (
28
28
"\
29
- Available commands for build_system:
29
+ rustc_codegen_gcc build system
30
30
31
- cargo : Run cargo command
32
- rustc : Run rustc command
33
- clean : Run clean command
34
- prepare : Run prepare command
35
- build : Run build command
36
- test : Run test command
37
- info : Run info command
38
- clone-gcc : Run clone-gcc command
39
- --help : Show this message"
31
+ Usage: build_system [command] [options]
32
+
33
+ Options:
34
+ --help : Displays this help message.
35
+
36
+ Commands:
37
+ cargo : Executes a cargo command.
38
+ rustc : Compiles the program using the GCC compiler.
39
+ clean : Cleans the build directory, removing all compiled files and artifacts.
40
+ prepare : Prepares the environment for building, including fetching dependencies and setting up configurations.
41
+ build : Compiles the project.
42
+ test : Runs tests for the project.
43
+ info : Displays information about the build environment and project configuration.
44
+ clone-gcc : Clones the GCC compiler from a specified source."
40
45
) ;
41
46
}
42
47
You can’t perform that action at this time.
0 commit comments