Use ASAN when on Clang (#1187)

This currently only affects MacOS builds, as that's the only platform where clang is used.
This commit is contained in:
Jaci Brunning
2018-07-17 13:48:02 +08:00
committed by Peter Johnson
parent 7f000fecc4
commit 340b26bada

View File

@@ -10,4 +10,13 @@ model {
staticConfigs = project.staticGtestConfigs
}
}
binaries {
withType(GoogleTestTestSuiteBinarySpec) {
if (toolChain instanceof Clang) {
println "Clang Detected - Using ASAN"
cppCompiler.args << '-fsanitize=address'
linker.args << '-fsanitize=address'
}
}
}
}