Skip to content

Commit

Permalink
Rename to no-emit-stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
lerno committed Jun 6, 2023
1 parent 379a5f6 commit 266dba4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/build/build_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static void usage(void)
OUTPUT(" --asm-out <dir> - 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 <target> - Compile for a particular architecture + OS target.");
OUTPUT(" --threads <number> - Set the number of threads to use for compilation.");
OUTPUT(" --safe - Set mode to 'safe', generating runtime traps on overflows and contract violations.");
Expand Down Expand Up @@ -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"))
Expand Down
4 changes: 2 additions & 2 deletions src/build/build_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/build/builder.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/llvm_codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 266dba4

Please sign in to comment.