From 2503e86780e8077c0992ff7d055c8aed888d3cbc Mon Sep 17 00:00:00 2001 From: Joao Matos Date: Sun, 27 Oct 2024 17:59:41 +0000 Subject: [PATCH] Fix ABI leakage. --- src/CppParser/Bindings/CSharp/arm64-apple-darwin/Std-symbols.cpp | 1 + src/CppParser/Bindings/CSharp/i686-apple-darwin/Std-symbols.cpp | 1 + src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Std-symbols.cpp | 1 + .../Bindings/CSharp/x86_64-apple-darwin/Std-symbols.cpp | 1 + .../Bindings/CSharp/x86_64-linux-gnu-cxx11abi/Std-symbols.cpp | 1 + src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std-symbols.cpp | 1 + .../Bindings/CSharp/x86_64-pc-win32-msvc/Std-symbols.cpp | 1 + src/Generator/Passes/SymbolsCodeGenerator.cs | 1 + 8 files changed, 8 insertions(+) diff --git a/src/CppParser/Bindings/CSharp/arm64-apple-darwin/Std-symbols.cpp b/src/CppParser/Bindings/CSharp/arm64-apple-darwin/Std-symbols.cpp index 26e5ae1647..c4b4b67673 100644 --- a/src/CppParser/Bindings/CSharp/arm64-apple-darwin/Std-symbols.cpp +++ b/src/CppParser/Bindings/CSharp/arm64-apple-darwin/Std-symbols.cpp @@ -1,5 +1,6 @@ #define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS #define _LIBCPP_HIDE_FROM_ABI +#define _LIBCPP_NO_ABI_TAG #include #include diff --git a/src/CppParser/Bindings/CSharp/i686-apple-darwin/Std-symbols.cpp b/src/CppParser/Bindings/CSharp/i686-apple-darwin/Std-symbols.cpp index 26e5ae1647..c4b4b67673 100644 --- a/src/CppParser/Bindings/CSharp/i686-apple-darwin/Std-symbols.cpp +++ b/src/CppParser/Bindings/CSharp/i686-apple-darwin/Std-symbols.cpp @@ -1,5 +1,6 @@ #define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS #define _LIBCPP_HIDE_FROM_ABI +#define _LIBCPP_NO_ABI_TAG #include #include diff --git a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Std-symbols.cpp b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Std-symbols.cpp index 682e399117..2b400d4c0e 100644 --- a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Std-symbols.cpp +++ b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Std-symbols.cpp @@ -1,5 +1,6 @@ #define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS #define _LIBCPP_HIDE_FROM_ABI +#define _LIBCPP_NO_ABI_TAG #include #include diff --git a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin/Std-symbols.cpp b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin/Std-symbols.cpp index 26e5ae1647..c4b4b67673 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin/Std-symbols.cpp +++ b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin/Std-symbols.cpp @@ -1,5 +1,6 @@ #define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS #define _LIBCPP_HIDE_FROM_ABI +#define _LIBCPP_NO_ABI_TAG #include #include diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/Std-symbols.cpp b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/Std-symbols.cpp index 3da0107115..72fe7671ef 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/Std-symbols.cpp +++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/Std-symbols.cpp @@ -1,5 +1,6 @@ #define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS #define _LIBCPP_HIDE_FROM_ABI +#define _LIBCPP_NO_ABI_TAG #include #include diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std-symbols.cpp b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std-symbols.cpp index fc98a8528f..e2d84a3115 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std-symbols.cpp +++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std-symbols.cpp @@ -1,5 +1,6 @@ #define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS #define _LIBCPP_HIDE_FROM_ABI +#define _LIBCPP_NO_ABI_TAG #include #include diff --git a/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/Std-symbols.cpp b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/Std-symbols.cpp index 682e399117..2b400d4c0e 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/Std-symbols.cpp +++ b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/Std-symbols.cpp @@ -1,5 +1,6 @@ #define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS #define _LIBCPP_HIDE_FROM_ABI +#define _LIBCPP_NO_ABI_TAG #include #include diff --git a/src/Generator/Passes/SymbolsCodeGenerator.cs b/src/Generator/Passes/SymbolsCodeGenerator.cs index 1b5bf7604a..62c2bf846c 100644 --- a/src/Generator/Passes/SymbolsCodeGenerator.cs +++ b/src/Generator/Passes/SymbolsCodeGenerator.cs @@ -32,6 +32,7 @@ public override void Process() { WriteLine("#define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS"); WriteLine("#define _LIBCPP_HIDE_FROM_ABI"); + WriteLine("#define _LIBCPP_NO_ABI_TAG"); NewLine(); WriteLine("#include "); }