1
0
mirror of https://github.com/janet-lang/janet synced 2025-01-11 08:00:27 +00:00

Added :lflags option to cook/make-native

This commit is contained in:
J.-F. Cap 2019-01-31 13:30:37 +01:00
parent a66f19f636
commit b138ee6e8e

View File

@ -112,11 +112,12 @@
[opts target & objects] [opts target & objects]
(def ld (or (opts :linker) LD)) (def ld (or (opts :linker) LD))
(def cflags (or (opts :cflags) CFLAGS)) (def cflags (or (opts :cflags) CFLAGS))
(def lflags (or (opts :lflags) ""))
(def olist (string/join objects " ")) (def olist (string/join objects " "))
(if (older-than-some target objects) (if (older-than-some target objects)
(if is-win (if is-win
(shell ld " /DLL /OUT:" target " " olist " %JANET_PATH%\\janet.lib") (shell ld " /DLL /OUT:" target " " olist " %JANET_PATH%\\janet.lib")
(shell ld " " cflags " -o " target " " olist)))) (shell ld " " cflags " -o " target " " olist " " lflags))))
(defn- create-buffer-c (defn- create-buffer-c
"Inline raw byte file as a c file." "Inline raw byte file as a c file."