Commit b21b4898 by Derek Mauro Committed by Copybara-Service

Disable ABSL_ATTRIBUTE_TRIVIAL_ABI in open-source builds

Since compiler support for this attribute differs, if for example
system libraries compiled with GCC are mixed with libraries compiled
with Clang, types will have different ideas about their ABI.

PiperOrigin-RevId: 600467146
Change-Id: I5729e54d34176d019a2dee9afc36ed9da1da10fa
parent 2be67701
...@@ -843,15 +843,11 @@ ...@@ -843,15 +843,11 @@
// See also the upstream documentation: // See also the upstream documentation:
// https://clang.llvm.org/docs/AttributeReference.html#trivial-abi // https://clang.llvm.org/docs/AttributeReference.html#trivial-abi
// //
#if ABSL_HAVE_CPP_ATTRIBUTE(clang::trivial_abi) // b/321691395 - This is currently disabled in open-source builds since
#define ABSL_ATTRIBUTE_TRIVIAL_ABI [[clang::trivial_abi]] // compiler support differs. If system libraries compiled with GCC are mixed
#define ABSL_HAVE_ATTRIBUTE_TRIVIAL_ABI 1 // with libraries compiled with Clang, types will have different ideas about
#elif ABSL_HAVE_ATTRIBUTE(trivial_abi) // their ABI, leading to hard to debug crashes.
#define ABSL_ATTRIBUTE_TRIVIAL_ABI __attribute__((trivial_abi))
#define ABSL_HAVE_ATTRIBUTE_TRIVIAL_ABI 1
#else
#define ABSL_ATTRIBUTE_TRIVIAL_ABI #define ABSL_ATTRIBUTE_TRIVIAL_ABI
#endif
// ABSL_ATTRIBUTE_NO_UNIQUE_ADDRESS // ABSL_ATTRIBUTE_NO_UNIQUE_ADDRESS
// //
......
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