From 67eb2235684a6b31bdc30aa02995946ab5a3d663 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sun, 10 Oct 2021 19:51:03 -0700 Subject: [PATCH] CoreFoundation: add a workaround for Linux with the rebranch Avoid optimizations on Linux as LICM, LoadStoreHoisting, and inlining seems to play bad tricks on range merging. This allows the AttributedString tests to pass on Linux after the rebranch. SR-15302 tracks resolving the underlying issue(s). Thanks to @etcwilde for tracking down this issue! --- CoreFoundation/String.subproj/CFAttributedString.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CoreFoundation/String.subproj/CFAttributedString.c b/CoreFoundation/String.subproj/CFAttributedString.c index cc33885d7e..a1e52e9b92 100644 --- a/CoreFoundation/String.subproj/CFAttributedString.c +++ b/CoreFoundation/String.subproj/CFAttributedString.c @@ -23,6 +23,10 @@ @end #endif +#if defined(__linux__) +#pragma clang optimize off +#endif + struct __CFAttributedString { CFRuntimeBase base; CFStringRef string;