From 42f6fdd3cba36e4c93015bedf4ca176c0c1f1c26 Mon Sep 17 00:00:00 2001 From: Michael Camilleri Date: Fri, 9 Aug 2024 08:24:54 +0900 Subject: [PATCH] Add dynamic lookup for macOS compilations --- spork/cc.janet | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spork/cc.janet b/spork/cc.janet index b86c641..6f011a9 100644 --- a/spork/cc.janet +++ b/spork/cc.janet @@ -154,11 +154,13 @@ (def dflt (index-of (target-os) [:linux])) (dyn *smart-libs* dflt)) (defn- libs [] + (def dl (if (= (target-os) :macos) ["-undefined" "dynamic_lookup"] [])) (def sg (if (smart-libs) ["-Wl,--start-group"] [])) (def eg (if (smart-libs) ["-Wl,--end-group"] [])) (def bs (if (not= (target-os) :macos) ["-Wl,-Bstatic"] [])) (def bd (if (not= (target-os) :macos) ["-Wl,-Bdynamic"] [])) [;(lflags) + ;dl ;sg ;(default-libs) ;bs