2020-05-25 02:18:37 +00:00
|
|
|
if defined(release):
|
|
|
|
switch("nimcache", "nimcache/release/$projectName")
|
|
|
|
else:
|
|
|
|
switch("nimcache", "nimcache/debug/$projectName")
|
|
|
|
|
|
|
|
--threads:on
|
|
|
|
--opt:speed # -O3
|
|
|
|
--debugger:native # passes "-g" to the C compiler
|
|
|
|
--dynliboverrideall # don't use dlopen()
|
|
|
|
--define:ssl # needed by the stdlib to enable SSL procedures
|
|
|
|
|
|
|
|
if defined(macosx):
|
|
|
|
--tlsEmulation:off
|
2020-06-04 20:56:44 +00:00
|
|
|
switch("passL", "-lstdc++")
|
2020-05-25 02:18:37 +00:00
|
|
|
# DYLD_LIBRARY_PATH doesn't seem to work with Qt5
|
|
|
|
switch("passL", "-rpath" & " " & getEnv("QT5_LIBDIR"))
|
2020-06-04 20:56:44 +00:00
|
|
|
# statically linke these libs
|
|
|
|
switch("passL", "bottles/openssl/lib/libcrypto.a")
|
|
|
|
switch("passL", "bottles/openssl/lib/libssl.a")
|
|
|
|
switch("passL", "bottles/pcre/lib/libpcre.a")
|
2020-05-25 02:18:37 +00:00
|
|
|
# https://code.videolan.org/videolan/VLCKit/-/issues/232
|
|
|
|
switch("passL", "-Wl,-no_compact_unwind")
|
2020-06-04 20:56:44 +00:00
|
|
|
# set the minimum supported macOS version to 10.13
|
|
|
|
switch("passC", "-mmacosx-version-min=10.13")
|
2020-05-25 02:18:37 +00:00
|
|
|
else:
|
2020-06-04 20:56:44 +00:00
|
|
|
# dynamically link these libs, since we're opting out of dlopen()
|
|
|
|
switch("passL", "-lcrypto")
|
|
|
|
switch("passL", "-lssl")
|
|
|
|
# don't link libraries we're not actually using
|
|
|
|
switch("passL", "-Wl,-as-needed")
|
2020-05-25 02:18:37 +00:00
|
|
|
|
|
|
|
--define:chronicles_line_numbers # useful when debugging
|
2020-06-23 00:50:51 +00:00
|
|
|
|
|
|
|
# The compiler doth protest too much, methinks, about all these cases where it can't
|
|
|
|
# do its (N)RVO pass: https://github.com/nim-lang/RFCs/issues/230
|
|
|
|
switch("warning", "ObservableStores:off")
|
|
|
|
|
|
|
|
# Too many false positives for "Warning: method has lock level <unknown>, but another method has 0 [LockLevel]"
|
|
|
|
switch("warning", "LockLevel:off")
|
|
|
|
|