mirror of
https://github.com/codex-storage/nim-bearssl.git
synced 2025-01-10 13:26:07 +00:00
Merge pull request #23 from status-im/stylecheck-usages
enable --stylecheck:usages
This commit is contained in:
commit
9ca2e9fe87
@ -16,7 +16,7 @@ proc test(env, path: string) =
|
|||||||
lang = getEnv"TEST_LANG"
|
lang = getEnv"TEST_LANG"
|
||||||
|
|
||||||
exec "nim " & lang & " " & env &
|
exec "nim " & lang & " " & env &
|
||||||
" -r --hints:off --skipParentCfg " & path
|
" -r --hints:off --skipParentCfg --styleCheck:usages --styleCheck:error " & path
|
||||||
|
|
||||||
task test, "Run tests":
|
task test, "Run tests":
|
||||||
exec "nim -v"
|
exec "nim -v"
|
||||||
|
@ -17,7 +17,7 @@ from os import DirSep, AltSep
|
|||||||
|
|
||||||
const CurrentPath = currentSourcePath.rsplit({DirSep, AltSep}, 1)[0]
|
const CurrentPath = currentSourcePath.rsplit({DirSep, AltSep}, 1)[0]
|
||||||
|
|
||||||
{.passC: "-I" & CurrentPath & "/certs".}
|
{.passc: "-I" & CurrentPath & "/certs".}
|
||||||
|
|
||||||
var MozillaTrustAnchors* {.
|
var MozillaTrustAnchors* {.
|
||||||
importc: "TAs", header: "cacert20210119.h".}: array[129, X509TrustAnchor]
|
importc: "TAs", header: "cacert20210119.h".}: array[129, X509TrustAnchor]
|
||||||
|
@ -31,32 +31,32 @@ const
|
|||||||
bearToolsPath = bearPath & "tools" & "/"
|
bearToolsPath = bearPath & "tools" & "/"
|
||||||
bearRootPath = bearSrcPath & "/"
|
bearRootPath = bearSrcPath & "/"
|
||||||
|
|
||||||
{.passC: "-I" & quoteShell(bearSrcPath)}
|
{.passc: "-I" & quoteShell(bearSrcPath)}
|
||||||
{.passC: "-I" & quoteShell(bearIncPath)}
|
{.passc: "-I" & quoteShell(bearIncPath)}
|
||||||
{.passC: "-I" & quoteShell(bearPath & "tools")}
|
{.passc: "-I" & quoteShell(bearPath & "tools")}
|
||||||
|
|
||||||
when defined(windows):
|
when defined(windows):
|
||||||
{.passC: "-DBR_USE_WIN32_TIME=1".}
|
{.passc: "-DBR_USE_WIN32_TIME=1".}
|
||||||
{.passC: "-DBR_USE_WIN32_RAND=1".}
|
{.passc: "-DBR_USE_WIN32_RAND=1".}
|
||||||
else:
|
else:
|
||||||
{.passC: "-DBR_USE_UNIX_TIME=1".}
|
{.passc: "-DBR_USE_UNIX_TIME=1".}
|
||||||
{.passC: "-DBR_USE_URANDOM=1".}
|
{.passc: "-DBR_USE_URANDOM=1".}
|
||||||
|
|
||||||
when defined(i386) or defined(amd64) or defined(arm64):
|
when defined(i386) or defined(amd64) or defined(arm64):
|
||||||
{.passC: "-DBR_LE_UNALIGNED=1".}
|
{.passc: "-DBR_LE_UNALIGNED=1".}
|
||||||
elif defined(powerpc) or defined(powerpc64):
|
elif defined(powerpc) or defined(powerpc64):
|
||||||
{.passC: "-DBR_BE_UNALIGNED=1".}
|
{.passc: "-DBR_BE_UNALIGNED=1".}
|
||||||
elif defined(powerpc64el):
|
elif defined(powerpc64el):
|
||||||
{.passC: "-DBR_LE_UNALIGNED=1".}
|
{.passc: "-DBR_LE_UNALIGNED=1".}
|
||||||
|
|
||||||
when sizeof(int) == 8:
|
when sizeof(int) == 8:
|
||||||
{.passC: "-DBR_64=1".}
|
{.passc: "-DBR_64=1".}
|
||||||
when hostCPU == "amd64":
|
when hostCPU == "amd64":
|
||||||
{.passC:" -DBR_amd64=1".}
|
{.passc:" -DBR_amd64=1".}
|
||||||
when defined(vcc):
|
when defined(vcc):
|
||||||
{.passC: "-DBR_UMUL128=1".}
|
{.passc: "-DBR_UMUL128=1".}
|
||||||
else:
|
else:
|
||||||
{.passC: "-DBR_INT128=1".}
|
{.passc: "-DBR_INT128=1".}
|
||||||
|
|
||||||
{.compile: bearCodecPath & "ccopy.c".}
|
{.compile: bearCodecPath & "ccopy.c".}
|
||||||
{.compile: bearCodecPath & "dec16be.c".}
|
{.compile: bearCodecPath & "dec16be.c".}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user