From 340e0040d3c0ae87878f72ae8ba64557992425e3 Mon Sep 17 00:00:00 2001 From: Bintang Adiputra Pratama Date: Sun, 19 Jan 2025 06:27:26 +0700 Subject: [PATCH] remove `-l:` when searching for libraries --- src/linker.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/linker.cpp b/src/linker.cpp index 261d6e7a47b..080586e215f 100644 --- a/src/linker.cpp +++ b/src/linker.cpp @@ -427,9 +427,7 @@ gb_internal i32 linker_stage(LinkerData *gen) { #endif //printf("%s\n", cwd); - // NOTE(vassvik): needs to add the root to the library search paths, so that the full filenames of the library - // files can be passed with -l: - gbString lib_str = gb_string_make(heap_allocator(), "-L/"); + gbString lib_str = gb_string_make(heap_allocator(), ""); defer (gb_string_free(lib_str)); StringSet asm_files = {}; @@ -575,7 +573,7 @@ gb_internal i32 linker_stage(LinkerData *gen) { // local to the executable (unless the system collection is used, in which case we search // the system library paths for the library file). if (string_ends_with(lib, str_lit(".a")) || string_ends_with(lib, str_lit(".o")) || string_ends_with(lib, str_lit(".so")) || string_contains_string(lib, str_lit(".so."))) { - lib_str = gb_string_append_fmt(lib_str, " -l:\"%.*s\" ", LIT(lib)); + lib_str = gb_string_append_fmt(lib_str, " \"%.*s\" ", LIT(lib)); } else { // dynamic or static system lib, just link regularly searching system library paths lib_str = gb_string_append_fmt(lib_str, " -l%.*s ", LIT(lib));