mirror of
https://github.com/janet-lang/janet
synced 2025-10-18 17:27:40 +00:00
Only enable lto on linux for now.
Was failing with clang, as the default clang linker doesn't do LTO.
This commit is contained in:
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"] ["-flto"]))
|
||||
(def default-lflags (if is-win ["/nologo"] []))
|
||||
(def default-cflags
|
||||
(if is-win
|
||||
["/nologo" "/MD"]
|
||||
["-std=c99" "-Wall" "-Wextra" "-flto"]))
|
||||
["-std=c99" "-Wall" "-Wextra"]))
|
||||
|
||||
|
||||
# Link to pthreads
|
||||
@@ -140,13 +140,13 @@
|
||||
(def- dynamic-cflags
|
||||
(if is-win
|
||||
["/LD"]
|
||||
["-fPIC" "-flto"]))
|
||||
["-fPIC"]))
|
||||
(def- dynamic-lflags
|
||||
(if is-win
|
||||
["/DLL" ;thread-flags]
|
||||
(if is-mac
|
||||
["-shared" "-undefined" "dynamic_lookup" "-flto" ;thread-flags]
|
||||
["-shared" "-flto" ;thread-flags])))
|
||||
["-shared" "-undefined" "dynamic_lookup" ;thread-flags]
|
||||
["-shared" ;thread-flags])))
|
||||
|
||||
(defn- opt
|
||||
"Get an option, allowing overrides via dynamic bindings AND some
|
||||
|
Reference in New Issue
Block a user