Commit 0cb1f60c authored by Ravindra Sunkad's avatar Ravindra Sunkad Committed by Facebook GitHub Bot

Add option to build with ASAN on OSS build

Summary:
Environment variable WITH_ASAN can be set to enable building
 with ASAN options.

 Ran into issues with getdeps.py extensions P137131160.
 Once that is resolved will do away with the ENV approach

 Requires building folly lib also with ASAN to avoid linking issues

Reviewed By: shri-khare

Differential Revision: D22860508

fbshipit-source-id: 48dea49378319972894f69b11bac6fa63ee20db9
parent 09e27c74
...@@ -194,6 +194,12 @@ option( ...@@ -194,6 +194,12 @@ option(
"Build folly with Address Sanitizer enabled." "Build folly with Address Sanitizer enabled."
OFF OFF
) )
if ($ENV{WITH_ASAN})
message(STATUS "ENV WITH_ASAN is set")
set (FOLLY_LIBRARY_SANITIZE_ADDRESS ON)
endif()
if (FOLLY_LIBRARY_SANITIZE_ADDRESS) if (FOLLY_LIBRARY_SANITIZE_ADDRESS)
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU) if ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU)
set(FOLLY_LIBRARY_SANITIZE_ADDRESS ON) set(FOLLY_LIBRARY_SANITIZE_ADDRESS ON)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment