run UBSAN in Linux in unit tests (#23)
This commit is contained in:
parent
ecbcee1d10
commit
eed56b00ad
|
@ -24,8 +24,6 @@ jobs:
|
||||||
cpu: amd64
|
cpu: amd64
|
||||||
- os: windows
|
- os: windows
|
||||||
cpu: amd64
|
cpu: amd64
|
||||||
#- os: windows
|
|
||||||
#cpu: i386
|
|
||||||
branch: [version-1-6, version-2-0, devel]
|
branch: [version-1-6, version-2-0, devel]
|
||||||
include:
|
include:
|
||||||
- target:
|
- target:
|
||||||
|
|
|
@ -17,9 +17,14 @@ let lang = getEnv("NIMLANG", "c") # Which backend (c/cpp/js)
|
||||||
let flags = getEnv("NIMFLAGS", "") # Extra flags for the compiler
|
let flags = getEnv("NIMFLAGS", "") # Extra flags for the compiler
|
||||||
let verbose = getEnv("V", "") notin ["", "0"]
|
let verbose = getEnv("V", "") notin ["", "0"]
|
||||||
|
|
||||||
|
const sanitize = "\"-fsanitize=undefined\""
|
||||||
|
|
||||||
let cfg =
|
let cfg =
|
||||||
" --styleCheck:usages --styleCheck:error" &
|
" --styleCheck:usages --styleCheck:error" &
|
||||||
(if verbose: "" else: " --verbosity:0 --hints:off") &
|
(if verbose: "" else: " --verbosity:0 --hints:off") &
|
||||||
|
(if defined(linux):
|
||||||
|
" --passC:" & sanitize & " --passL: " & sanitize
|
||||||
|
else: "") &
|
||||||
" --skipParentCfg --skipUserCfg --outdir:build --nimcache:build/nimcache -f"
|
" --skipParentCfg --skipUserCfg --outdir:build --nimcache:build/nimcache -f"
|
||||||
|
|
||||||
proc build(args, path: string) =
|
proc build(args, path: string) =
|
||||||
|
|
Loading…
Reference in New Issue