From 266dba466c6fa3a1dda339be75481cb546379dcd Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Tue, 6 Jun 2023 15:25:25 +0200 Subject: [PATCH] Rename to no-emit-stdlib --- src/build/build_options.c | 6 +++--- src/build/build_options.h | 4 ++-- src/build/builder.c | 2 +- src/compiler/llvm_codegen.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/build/build_options.c b/src/build/build_options.c index 668371b1c..9b49a84db 100644 --- a/src/build/build_options.c +++ b/src/build/build_options.c @@ -115,7 +115,7 @@ static void usage(void) OUTPUT(" --asm-out - Override asm output directory for '--emit-asm'."); OUTPUT(" --emit-asm - Emit asm as a .s file per module."); OUTPUT(" --no-obj - Do not output object files, this is only valid for `compile-only`."); - OUTPUT(" --no-stdlib-codegen - Do not output object files (nor asm or ir) for the standard library."); + OUTPUT(" --no-emit-stdlib - Do not output object files (nor asm or ir) for the standard library."); OUTPUT(" --target - Compile for a particular architecture + OS target."); OUTPUT(" --threads - Set the number of threads to use for compilation."); OUTPUT(" --safe - Set mode to 'safe', generating runtime traps on overflows and contract violations."); @@ -592,9 +592,9 @@ static void parse_option(BuildOptions *options) options->no_obj = true; return; } - if (match_longopt("no-stdlib-codegen")) + if (match_longopt("no-emit-stdlib")) { - options->no_stdlib_gen = true; + options->no_emit_stdlib = true; return; } if (match_longopt("debug-log")) diff --git a/src/build/build_options.h b/src/build/build_options.h index edb929816..84d3cf2b6 100644 --- a/src/build/build_options.h +++ b/src/build/build_options.h @@ -326,7 +326,7 @@ typedef struct BuildOptions_ bool no_entry; bool no_libc; bool no_obj; - bool no_stdlib_gen; + bool no_emit_stdlib; bool force_linker; bool read_stdin; bool print_output; @@ -423,7 +423,7 @@ typedef struct bool read_stdin; bool print_output; bool no_entry; - bool no_stdlibgen; + bool no_emit_stdlib; int build_threads; OptimizationLevel optimization_level; MemoryEnvironment memory_environment; diff --git a/src/build/builder.c b/src/build/builder.c index a71751f2e..5b67c28f4 100644 --- a/src/build/builder.c +++ b/src/build/builder.c @@ -306,7 +306,7 @@ static void update_build_target_from_options(BuildTarget *target, BuildOptions * { target->emit_object_files = false; } - target->no_stdlibgen = options->no_stdlib_gen; + target->no_emit_stdlib = options->no_emit_stdlib; for (int i = 0; i < options->lib_dir_count; i++) { vec_add(target->libdirs, options->lib_dir[i]); diff --git a/src/compiler/llvm_codegen.c b/src/compiler/llvm_codegen.c index b7ec7358a..e807f859f 100644 --- a/src/compiler/llvm_codegen.c +++ b/src/compiler/llvm_codegen.c @@ -1278,7 +1278,7 @@ static bool module_is_stdlib(Module *module) static GenContext *llvm_gen_module(Module *module, LLVMContextRef shared_context) { if (!vec_size(module->units)) return NULL; - if (active_target.no_stdlibgen && module_is_stdlib(module)) return NULL; + if (active_target.no_emit_stdlib && module_is_stdlib(module)) return NULL; assert(intrinsics_setup);