run UBSAN in Linux in unit tests (#23)

This commit is contained in:
tersec 2023-09-04 14:30:49 +02:00 committed by GitHub
parent ecbcee1d10
commit eed56b00ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -24,8 +24,6 @@ jobs:
cpu: amd64
- os: windows
cpu: amd64
#- os: windows
#cpu: i386
branch: [version-1-6, version-2-0, devel]
include:
- target:

View File

@ -17,9 +17,14 @@ let lang = getEnv("NIMLANG", "c") # Which backend (c/cpp/js)
let flags = getEnv("NIMFLAGS", "") # Extra flags for the compiler
let verbose = getEnv("V", "") notin ["", "0"]
const sanitize = "\"-fsanitize=undefined\""
let cfg =
" --styleCheck:usages --styleCheck:error" &
(if verbose: "" else: " --verbosity:0 --hints:off") &
(if defined(linux):
" --passC:" & sanitize & " --passL: " & sanitize
else: "") &
" --skipParentCfg --skipUserCfg --outdir:build --nimcache:build/nimcache -f"
proc build(args, path: string) =