From f95179062eb65ce40895cc76f1398cce25394369 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Thu, 1 Nov 2018 14:00:22 -0700 Subject: Export of internal Abseil changes. -- 4e224c85c3730398919fc5195cb1fc7a752e6e4f by Mark Barolak : Update some references to "StringPiece" to say "string_view" instead. PiperOrigin-RevId: 219693697 -- 6bdc925a3db5e97f1f8a404bdfda2e47e48f7b9a by Abseil Team : Disable weak symbols for the Windows backend of LLVM, since they are currently buggy. See https://bugs.llvm.org/show_bug.cgi?id=37598 for more information. PiperOrigin-RevId: 219676493 -- 5823f495036181191f435efa4c45d60ca3160145 by Derek Mauro : Don't use the SSE2 implementation of container_internal::Group with -funsigned-char under GCC. This is a workaround for https://github.com/abseil/abseil-cpp/issues/209. _mm_cmpgt_epi8 is broken under GCC with -funsigned-char. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87853 PiperOrigin-RevId: 219666066 GitOrigin-RevId: 4e224c85c3730398919fc5195cb1fc7a752e6e4f Change-Id: I2f115d0256576cf476ae73a9464c21d4106a2a56 --- absl/base/attributes.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'absl/base/attributes.h') diff --git a/absl/base/attributes.h b/absl/base/attributes.h index e850022..c44b882 100644 --- a/absl/base/attributes.h +++ b/absl/base/attributes.h @@ -155,7 +155,12 @@ // ABSL_ATTRIBUTE_WEAK // // Tags a function as weak for the purposes of compilation and linking. -#if ABSL_HAVE_ATTRIBUTE(weak) || (defined(__GNUC__) && !defined(__clang__)) +// Weak attributes currently do not work properly in LLVM's Windows backend, +// so disable them there. See https://bugs.llvm.org/show_bug.cgi?id=37598 +// for futher information. +#if (ABSL_HAVE_ATTRIBUTE(weak) || \ + (defined(__GNUC__) && !defined(__clang__))) && \ + !(defined(__llvm__) && defined(_WIN32)) #undef ABSL_ATTRIBUTE_WEAK #define ABSL_ATTRIBUTE_WEAK __attribute__((weak)) #define ABSL_HAVE_ATTRIBUTE_WEAK 1 @@ -296,13 +301,13 @@ // ABSL_HAVE_ATTRIBUTE_SECTION // -// Indicates whether labeled sections are supported. Labeled sections are not -// supported on Darwin/iOS. +// Indicates whether labeled sections are supported. Weak symbol support is +// a prerequisite. Labeled sections are not supported on Darwin/iOS. #ifdef ABSL_HAVE_ATTRIBUTE_SECTION #error ABSL_HAVE_ATTRIBUTE_SECTION cannot be directly set #elif (ABSL_HAVE_ATTRIBUTE(section) || \ (defined(__GNUC__) && !defined(__clang__))) && \ - !defined(__APPLE__) + !defined(__APPLE__) && ABSL_HAVE_ATTRIBUTE_WEAK #define ABSL_HAVE_ATTRIBUTE_SECTION 1 // ABSL_ATTRIBUTE_SECTION -- cgit v1.2.3