From 236c9cba872388d1b72630cf70cb17ccf2d62770 Mon Sep 17 00:00:00 2001 From: edgchen1 <18449977+edgchen1@users.noreply.github.com> Date: Tue, 28 Nov 2023 10:53:09 -0800 Subject: [PATCH] apply patch to work around absl issue --- .../abseil/absl_gh_issue_1435_workaround.patch | 17 +++++++++++++++++ .../mac-objc-static-analysis-ci-pipeline.yml | 5 +++++ 2 files changed, 22 insertions(+) create mode 100644 cmake/patches/abseil/absl_gh_issue_1435_workaround.patch diff --git a/cmake/patches/abseil/absl_gh_issue_1435_workaround.patch b/cmake/patches/abseil/absl_gh_issue_1435_workaround.patch new file mode 100644 index 0000000000000..0a864cdc019b4 --- /dev/null +++ b/cmake/patches/abseil/absl_gh_issue_1435_workaround.patch @@ -0,0 +1,17 @@ +--- absl/container/internal/layout.h 2023-11-28 09:35:48 ++++ absl/container/internal/layout.updated.h 2023-11-28 10:13:14 +@@ -181,9 +181,11 @@ + #include + #endif + +-#if defined(__GXX_RTTI) +-#define ABSL_INTERNAL_HAS_CXA_DEMANGLE +-#endif ++// Comment out ABSL_INTERNAL_HAS_CXA_DEMANGLE definition to work around this issue: ++// https://github.com/abseil/abseil-cpp/issues/1435 ++// #if defined(__GXX_RTTI) ++// #define ABSL_INTERNAL_HAS_CXA_DEMANGLE ++// #endif + + #ifdef ABSL_INTERNAL_HAS_CXA_DEMANGLE + #include diff --git a/tools/ci_build/github/azure-pipelines/mac-objc-static-analysis-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/mac-objc-static-analysis-ci-pipeline.yml index 6893fb95cfec5..8863554368bdf 100644 --- a/tools/ci_build/github/azure-pipelines/mac-objc-static-analysis-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/mac-objc-static-analysis-ci-pipeline.yml @@ -29,6 +29,11 @@ jobs: --build --parallel --target onnx_proto displayName: Generate compile_commands.json and ONNX protobuf files + - script: | + patch < "$(Build.BinariesDirectory)/cmake/patches/abseil/absl_gh_issue_1435_workaround.patch" + workingDirectory: "$(Build.BinariesDirectory)/Debug/_deps/abseil_cpp-src" + displayName: Apply absl_gh_issue_1435_workaround.patch + - script: | set -e