Update build options --nostdlib --nolibc --emit-stdlib --forcelinker … (#999)

Update build options --nostdlib --nolibc --emit-stdlib --forcelinker --strip-unused. Fix error with vectors in $foreach. Also error if a $foreach iterating over an empty list. Rename forcelinker -> system-linker
This commit is contained in:
Christoffer Lerno
2023-09-17 13:19:01 +02:00
committed by GitHub
parent d49365b4a7
commit 8ed9be9c58
18 changed files with 251 additions and 230 deletions

View File

@@ -157,7 +157,7 @@ void gencontext_begin_module(GenContext *c)
c->debug.runtime_version = 1;
c->debug.builder = LLVMCreateDIBuilder(c->module);
if (active_target.debug_info == DEBUG_INFO_FULL && active_target.feature.safe_mode)
if (active_target.debug_info == DEBUG_INFO_FULL && safe_mode_enabled())
{
c->debug.stack_type = LLVMStructCreateNamed(c->context, ".$callstack");
LLVMTypeRef types[5] = { c->ptr_type,