Use the platform linker by default, which will just be a call to "cc" (the Win solution will be done later)

This commit is contained in:
Christoffer Lerno
2021-04-14 13:53:34 +02:00
committed by Christoffer Lerno
parent 9de932a24d
commit f028bc274f
13 changed files with 92 additions and 44 deletions

View File

@@ -182,9 +182,20 @@ void compiler_compile(BuildTarget *target)
vec_add(obj_files, file_name);
}
if (create_exe && obj_format_linking_supported(platform_target.object_format))
if (create_exe)
{
linker(target->name, obj_files, source_count);
if (target->arch_os_target == ARCH_OS_TARGET_DEFAULT)
{
platform_linker(target->name, obj_files, source_count);
}
else
{
if (!obj_format_linking_supported(platform_target.object_format) || !linker(target->name, obj_files, source_count))
{
printf("No linking is performed due to missing linker support.");
target->run_after_compile = false;
}
}
if (target->run_after_compile)
{
system(strformat("./%s", target->name));