Forward pragmas to toast

This commit is contained in:
Ganesh Viswanathan 2020-07-14 18:08:59 -05:00
commit 6ffacf92fc
15 changed files with 162 additions and 306 deletions

View file

@ -22,13 +22,13 @@ when not libssh2Static:
when not defined(Windows) and not isDefined(libssh2JBB):
proc zlibVersion(): cstring {.importc, dynlib: libssh2LPath.}
else:
cPassL("-lpthread")
cImport(libssh2Path, recurse = true, flags = "-c -E_ -F_")
when not defined(Windows) and not isDefined(libssh2JBB):
proc zlibVersion(): cstring {.importc.}
{.passL: "-lpthread".}
assert libssh2_init(0) == 0
let

View file

@ -35,13 +35,13 @@ cPlugin:
cOverride:
proc OPENSSL_die*(assertion: cstring; file: cstring; line: cint) {.importc.}
cPassL(cryptoLPath)
# Skip comments for https://github.com/tree-sitter/tree-sitter-c/issues/44
cImport(@[
basePath / "rsa.h",
basePath / "err.h",
], recurse = true, flags = "-s -c " & FLAGS)
{.passL: cryptoLPath.}
OpensslInit()
echo $OPENSSL_VERSION_TEXT

View file

@ -2,7 +2,7 @@ import macros, os, sets, strutils
import nimterop/[cimport]
{.passC: "-DNIMTEROP".}
cPassC("-DNIMTEROP")
static:
# Skip casting on lower nim compilers because

View file

@ -24,15 +24,15 @@ cIncludeDir(incl)
when defined(osx):
cDefine("WITH_COREAUDIO")
{.passL: "-framework CoreAudio -framework AudioToolbox".}
cPassL("-framework CoreAudio -framework AudioToolbox")
cCompile(src/"backend/coreaudio/*.cpp")
elif defined(Linux):
{.passL: "-lpthread".}
cPassL("-lpthread")
cDefine("WITH_OSS")
cCompile(src/"backend/oss/*.cpp")
elif defined(Windows):
{.passC: "-msse".}
{.passL: "-lwinmm".}
cPassC("-msse")
cPassL("-lwinmm")
cDefine("WITH_WINMM")
cCompile(src/"backend/winmm/*.cpp")
else:

View file

@ -65,12 +65,12 @@ when zlibGit or zlibDL:
when dirExists(baseDir / "buildcache"):
cIncludeDir(baseDir / "buildcache")
when not zlibStatic:
when not isDefined(zlibStatic):
cImport(zlibPath, recurse = true, dynlib = "zlibLPath", flags = FLAGS)
else:
when isDefined(zlibJBB):
cPassL("-no-pie")
cImport(zlibPath, recurse = true, flags = FLAGS)
echo "zlib version = " & $zlibVersion()
when isDefined(zlibJBB) and isDefined(zlibStatic):
{.passL: "-no-pie".}
echo "zlib version = " & $zlibVersion()