aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-30 15:41:37 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-03-30 15:41:37 -0400
commit38d6189d4335bbcdc38f0c31cf769082b96f22fa (patch)
tree430c133eafe0284d0bc10e7571b42bbf02b34aca /src
parent494e4ef006cd66ee1d91ea23de9da085bec1e8db (diff)
Further support for .dylib files on mac by changing syntax for library
imports to `use -lfoo` instead of `use foo.so`
Diffstat (limited to 'src')
-rw-r--r--src/parse.c4
-rw-r--r--src/tomo.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/parse.c b/src/parse.c
index 0eba5d2a..5e2894f0 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -2487,14 +2487,14 @@ PARSER(parse_use) {
int what;
if (name[0] == '<' || ends_with(name, ".h")) {
what = USE_HEADER;
+ } else if (starts_with(name, "-l")) {
+ what = USE_SHARED_OBJECT;
} else if (ends_with(name, ".c")) {
what = USE_C_CODE;
} else if (ends_with(name, ".S") || ends_with(name, ".s")) {
what = USE_ASM;
} else if (starts_with(name, "./") || starts_with(name, "/") || starts_with(name, "../") || starts_with(name, "~/")) {
what = USE_LOCAL;
- } else if (ends_with(name, ".so")) {
- what = USE_SHARED_OBJECT;
} else {
what = USE_MODULE;
diff --git a/src/tomo.c b/src/tomo.c
index 9d53a8f4..e6a6becf 100644
--- a/src/tomo.c
+++ b/src/tomo.c
@@ -625,7 +625,7 @@ void build_file_dependency_graph(Path_t path, Table_t *to_compile, Table_t *to_l
break;
}
case USE_SHARED_OBJECT: {
- Text_t lib = Text$format("-l:%s", use->path);
+ Text_t lib = Text$from_str(use->path);
Table$set(to_link, &lib, ((Bool_t[1]){1}), Table$info(&Text$info, &Bool$info));
break;
}