Use exact value to determine system linked libs with -export-linked-libs-file

This commit is contained in:
Harold Brenes
2025-10-12 01:57:29 -04:00
parent 937161f68d
commit 0de3de7257

View File

@@ -2314,9 +2314,9 @@ gb_internal void export_linked_libraries(LinkerData *gen) {
gb_fprintf(&f, "\t");
ast_node(imp, ForeignImportDecl, e->LibraryName.decl);
for (Ast* file_path : imp->filepaths) {
GB_ASSERT(file_path->kind == Ast_BasicLit);
GB_ASSERT(file_path->tav.mode == Addressing_Constant && file_path->tav.value.kind == ExactValue_String);
String file_path_str = file_path->tav.value.value_string;
String file_path_str = file_path->BasicLit.token.string;
if (string_starts_with(file_path_str, str_lit("\"system:"))) {
gb_fprintf(&f, "system");
} else {