Skip to content

Commit 340e004

Browse files
committed
remove -l: when searching for libraries
1 parent 4703050 commit 340e004

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/linker.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,7 @@ gb_internal i32 linker_stage(LinkerData *gen) {
427427
#endif
428428
//printf("%s\n", cwd);
429429

430-
// NOTE(vassvik): needs to add the root to the library search paths, so that the full filenames of the library
431-
// files can be passed with -l:
432-
gbString lib_str = gb_string_make(heap_allocator(), "-L/");
430+
gbString lib_str = gb_string_make(heap_allocator(), "");
433431
defer (gb_string_free(lib_str));
434432

435433
StringSet asm_files = {};
@@ -575,7 +573,7 @@ gb_internal i32 linker_stage(LinkerData *gen) {
575573
// local to the executable (unless the system collection is used, in which case we search
576574
// the system library paths for the library file).
577575
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."))) {
578-
lib_str = gb_string_append_fmt(lib_str, " -l:\"%.*s\" ", LIT(lib));
576+
lib_str = gb_string_append_fmt(lib_str, " \"%.*s\" ", LIT(lib));
579577
} else {
580578
// dynamic or static system lib, just link regularly searching system library paths
581579
lib_str = gb_string_append_fmt(lib_str, " -l%.*s ", LIT(lib));

0 commit comments

Comments
 (0)