Skip to content
  • Simon McVittie's avatar
    build: Add a way to set CFLAGS for AddressSanitizer etc. · 0c9f9432
    Simon McVittie authored
    
    
    We don't want to set these globally via the normal CFLAGS, because if
    we did, AddressSanitizer would catch test-segfault deliberately
    segfaulting, and "helpfully" turn it into exit status 1, which in turn
    makes our test fail because it asserts that the segfault is reported
    as a segfault.
    
    A typical use with gcc as compiler, on a reasonably recent Debian,
    would be:
    
        ./configure SANITIZE_CFLAGS="-fsanitize=address -fsanitize=undefined -fPIE -pie"
    
    Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
    0c9f9432