Commit 59eb5dd0 by Nicolas Capens Committed by Nicolas Capens

Set LLVM_ENABLE_ABI_BREAKING_CHECKS for Debug builds only

LLVM_ENABLE_ABI_BREAKING_CHECKS was disabled everywhere except for Fuchsia. It triggered llvm::Error::assertIsChecked() in the new ORCv2 code because we're supposed to check Expected<> didn't return an error by casting it to a bool, which we only do in Debug builds. Since this option costs performance in Release builds and we don't want to abort on errors (especially benign ones), it should only be enable for Debug builds. This is also the default behavior for standalone builds of LLVM: https://llvm.org/docs/ProgrammersManual.html#abi-breaking-checks Bug: b/171236524 Bug: chromium:1140854 Change-Id: If886fe9ef61d0f5392949d34a63ed3d7de7aa916 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/49908Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com>
parent b5bf8269
...@@ -13,7 +13,11 @@ ...@@ -13,7 +13,11 @@
#define LLVM_ABI_BREAKING_CHECKS_H #define LLVM_ABI_BREAKING_CHECKS_H
/* Define to enable checks that alter the LLVM C++ ABI */ /* Define to enable checks that alter the LLVM C++ ABI */
#if defined(NDEBUG)
#define LLVM_ENABLE_ABI_BREAKING_CHECKS 0 #define LLVM_ENABLE_ABI_BREAKING_CHECKS 0
#else
#define LLVM_ENABLE_ABI_BREAKING_CHECKS 1
#endif
/* Define to enable reverse iteration of unordered llvm containers */ /* Define to enable reverse iteration of unordered llvm containers */
#define LLVM_ENABLE_REVERSE_ITERATION 0 #define LLVM_ENABLE_REVERSE_ITERATION 0
......
...@@ -13,7 +13,11 @@ ...@@ -13,7 +13,11 @@
#define LLVM_ABI_BREAKING_CHECKS_H #define LLVM_ABI_BREAKING_CHECKS_H
/* Define to enable checks that alter the LLVM C++ ABI */ /* Define to enable checks that alter the LLVM C++ ABI */
#if defined(NDEBUG)
#define LLVM_ENABLE_ABI_BREAKING_CHECKS 0 #define LLVM_ENABLE_ABI_BREAKING_CHECKS 0
#else
#define LLVM_ENABLE_ABI_BREAKING_CHECKS 1
#endif
/* Define to enable reverse iteration of unordered llvm containers */ /* Define to enable reverse iteration of unordered llvm containers */
#define LLVM_ENABLE_REVERSE_ITERATION 0 #define LLVM_ENABLE_REVERSE_ITERATION 0
......
...@@ -13,7 +13,11 @@ ...@@ -13,7 +13,11 @@
#define LLVM_ABI_BREAKING_CHECKS_H #define LLVM_ABI_BREAKING_CHECKS_H
/* Define to enable checks that alter the LLVM C++ ABI */ /* Define to enable checks that alter the LLVM C++ ABI */
#if defined(NDEBUG)
#define LLVM_ENABLE_ABI_BREAKING_CHECKS 0
#else
#define LLVM_ENABLE_ABI_BREAKING_CHECKS 1 #define LLVM_ENABLE_ABI_BREAKING_CHECKS 1
#endif
/* Define to enable reverse iteration of unordered llvm containers */ /* Define to enable reverse iteration of unordered llvm containers */
#define LLVM_ENABLE_REVERSE_ITERATION 0 #define LLVM_ENABLE_REVERSE_ITERATION 0
......
...@@ -13,7 +13,11 @@ ...@@ -13,7 +13,11 @@
#define LLVM_ABI_BREAKING_CHECKS_H #define LLVM_ABI_BREAKING_CHECKS_H
/* Define to enable checks that alter the LLVM C++ ABI */ /* Define to enable checks that alter the LLVM C++ ABI */
#if defined(NDEBUG)
#define LLVM_ENABLE_ABI_BREAKING_CHECKS 0 #define LLVM_ENABLE_ABI_BREAKING_CHECKS 0
#else
#define LLVM_ENABLE_ABI_BREAKING_CHECKS 1
#endif
/* Define to enable reverse iteration of unordered llvm containers */ /* Define to enable reverse iteration of unordered llvm containers */
#define LLVM_ENABLE_REVERSE_ITERATION 0 #define LLVM_ENABLE_REVERSE_ITERATION 0
......
...@@ -13,7 +13,11 @@ ...@@ -13,7 +13,11 @@
#define LLVM_ABI_BREAKING_CHECKS_H #define LLVM_ABI_BREAKING_CHECKS_H
/* Define to enable checks that alter the LLVM C++ ABI */ /* Define to enable checks that alter the LLVM C++ ABI */
#if defined(NDEBUG)
#define LLVM_ENABLE_ABI_BREAKING_CHECKS 0 #define LLVM_ENABLE_ABI_BREAKING_CHECKS 0
#else
#define LLVM_ENABLE_ABI_BREAKING_CHECKS 1
#endif
/* Define to enable reverse iteration of unordered llvm containers */ /* Define to enable reverse iteration of unordered llvm containers */
#define LLVM_ENABLE_REVERSE_ITERATION 0 #define LLVM_ENABLE_REVERSE_ITERATION 0
......
...@@ -13,7 +13,11 @@ ...@@ -13,7 +13,11 @@
#define LLVM_ABI_BREAKING_CHECKS_H #define LLVM_ABI_BREAKING_CHECKS_H
/* Define to enable checks that alter the LLVM C++ ABI */ /* Define to enable checks that alter the LLVM C++ ABI */
#if defined(NDEBUG)
#define LLVM_ENABLE_ABI_BREAKING_CHECKS 0
#else
#define LLVM_ENABLE_ABI_BREAKING_CHECKS 1 #define LLVM_ENABLE_ABI_BREAKING_CHECKS 1
#endif
/* Define to disable the link-time checking of mismatch for /* Define to disable the link-time checking of mismatch for
LLVM_ENABLE_ABI_BREAKING_CHECKS */ LLVM_ENABLE_ABI_BREAKING_CHECKS */
......
...@@ -13,7 +13,11 @@ ...@@ -13,7 +13,11 @@
#define LLVM_ABI_BREAKING_CHECKS_H #define LLVM_ABI_BREAKING_CHECKS_H
/* Define to enable checks that alter the LLVM C++ ABI */ /* Define to enable checks that alter the LLVM C++ ABI */
#if defined(NDEBUG)
#define LLVM_ENABLE_ABI_BREAKING_CHECKS 0
#else
#define LLVM_ENABLE_ABI_BREAKING_CHECKS 1 #define LLVM_ENABLE_ABI_BREAKING_CHECKS 1
#endif
/* Define to disable the link-time checking of mismatch for /* Define to disable the link-time checking of mismatch for
LLVM_ENABLE_ABI_BREAKING_CHECKS */ LLVM_ENABLE_ABI_BREAKING_CHECKS */
......
...@@ -13,7 +13,11 @@ ...@@ -13,7 +13,11 @@
#define LLVM_ABI_BREAKING_CHECKS_H #define LLVM_ABI_BREAKING_CHECKS_H
/* Define to enable checks that alter the LLVM C++ ABI */ /* Define to enable checks that alter the LLVM C++ ABI */
#if defined(NDEBUG)
#define LLVM_ENABLE_ABI_BREAKING_CHECKS 0
#else
#define LLVM_ENABLE_ABI_BREAKING_CHECKS 1 #define LLVM_ENABLE_ABI_BREAKING_CHECKS 1
#endif
/* Define to disable the link-time checking of mismatch for /* Define to disable the link-time checking of mismatch for
LLVM_ENABLE_ABI_BREAKING_CHECKS */ LLVM_ENABLE_ABI_BREAKING_CHECKS */
......
...@@ -13,7 +13,11 @@ ...@@ -13,7 +13,11 @@
#define LLVM_ABI_BREAKING_CHECKS_H #define LLVM_ABI_BREAKING_CHECKS_H
/* Define to enable checks that alter the LLVM C++ ABI */ /* Define to enable checks that alter the LLVM C++ ABI */
#if defined(NDEBUG)
#define LLVM_ENABLE_ABI_BREAKING_CHECKS 0
#else
#define LLVM_ENABLE_ABI_BREAKING_CHECKS 1 #define LLVM_ENABLE_ABI_BREAKING_CHECKS 1
#endif
/* Define to disable the link-time checking of mismatch for /* Define to disable the link-time checking of mismatch for
LLVM_ENABLE_ABI_BREAKING_CHECKS */ LLVM_ENABLE_ABI_BREAKING_CHECKS */
......
...@@ -13,7 +13,11 @@ ...@@ -13,7 +13,11 @@
#define LLVM_ABI_BREAKING_CHECKS_H #define LLVM_ABI_BREAKING_CHECKS_H
/* Define to enable checks that alter the LLVM C++ ABI */ /* Define to enable checks that alter the LLVM C++ ABI */
#if defined(NDEBUG)
#define LLVM_ENABLE_ABI_BREAKING_CHECKS 0
#else
#define LLVM_ENABLE_ABI_BREAKING_CHECKS 1 #define LLVM_ENABLE_ABI_BREAKING_CHECKS 1
#endif
/* Define to disable the link-time checking of mismatch for /* Define to disable the link-time checking of mismatch for
LLVM_ENABLE_ABI_BREAKING_CHECKS */ LLVM_ENABLE_ABI_BREAKING_CHECKS */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment