mirror of
https://github.com/janet-lang/janet
synced 2024-12-27 00:40:26 +00:00
Add -flto to jpm builds as well.
This commit is contained in:
parent
2dd852da54
commit
99c94a78d6
10
auxbin/jpm
10
auxbin/jpm
@ -125,11 +125,11 @@
|
||||
(def threads? (not (not (env 'thread/new))))
|
||||
|
||||
# Default flags for natives, but not required
|
||||
(def default-lflags (if is-win ["/nologo"] []))
|
||||
(def default-lflags (if is-win ["/nologo"] ["-flto"]))
|
||||
(def default-cflags
|
||||
(if is-win
|
||||
["/nologo" "/MD"]
|
||||
["-std=c99" "-Wall" "-Wextra"]))
|
||||
["-std=c99" "-Wall" "-Wextra" "-flto"]))
|
||||
|
||||
|
||||
# Link to pthreads
|
||||
@ -140,13 +140,13 @@
|
||||
(def- dynamic-cflags
|
||||
(if is-win
|
||||
["/LD"]
|
||||
["-fPIC"]))
|
||||
["-fPIC" "-flto"]))
|
||||
(def- dynamic-lflags
|
||||
(if is-win
|
||||
["/DLL" ;thread-flags]
|
||||
(if is-mac
|
||||
["-shared" "-undefined" "dynamic_lookup" ;thread-flags]
|
||||
["-shared" ;thread-flags])))
|
||||
["-shared" "-undefined" "dynamic_lookup" "-flto" ;thread-flags]
|
||||
["-shared" "-flto" ;thread-flags])))
|
||||
|
||||
(defn- opt
|
||||
"Get an option, allowing overrides via dynamic bindings AND some
|
||||
|
Loading…
Reference in New Issue
Block a user