mirror of
https://github.com/janet-lang/janet
synced 2025-01-26 15:16:51 +00:00
Add thread flags to standalone executables.
This commit is contained in:
parent
8a91c52fa2
commit
66e6979812
12
auxbin/jpm
12
auxbin/jpm
@ -114,7 +114,9 @@
|
|||||||
|
|
||||||
# Detect threads
|
# Detect threads
|
||||||
(def env (fiber/getenv (fiber/current)))
|
(def env (fiber/getenv (fiber/current)))
|
||||||
(def threads? (not (not (env 'threads/from-image))))
|
(def threads? (not (not (env 'thread/from-image))))
|
||||||
|
|
||||||
|
(print "threads " threads?)
|
||||||
|
|
||||||
# Default flags for natives, but not required
|
# Default flags for natives, but not required
|
||||||
(def default-lflags (if is-win ["/nologo"] []))
|
(def default-lflags (if is-win ["/nologo"] []))
|
||||||
@ -501,11 +503,11 @@ int main(int argc, const char **argv) {
|
|||||||
# Compile and link final exectable
|
# Compile and link final exectable
|
||||||
(do
|
(do
|
||||||
(def extra-lflags (case (os/which)
|
(def extra-lflags (case (os/which)
|
||||||
:macos ["-ldl" "-lm"]
|
:macos ["-ldl" "-lm" ;thread-flags]
|
||||||
:windows []
|
:windows [;thread-flags]
|
||||||
:linux ["-lm" "-ldl" "-lrt"]
|
:linux ["-lm" "-ldl" "-lrt" ;thread-flags]
|
||||||
#default
|
#default
|
||||||
["-lm"]))
|
["-lm" ;thread-flags]))
|
||||||
(def cc (opt opts :compiler default-compiler))
|
(def cc (opt opts :compiler default-compiler))
|
||||||
(def lflags [;dep-lflags ;(opt opts :lflags default-lflags) ;extra-lflags])
|
(def lflags [;dep-lflags ;(opt opts :lflags default-lflags) ;extra-lflags])
|
||||||
(def cflags (getcflags opts))
|
(def cflags (getcflags opts))
|
||||||
|
Loading…
Reference in New Issue
Block a user