Browse Source

Make the CPP ABI visible only to the STD symbols

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/1483/head
Dimitar Dobrev 5 years ago
parent
commit
b6811060ab
  1. 9
      src/Generator/Passes/SymbolsCodeGenerator.cs

9
src/Generator/Passes/SymbolsCodeGenerator.cs

@ -28,12 +28,13 @@ namespace CppSharp.Passes @@ -28,12 +28,13 @@ namespace CppSharp.Passes
public override void Process()
{
WriteLine("#define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS");
WriteLine("#define _LIBCPP_HIDE_FROM_ABI");
NewLine();
if (TranslationUnit.Module == Options.SystemModule)
{
WriteLine("#define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS");
WriteLine("#define _LIBCPP_HIDE_FROM_ABI");
NewLine();
WriteLine("#include <string>");
}
else
foreach (var header in TranslationUnit.Module.Headers)
WriteLine($"#include <{header}>");

Loading…
Cancel
Save