Change how -O works and create -optsize / -optlevel. Update --safe / --fast.

This commit is contained in:
Christoffer Lerno
2023-09-17 00:23:38 +02:00
committed by Christoffer Lerno
parent 03345bef10
commit d49365b4a7
14 changed files with 177 additions and 100 deletions

View File

@@ -181,7 +181,7 @@ void gencontext_init_file_emit(GenContext *c, CompilationUnit *unit)
// Set runtime version here.
unit->llvm.debug_file = llvm_get_debug_file(c, unit->file->file_id);
bool is_optimized = active_target.optimization_level != OPTIMIZATION_NONE;
bool is_optimized = active_target.optlevel != OPTIMIZATION_NONE;
const char *dwarf_flags = "";
unsigned runtime_version = 0;
LLVMDWARFEmissionKind emission_kind =