Browse Source

Revert "Fix exceptions mismatch."

This reverts commit 49264706ef.
pull/1879/head
Joao Matos 8 months ago
parent
commit
eda3dab71f
  1. 1
      src/CLI/Generator.cs
  2. 1
      src/CppParser/Bindings/CSharp/arm64-apple-darwin/Std-symbols.cpp
  3. 1
      src/CppParser/Bindings/CSharp/i686-apple-darwin/Std-symbols.cpp
  4. 1
      src/CppParser/Bindings/CSharp/x86_64-apple-darwin/Std-symbols.cpp
  5. 1
      src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/Std-symbols.cpp
  6. 1
      src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std-symbols.cpp
  7. 1
      src/CppParser/ParserGen/ParserGen.cs
  8. 2
      src/CppParser/premake5.lua
  9. 2
      src/Generator/Passes/SymbolsCodeGenerator.cs
  10. 4
      src/Parser/ParserOptions.cs

1
src/CLI/Generator.cs

@ -146,7 +146,6 @@ namespace CppSharp
parserOptions.UnityBuild = options.UnityBuild; parserOptions.UnityBuild = options.UnityBuild;
parserOptions.EnableRTTI = options.EnableRTTI; parserOptions.EnableRTTI = options.EnableRTTI;
parserOptions.EnableExceptions = options.EnableExceptions;
parserOptions.Setup(options.Platform ?? Platform.Host); parserOptions.Setup(options.Platform ?? Platform.Host);

1
src/CppParser/Bindings/CSharp/arm64-apple-darwin/Std-symbols.cpp

@ -1,5 +1,6 @@
#define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS #define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS
#define _LIBCPP_HIDE_FROM_ABI #define _LIBCPP_HIDE_FROM_ABI
#define _LIBCPP_NO_ABI_TAG
#include <string> #include <string>
#include <new> #include <new>

1
src/CppParser/Bindings/CSharp/i686-apple-darwin/Std-symbols.cpp

@ -1,5 +1,6 @@
#define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS #define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS
#define _LIBCPP_HIDE_FROM_ABI #define _LIBCPP_HIDE_FROM_ABI
#define _LIBCPP_NO_ABI_TAG
#include <string> #include <string>
#include <new> #include <new>

1
src/CppParser/Bindings/CSharp/x86_64-apple-darwin/Std-symbols.cpp

@ -1,5 +1,6 @@
#define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS #define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS
#define _LIBCPP_HIDE_FROM_ABI #define _LIBCPP_HIDE_FROM_ABI
#define _LIBCPP_NO_ABI_TAG
#include <string> #include <string>
#include <new> #include <new>

1
src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/Std-symbols.cpp

@ -1,5 +1,6 @@
#define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS #define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS
#define _LIBCPP_HIDE_FROM_ABI #define _LIBCPP_HIDE_FROM_ABI
#define _LIBCPP_NO_ABI_TAG
#include <string> #include <string>
#include <new> #include <new>

1
src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std-symbols.cpp

@ -1,5 +1,6 @@
#define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS #define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS
#define _LIBCPP_HIDE_FROM_ABI #define _LIBCPP_HIDE_FROM_ABI
#define _LIBCPP_NO_ABI_TAG
#include <string> #include <string>
#include <new> #include <new>

1
src/CppParser/ParserGen/ParserGen.cs

@ -49,7 +49,6 @@ namespace CppSharp
{ {
var parserOptions = driver.ParserOptions; var parserOptions = driver.ParserOptions;
parserOptions.TargetTriple = Triple; parserOptions.TargetTriple = Triple;
parserOptions.EnableExceptions = false;
var options = driver.Options; var options = driver.Options;
options.GeneratorKind = Kind; options.GeneratorKind = Kind;

2
src/CppParser/premake5.lua

@ -51,8 +51,6 @@ project "Std-symbols"
language "C++" language "C++"
SetupNativeProject() SetupNativeProject()
rtti "Off" rtti "Off"
exceptionhandling "Off"
defines { "DLL_EXPORT" } defines { "DLL_EXPORT" }
filter { "toolset:msc*" } filter { "toolset:msc*" }

2
src/Generator/Passes/SymbolsCodeGenerator.cs

@ -33,8 +33,6 @@ namespace CppSharp.Passes
WriteLine("#define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS"); WriteLine("#define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS");
WriteLine("#define _LIBCPP_HIDE_FROM_ABI"); WriteLine("#define _LIBCPP_HIDE_FROM_ABI");
WriteLine("#define _LIBCPP_NO_ABI_TAG"); WriteLine("#define _LIBCPP_NO_ABI_TAG");
if (!Context.ParserOptions.EnableExceptions)
WriteLine("#define _LIBCPP_HAS_NO_EXCEPTIONS");
NewLine(); NewLine();
WriteLine("#include <string>"); WriteLine("#include <string>");
} }

4
src/Parser/ParserOptions.cs

@ -84,7 +84,6 @@ namespace CppSharp.Parser
TargetTriple.Contains("windows") || TargetTriple.Contains("msvc"); TargetTriple.Contains("windows") || TargetTriple.Contains("msvc");
public bool EnableRTTI { get; set; } public bool EnableRTTI { get; set; }
public bool EnableExceptions { get; set; }
public LanguageVersion? LanguageVersion { get; set; } public LanguageVersion? LanguageVersion { get; set; }
public void BuildForSourceFile( public void BuildForSourceFile(
@ -376,9 +375,6 @@ namespace CppSharp.Parser
if (!EnableRTTI) if (!EnableRTTI)
AddArguments("-fno-rtti"); AddArguments("-fno-rtti");
if (EnableExceptions)
AddArguments("-fexceptions");
} }
internal string BuiltinsDirBasePath internal string BuiltinsDirBasePath

Loading…
Cancel
Save