From 62d27924c5782823379e590ab39d5bd5c15b5065 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 26e5ae16..c4b4b676 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 26e5ae16..c4b4b676 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 682e3991..2b400d4c 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 26e5ae16..c4b4b676 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 3da01071..72fe7671 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 fc98a852..e2d84a31 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 682e3991..2b400d4c 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 1b5bf760..62c2bf84 100644 --- a/src/Generator/Passes/SymbolsCodeGenerator.cs +++ b/src/Generator/Passes/SymbolsCodeGenerator.cs @@ -32,6 +32,7 @@ namespace CppSharp.Passes { WriteLine("#define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS"); WriteLine("#define _LIBCPP_HIDE_FROM_ABI"); + WriteLine("#define _LIBCPP_NO_ABI_TAG"); NewLine(); WriteLine("#include "); }