llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Ziqing Luo (ziqingluo-90) <details> <summary>Changes</summary> The plugin code defines the extern variable SSAFTestTransformationAnchorSource, which is supposed to be used to force static linking, so not needed here. The variable definition should undoubtedly be removed, as doing so solves the build issue locally. The explanation below regarding why this variable causes the issue was provided by Claude. I repeatedly asked Claude questions, and he revised his reasoning several times until it became consistent. However, we should still take the following explanation with a grain of salt: ASan created a private alias symbol for the extern variable SSAFTestTransformationAnchorSource. The linker, when in '-flat_namespace' mode, treated the symbol as a name-based bind, which later failed to be resolved through name searching by the loader. rdar://185749574 Assisted by Claude --- Full diff: https://github.com/llvm/llvm-project/pull/219081.diff 4 Files Affected: - (modified) clang/test/Analysis/Scalable/source-edit-generation/Plugins/TestTransformationPlugin/TestTransformation.cpp (-8) - (modified) clang/test/Analysis/Scalable/source-edit-generation/coexistence.cpp (-2) - (modified) clang/test/Analysis/Scalable/source-edit-generation/happy-path.cpp (-3) - (modified) clang/test/Analysis/Scalable/source-edit-generation/write-failure.cpp (-2) ``````````diff diff --git a/clang/test/Analysis/Scalable/source-edit-generation/Plugins/TestTransformationPlugin/TestTransformation.cpp b/clang/test/Analysis/Scalable/source-edit-generation/Plugins/TestTransformationPlugin/TestTransformation.cpp index 33a8319cd5b6a..2909cdfc5821b 100644 --- a/clang/test/Analysis/Scalable/source-edit-generation/Plugins/TestTransformationPlugin/TestTransformation.cpp +++ b/clang/test/Analysis/Scalable/source-edit-generation/Plugins/TestTransformationPlugin/TestTransformation.cpp @@ -89,15 +89,7 @@ class TestTransformation final : public Transformation { } // namespace -namespace clang::ssaf { -// NOLINTNEXTLINE(misc-use-internal-linkage) -volatile int SSAFTestTransformationAnchorSource = 0; -} // namespace clang::ssaf - -// This global causes issue in stage2 with ASan-instrumented clang so -// adding the no-ASan attribute. static TransformationRegistry::Add<TestTransformation> - __attribute__((no_sanitize("address"))) RegisterTestTransformation("test-transformation", "Test transformation for the SSAF " "source-edit-generation lit suite"); diff --git a/clang/test/Analysis/Scalable/source-edit-generation/coexistence.cpp b/clang/test/Analysis/Scalable/source-edit-generation/coexistence.cpp index 410022caaa3a9..f93eafa9e3ab1 100644 --- a/clang/test/Analysis/Scalable/source-edit-generation/coexistence.cpp +++ b/clang/test/Analysis/Scalable/source-edit-generation/coexistence.cpp @@ -6,8 +6,6 @@ // REQUIRES: plugins -// UNSUPPORTED: target={{.*}} - // RUN: rm -rf %t && mkdir -p %t // RUN: %clang_cc1 -load %llvmshlibdir/SSAFTestTransformationPlugin%pluginext \ // RUN: --ssaf-extract-summaries=CallGraph \ diff --git a/clang/test/Analysis/Scalable/source-edit-generation/happy-path.cpp b/clang/test/Analysis/Scalable/source-edit-generation/happy-path.cpp index a0e6ab0de7a88..d22c901217c31 100644 --- a/clang/test/Analysis/Scalable/source-edit-generation/happy-path.cpp +++ b/clang/test/Analysis/Scalable/source-edit-generation/happy-path.cpp @@ -7,9 +7,6 @@ // REQUIRES: plugins -// UNSUPPORTED: target={{.*}} - - // RUN: rm -rf %t && mkdir -p %t // RUN: %clang_cc1 -load %llvmshlibdir/SSAFTestTransformationPlugin%pluginext \ // RUN: --ssaf-source-transformation=test-transformation \ diff --git a/clang/test/Analysis/Scalable/source-edit-generation/write-failure.cpp b/clang/test/Analysis/Scalable/source-edit-generation/write-failure.cpp index 4c077702b1014..74ef0421045a8 100644 --- a/clang/test/Analysis/Scalable/source-edit-generation/write-failure.cpp +++ b/clang/test/Analysis/Scalable/source-edit-generation/write-failure.cpp @@ -5,8 +5,6 @@ // REQUIRES: plugins -// UNSUPPORTED: target={{.*}} - // RUN: rm -rf %t && mkdir -p %t // ============================================================================= `````````` </details> https://github.com/llvm/llvm-project/pull/219081 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
