From 75d38864f8f73c9722929b4f6137c8d668d7126d Mon Sep 17 00:00:00 2001 From: Scott Wolchok Date: Wed, 19 Mar 2025 10:10:59 -0700 Subject: [PATCH] Update [ghstack-poisoned] --- .ci/scripts/utils.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.ci/scripts/utils.sh b/.ci/scripts/utils.sh index c710196d896..589c22fe87a 100644 --- a/.ci/scripts/utils.sh +++ b/.ci/scripts/utils.sh @@ -111,9 +111,14 @@ build_executorch_runner_cmake() { mkdir "${CMAKE_OUTPUT_DIR}" pushd "${CMAKE_OUTPUT_DIR}" || return + if [[ $1 == "Debug" ]]; then + CXXFLAGS="-fsanitize=address,undefined" + else + CXXFLAGS="" + fi # This command uses buck2 to gather source files and buck2 could crash flakily # on MacOS - retry cmake -DPYTHON_EXECUTABLE="${PYTHON_EXECUTABLE}" -DCMAKE_BUILD_TYPE="${1:-Release}" .. + CXXFLAGS="$CXXFLAGS" retry cmake -DPYTHON_EXECUTABLE="${PYTHON_EXECUTABLE}" -DCMAKE_BUILD_TYPE="${1:-Release}" .. popd || return if [ "$(uname)" == "Darwin" ]; then