diff --git a/shared/googletest.gradle b/shared/googletest.gradle index fa471f6dc2..6b40e36b92 100644 --- a/shared/googletest.gradle +++ b/shared/googletest.gradle @@ -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' + } + } + } }