<https://webkit.org/b/000000>
Reviewed by NOBODY (OOPS!).
Fixes the following warning when building with newer clang:
In file included from Source/WTF/wtf/AutomaticThread.cpp:26:
In file included from Source/WTF/config.h:26:
Debug/usr/local/include/wtf/Platform.h:807:24: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if ENABLE(FTL_JIT) || ENABLE(WEBASSEMBLY)
^
Debug/usr/local/include/wtf/Platform.h:56:63: note: expanded from macro 'ENABLE'
#define ENABLE(WTF_FEATURE) (defined ENABLE_##WTF_FEATURE && ENABLE_##WTF_FEATURE)
^
<scratch space>:199:1: note: expanded from here
ENABLE_WEBASSEMBLY
^
In file included from Source/WTF/wtf/AutomaticThread.cpp:26:
In file included from Source/WTF/config.h:26:
In file included from Debug/usr/local/include/wtf/Platform.h:702:
Debug/usr/local/include/wtf/FeatureDefines.h:223:29: note: expanded from macro 'ENABLE_WEBASSEMBLY'
#define ENABLE_WEBASSEMBLY (defined(ENABLE_B3_JIT) && ENABLE_B3_JIT)
^
* wtf/FeatureDefines.h:
(ENABLE_WEBASSEMBLY): Define using separate #if/#else/#endif
macros.
---
2 files changed, 41 insertions(+), 2 deletions(-)
Created attachment 310071[details]
Archive of layout-test-results from ews102 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 310072[details]
Archive of layout-test-results from ews117 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 310074[details]
Archive of layout-test-results from ews104 for mac-elcapitan-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Created attachment 310079[details]
Archive of layout-test-results from ews101 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 310081[details]
Archive of layout-test-results from ews112 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 310082[details]
Archive of layout-test-results from ews106 for mac-elcapitan-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
(In reply to David Kilzer (:ddkilzer) from comment #14)
> Created attachment 310190[details]
> Patch v2 (to double-check El Capitan EWS)
And I didn't mean to clear Dan's r+ from Attachment #310059[details], but webkit-patch did that automatically because I forgot to pass the command-line switch to prevent it.
Created attachment 310206[details]
Archive of layout-test-results from ews103 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 310209[details]
Archive of layout-test-results from ews116 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 310212[details]
Archive of layout-test-results from ews105 for mac-elcapitan-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Created attachment 310220[details]
Archive of layout-test-results from ews100 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 310223[details]
Archive of layout-test-results from ews104 for mac-elcapitan-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Created attachment 310225[details]
Archive of layout-test-results from ews114 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 310190[details]
Patch v2 (to double-check El Capitan EWS)
Okay, I know why this fails. It's because:
1. ENABLE_WEBASSEMBLY is defined in FeatureDefines.h.
2. FeatureDefines.h is included in Platform.h, but *before* ENABLE_B3_JIT is defined.
Thus ENABLE_WEBASSEMBLY gets set to 0 with this patch because ENABLE_B3_JIT is not defined yet.
And prior to this patch, we had this in FeatureDefines.h:
#if !defined(ENABLE_WEBASSEMBLY)
#define ENABLE_WEBASSEMBLY (defined(ENABLE_B3_JIT) && ENABLE_B3_JIT)
#endif
And then this (after #include "FeatureDefines.h") in Platform.h:
/* This controls whether B3 is built. B3 is needed for FTL JIT and WebAssembly */
#if ENABLE(FTL_JIT) || ENABLE(WEBASSEMBLY)
#define ENABLE_B3_JIT 1
#endif
Which means that the second macro was probably doing this:
/* This controls whether B3 is built. B3 is needed for FTL JIT and WebAssembly */
#if ENABLE(FTL_JIT) || (defined (defined(ENABLE_B3_JIT) && ENABLE_B3_JIT) && (defined(ENABLE_B3_JIT) && ENABLE_B3_JIT))
#define ENABLE_B3_JIT 1
#endif
In other words, ENABLE_B3_JIT and ENABLE_WEBASSEMBLY were co-dependent.
Then for Apple platforms ENABLE_FTL_JIT is actually defined in FeatureDefines.xcconfig instead of FeatureDefines.h or Platform.h.
And ENABLE_WEBASSEMBLY is disabled in FeatureDefines.xcconfig, but re-enabled in FeatureDefines.h!
If nothing is using ENABLE_FTL_JIT in FeatureDefines.xcconfig, seems like it would be cleaner to move that into FeatureDefines.h or Platform.h.
(In reply to David Kilzer (:ddkilzer) from comment #30)
> If nothing is using ENABLE_FTL_JIT in FeatureDefines.xcconfig, seems like it
> would be cleaner to move that into FeatureDefines.h or Platform.h.
More specifically, if no scripts in the JavaScriptCore project are using ENABLE_FLT_JIT in FeatureDefines.xcconfig, we can move it into either FeatureDefines.h or Platform.h.
(In the WebCore project, DerivedSources.make uses FeatureDefines.xcconfig for some scripts, but I don't see any such scripts in JavaScriptCore.)
2017-05-13 21:38 PDT, David Kilzer (:ddkilzer)
2017-05-13 23:45 PDT, Build Bot
2017-05-14 00:05 PDT, Build Bot
2017-05-14 00:12 PDT, Build Bot
2017-05-14 01:43 PDT, Build Bot
2017-05-14 02:06 PDT, Build Bot
2017-05-14 02:19 PDT, Build Bot
2017-05-15 17:01 PDT, David Kilzer (:ddkilzer)
2017-05-15 19:25 PDT, Build Bot
2017-05-15 19:48 PDT, Build Bot
2017-05-15 19:56 PDT, Build Bot
2017-05-15 21:27 PDT, Build Bot
2017-05-15 22:04 PDT, Build Bot
2017-05-15 22:11 PDT, Build Bot
2017-05-16 13:41 PDT, David Kilzer (:ddkilzer)