[Webkit-unassigned] [Bug 220365] [JSC] Allow to build WebAssembly without B3

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 22 14:40:58 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=220365

--- Comment #20 from Xan Lopez <xan.lopez at gmail.com> ---
(In reply to Don Olmstead from comment #19)
> Comment on attachment 418144 [details]
> Make Wasm/B3 a compile-time option, v11
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=418144&action=review
> 
> > Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp:70
> > +#if !ENABLE(WEBASSEMBLY)
> > +#error ENABLE(WEBASSEMBLY_B3JIT) is enabled, but ENABLE(WEBASSEMBLY) is not.
> > +#endif
> > +
> 
> You probably want this check in wtf/PlatformEnable.h.

Mark suggested in comment #12 to put it here, so the check does not run multiple times.

> 
> See
> https://github.com/WebKit/WebKit/blob/main/Source/WTF/wtf/PlatformEnable.
> h#L861-L881 for examples.
> 
> > Source/WTF/wtf/PlatformEnable.h:685
> >  #if !defined(ENABLE_WEBASSEMBLY) && (ENABLE(B3_JIT) && PLATFORM(COCOA) && CPU(ADDRESS64))
> >  #define ENABLE_WEBASSEMBLY 1
> > +#define ENABLE_WEBASSEMBLY_B3JIT 1
> >  #endif
> 
> Just a thought but would it be better to move this later and do the
> following?
> 
> #if !defined(ENABLE_WEBASSEMBLY_B3JIT) && (ENABLE(WEBASSEMBLY) &&
> ENABLE(B3_JIT))
> #define ENABLE_WEBASSEMBLY_B3JIT 1
> #endif

This can be a bit confusing at first, but that code only matters for PLATFORM(COCOA) because cmake platforms do this feature dependency tracking/enforcing in the cmake files themselves (see the cmake changes in this patch). And we need to do this in this patch, otherwise WEBASSEMBLY_B3JIT won't be defined and the builds for Mac/iOS/etc will fail.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210122/7fedeef2/attachment.htm>


More information about the webkit-unassigned mailing list