[waffle] [PATCH v2 2/4] waffle: add support for building Waffle using NaCl toolchain

Chad Versace chad.versace at intel.com
Wed Dec 31 10:44:40 PST 2014


On 12/28/2014 11:47 PM, Tapani Pälli wrote:
> 
> 
> On 12/21/2014 03:53 PM, Emil Velikov wrote:
>> On 17 December 2014 at 10:17, Tapani Pälli <tapani.palli at intel.com> wrote:

 
>>> +        if(NOT EXISTS ${CMAKE_TOOLCHAIN_FILE})
>>> +            message(FATAL_ERROR "Toolchain for Nacl not found. This must be "
>>> +                                "configured using CMAKE_TOOLCHAIN_FILE.")
>>> +        endif()
>>> +
>> Don't think we need this check, but I'll leave it up-to Chad to be the
>> final judge.
> 
> This is fine for me, I left it there to have a bit more verbose output for the user as without it things blow up and it may not be clear for user that the file should be specified for compilation to work.

Good idea. I blew up CMake with a missing toolchain file, and the result was very cryptic. We
should protect Waffle users from CMake's awful error messages.


> 
>>> +        # Warn the user that building tests is disabled.
>>> +        if(waffle_build_tests)
>>> +            message(WARNING "Building the tests with the NaCl backend "
>>> +                            "is not supported, skipping tests.")
>>> +            set(waffle_build_tests OFF)
>>> +        endif()
>>> +
>>> +        # When building for NaCl, disable incompatible backends.
>>> +        set(waffle_has_gbm OFF)
>>> +        set(waffle_has_egl OFF)
>>> +        set(waffle_has_glx OFF)
>>> +        set(waffle_has_x11 OFF)
>>> +        set(waffle_has_x11_egl OFF)
>>> +        set(waffle_has_wayland OFF)
>> The platform supports dlopen/dlsym, so I'm quite confident that we can
>> get it working.
>> That will obviously can be looked at a later stage. Can you add a
>> small TODO line ?
> 
> Only the glibc version supports dlopen, pnacl does not. Also I don't see the use case of calling waffle from javascript to open a Wayland window? I don't think Chrome security wise would allow such to happen. The realistic use case is to show content on the browser window. Also the resulted waffle binary can not be expected to work in any other system than within chrome.

Right. The NaCl runtime is extremely locked down. The resultant executable can't interact with
things outside the browser runtime. So, when building Waffle for NaCl, it makes sense to
disable support for all other platforms. And since support for PNaCl is a goal, we can't
rely on dlopen anyway.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/waffle/attachments/20141231/de79d610/attachment.sig>


More information about the waffle mailing list