Title: [220615] trunk/Source
Revision
220615
Author
timothy_hor...@apple.com
Date
2017-08-11 15:35:30 -0700 (Fri, 11 Aug 2017)

Log Message

Fix the build with modern Clang's -Wexpansion-to-defined
https://bugs.webkit.org/show_bug.cgi?id=175467
<rdar://problem/33667497>

Reviewed by Simon Fraser.

Source/WebCore:

* crypto/mac/SerializedCryptoKeyWrapMac.mm:

Source/WTF:

* wtf/FeatureDefines.h:
* wtf/Platform.h:
Avoid object-like macros that expand to include defined(), because this
behaves inconsistently between different compilers (though in ways
that don't matter for these particular defines, which aren't used on MSVC),
and Clang has added a warning for it.

Move ENABLE_WEBASSEMBLY to Platform.h since it depends on things that
are defined there and can't be evaluated at time-of-use because of the
aforementioned new rules. Previously, there was a cycle between
ENABLE_WEBASSEMBLY and ENABLE_B3_JIT -- break that so that it just
goes FTL_JIT->B3_JIT->WASM instead.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (220614 => 220615)


--- trunk/Source/WTF/ChangeLog	2017-08-11 22:33:28 UTC (rev 220614)
+++ trunk/Source/WTF/ChangeLog	2017-08-11 22:35:30 UTC (rev 220615)
@@ -1,3 +1,24 @@
+2017-08-11  Tim Horton  <timothy_hor...@apple.com>
+
+        Fix the build with modern Clang's -Wexpansion-to-defined
+        https://bugs.webkit.org/show_bug.cgi?id=175467
+        <rdar://problem/33667497>
+
+        Reviewed by Simon Fraser.
+
+        * wtf/FeatureDefines.h:
+        * wtf/Platform.h:
+        Avoid object-like macros that expand to include defined(), because this
+        behaves inconsistently between different compilers (though in ways
+        that don't matter for these particular defines, which aren't used on MSVC),
+        and Clang has added a warning for it.
+
+        Move ENABLE_WEBASSEMBLY to Platform.h since it depends on things that
+        are defined there and can't be evaluated at time-of-use because of the
+        aforementioned new rules. Previously, there was a cycle between
+        ENABLE_WEBASSEMBLY and ENABLE_B3_JIT -- break that so that it just
+        goes FTL_JIT->B3_JIT->WASM instead.
+
 2017-08-10  Sam Weinig  <s...@webkit.org>
 
         WTF::Function does not allow for reference / non-default constructible return types

Modified: trunk/Source/WTF/wtf/FeatureDefines.h (220614 => 220615)


--- trunk/Source/WTF/wtf/FeatureDefines.h	2017-08-11 22:33:28 UTC (rev 220614)
+++ trunk/Source/WTF/wtf/FeatureDefines.h	2017-08-11 22:35:30 UTC (rev 220615)
@@ -152,10 +152,6 @@
 #define ENABLE_VIEW_MODE_CSS_MEDIA 0
 #endif
 
-#if !defined(ENABLE_WEBASSEMBLY)
-#define ENABLE_WEBASSEMBLY (defined(ENABLE_B3_JIT) && ENABLE_B3_JIT)
-#endif
-
 #if !defined(ENABLE_WEBGL)
 #define ENABLE_WEBGL 1
 #endif
@@ -211,10 +207,6 @@
 #define ENABLE_VIEW_MODE_CSS_MEDIA 0
 #endif
 
-#if !defined(ENABLE_WEBASSEMBLY)
-#define ENABLE_WEBASSEMBLY (defined(ENABLE_B3_JIT) && ENABLE_B3_JIT)
-#endif
-
 #if !defined(ENABLE_WEB_ARCHIVE)
 #define ENABLE_WEB_ARCHIVE 1
 #endif

Modified: trunk/Source/WTF/wtf/Platform.h (220614 => 220615)


--- trunk/Source/WTF/wtf/Platform.h	2017-08-11 22:33:28 UTC (rev 220614)
+++ trunk/Source/WTF/wtf/Platform.h	2017-08-11 22:35:30 UTC (rev 220615)
@@ -820,10 +820,18 @@
 #endif
 
 /* This controls whether B3 is built. B3 is needed for FTL JIT and WebAssembly */
-#if ENABLE(FTL_JIT) || ENABLE(WEBASSEMBLY)
+#if ENABLE(FTL_JIT)
 #define ENABLE_B3_JIT 1
 #endif
 
+#if !defined(ENABLE_WEBASSEMBLY)
+#if ENABLE(B3_JIT) && PLATFORM(COCOA)
+#define ENABLE_WEBASSEMBLY 1
+#else
+#define ENABLE_WEBASSEMBLY 0
+#endif
+#endif
+
 /* The SamplingProfiler is the probabilistic and low-overhead profiler used by
  * JSC to measure where time is spent inside a _javascript_ program.
  * In configurations other than Windows and Darwin, because layout of mcontext_t depends on standard libraries (like glibc),

Modified: trunk/Source/WebCore/ChangeLog (220614 => 220615)


--- trunk/Source/WebCore/ChangeLog	2017-08-11 22:33:28 UTC (rev 220614)
+++ trunk/Source/WebCore/ChangeLog	2017-08-11 22:35:30 UTC (rev 220615)
@@ -1,3 +1,13 @@
+2017-08-11  Tim Horton  <timothy_hor...@apple.com>
+
+        Fix the build with modern Clang's -Wexpansion-to-defined
+        https://bugs.webkit.org/show_bug.cgi?id=175467
+        <rdar://problem/33667497>
+
+        Reviewed by Simon Fraser.
+
+        * crypto/mac/SerializedCryptoKeyWrapMac.mm:
+
 2017-08-11  Brady Eidson  <beid...@apple.com>
 
         Crash under ServiceWorkerJob::failedWithException.

Modified: trunk/Source/WebCore/crypto/mac/SerializedCryptoKeyWrapMac.mm (220614 => 220615)


--- trunk/Source/WebCore/crypto/mac/SerializedCryptoKeyWrapMac.mm	2017-08-11 22:33:28 UTC (rev 220614)
+++ trunk/Source/WebCore/crypto/mac/SerializedCryptoKeyWrapMac.mm	2017-08-11 22:35:30 UTC (rev 220615)
@@ -37,7 +37,11 @@
 #include <wtf/CryptographicUtilities.h>
 #include <wtf/RetainPtr.h>
 
-#define USE_KEYCHAIN_ACCESS_CONTROL_LISTS (!PLATFORM(IOS))
+#if PLATFORM(IOS)
+#define USE_KEYCHAIN_ACCESS_CONTROL_LISTS 0
+#else
+#define USE_KEYCHAIN_ACCESS_CONTROL_LISTS 1
+#endif
 
 namespace WebCore {
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to