Skip to content

Commit 6f26cfb

Browse files
committed
Fix exceptions mismatch.
1 parent 5e6fd48 commit 6f26cfb

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS
22
#define _LIBCPP_HIDE_FROM_ABI
3-
#define _LIBCPP_NO_ABI_TAG
43

54
#include <string>
65
#include <new>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS
22
#define _LIBCPP_HIDE_FROM_ABI
3-
#define _LIBCPP_NO_ABI_TAG
43

54
#include <string>
65
#include <new>

src/CppParser/ParserGen/ParserGen.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public void Setup(Driver driver)
4848
{
4949
var parserOptions = driver.ParserOptions;
5050
parserOptions.TargetTriple = Triple;
51+
parserOptions.EnableExceptions = false;
5152

5253
var options = driver.Options;
5354
options.GeneratorKind = Kind;

src/CppParser/premake5.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ project "Std-symbols"
5151
language "C++"
5252
SetupNativeProject()
5353
rtti "Off"
54+
exceptionhandling "Off"
55+
5456
defines { "DLL_EXPORT" }
5557

5658
filter { "toolset:msc*" }

src/Parser/ParserOptions.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ public ParserOptions()
8484
TargetTriple.Contains("windows") || TargetTriple.Contains("msvc");
8585

8686
public bool EnableRTTI { get; set; }
87+
public bool EnableExceptions { get; set; }
8788
public LanguageVersion? LanguageVersion { get; set; }
8889

8990
public void BuildForSourceFile(
@@ -373,8 +374,8 @@ private void SetupArguments(TargetPlatform targetPlatform)
373374
break;
374375
}
375376

376-
if (!EnableRTTI)
377-
AddArguments("-fno-rtti");
377+
AddArguments(EnableRTTI ? "-frtti" : "-fno-rtti");
378+
AddArguments(EnableExceptions ? "-fexceptions" : "-fno-exceptions");
378379
}
379380

380381
internal string BuiltinsDirBasePath

0 commit comments

Comments
 (0)