aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-05-04 16:17:24 +0100
committergingerBill <bill@gingerbill.org>2022-05-04 16:17:24 +0100
commit9f95d6fa6568b83072a8fbe49846390c014a00a1 (patch)
treed2e3d8d7fdc2f50178ec90e8c435e9455952c8a0 /src
parent982a1aebb3dc67447c30b4cf7f4ab1a5dac9af7e (diff)
Minor move around for path sets
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index fc3de96bb..07d6f6165 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -216,12 +216,13 @@ i32 linker_stage(lbGenerator *gen) {
GB_ASSERT(e->kind == Entity_LibraryName);
for_array(i, e->LibraryName.paths) {
String lib = string_trim_whitespace(e->LibraryName.paths[i]);
- if (lib.len == 0) {
- continue;
- }
// IMPORTANT NOTE(bill): calling `string_to_lower` here is not an issue because
// we will never uses these strings afterwards
string_to_lower(&lib);
+ if (lib.len == 0) {
+ continue;
+ }
+
if (has_asm_extension(lib)) {
if (!string_set_update(&asm_files, lib)) {
String asm_file = asm_files.entries[i].value;
@@ -378,7 +379,10 @@ i32 linker_stage(lbGenerator *gen) {
Entity *e = gen->foreign_libraries[j];
GB_ASSERT(e->kind == Entity_LibraryName);
for_array(i, e->LibraryName.paths) {
- String lib = e->LibraryName.paths[i];
+ String lib = string_trim_whitespace(e->LibraryName.paths[i]);
+ if (lib.len == 0) {
+ continue;
+ }
if (string_set_update(&libs, lib)) {
continue;
}