swiftshader seems to depend on nacl even with enable_nacl=false

127 views
Skip to first unread message

Paweł Hajdan, Jr.

unread,
Apr 21, 2017, 4:45:41 AM4/21/17
to chromium-dev
Looks like recent chromium versions (starting from 59.0.3071.9) added swiftshader which has a dependency on some nacl-related code.

I found about about this while trying to package above version for one of the Linux distributions. For some mysterious reason pnacl-subzero is not even part of tarball, but that's an issue I plan to deal with separately.

Do you have ideas why would the build depend on nacl-related parts even when I build with enable_nacl=false GN arg?

Side question: there seems to be enable_swiftshader=false GN arg, but it also seems not to take any effect.

ninja: error: '../../third_party/swiftshader/third_party/pnacl-subzero/src/IceAssembler.cpp', needed by 'obj/third_party/swiftshader/src/Reactor/swiftshader_subzero/IceAssembler.o', missing and no known rule to make it

Paweł

David Turner

unread,
Apr 21, 2017, 5:21:42 AM4/21/17
to Paweł Hajdan, Jr., chromium-dev
Swiftshader now uses the pnacl "sub-zero" JIT to generate machine code at runtime. It used to use LLVM for this, but sub-zero is much better.

It looks like this appears as a SwiftShader third-party, so it's not surprising that this doesn't depend on the enable_nacl flag.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAATLsPZKcMfeQHHXP3H2045LzWLsWDe3S2AiUBTK%2BVopWvfUUg%40mail.gmail.com.

Nicolas

unread,
Apr 21, 2017, 9:09:12 AM4/21/17
to Chromium-dev


On Friday, April 21, 2017 at 4:45:41 AM UTC-4, Paweł Hajdan, Jr. wrote:
Looks like recent chromium versions (starting from 59.0.3071.9) added swiftshader which has a dependency on some nacl-related code.

Yes, as David noted, SwiftShader for Chromium now uses PNaCl's Subzero project as a JIT compiler instead of LLVM. It has enabled us to shrink down the binaries to merely 560 kB (compressed), and ship it as an integral part of the installer instead of as a separately downloaded component.
 
I found about about this while trying to package above version for one of the Linux distributions. For some mysterious reason pnacl-subzero is not even part of tarball, but that's an issue I plan to deal with separately.

Subzero (still) has its own repository, and is pulled in by SwiftShader as part of its recursive DEPS. Could you elaborate on the tarball issue?
 
Do you have ideas why would the build depend on nacl-related parts even when I build with enable_nacl=false GN arg?

It only uses Subzero, not any other part of NaCl.

Side question: there seems to be enable_swiftshader=false GN arg, but it also seems not to take any effect.

That's for enabling Chromium to use SwiftShader if the GPU is blacklisted, but doesn't affect SwiftShader compilation. Currently we support Windows and desktop Linux, while on Mac OS we only compile it for now.
 
ninja: error: '../../third_party/swiftshader/third_party/pnacl-subzero/src/IceAssembler.cpp', needed by 'obj/third_party/swiftshader/src/Reactor/swiftshader_subzero/IceAssembler.o', missing and no known rule to make it

It looks like it didn't get checked out through the DEPS.

Let me know if I can help look into this.

-Nicolas
 
Paweł

Olivier Tilloy

unread,
Apr 21, 2017, 9:18:43 AM4/21/17
to ca...@chromium.org, Chromium-dev
On Fri, Apr 21, 2017 at 3:09 PM, Nicolas <ca...@chromium.org> wrote:
>
>
> On Friday, April 21, 2017 at 4:45:41 AM UTC-4, Paweł Hajdan, Jr. wrote:
>>
>> Looks like recent chromium versions (starting from 59.0.3071.9) added
>> swiftshader which has a dependency on some nacl-related code.
>
>
> Yes, as David noted, SwiftShader for Chromium now uses PNaCl's Subzero
> project as a JIT compiler instead of LLVM. It has enabled us to shrink down
> the binaries to merely 560 kB (compressed), and ship it as an integral part
> of the installer instead of as a separately downloaded component.
>
>>
>> I found about about this while trying to package above version for one of
>> the Linux distributions. For some mysterious reason pnacl-subzero is not
>> even part of tarball, but that's an issue I plan to deal with separately.
>
>
> Subzero (still) has its own repository, and is pulled in by SwiftShader as
> part of its recursive DEPS. Could you elaborate on the tarball issue?

The third_party/swiftshader/third_party/pnacl-subzero/ folder in the
source tarball for 59.0.3071.15 is empty, so swiftshader fails to
build.


>> Do you have ideas why would the build depend on nacl-related parts even
>> when I build with enable_nacl=false GN arg?
>
>
> It only uses Subzero, not any other part of NaCl.
>
>> Side question: there seems to be enable_swiftshader=false GN arg, but it
>> also seems not to take any effect.
>
>
> That's for enabling Chromium to use SwiftShader if the GPU is blacklisted,
> but doesn't affect SwiftShader compilation. Currently we support Windows and
> desktop Linux, while on Mac OS we only compile it for now.
>
>>
>> ninja: error:
>> '../../third_party/swiftshader/third_party/pnacl-subzero/src/IceAssembler.cpp',
>> needed by
>> 'obj/third_party/swiftshader/src/Reactor/swiftshader_subzero/IceAssembler.o',
>> missing and no known rule to make it
>
>
> It looks like it didn't get checked out through the DEPS.
>
> Let me know if I can help look into this.
>
> -Nicolas
>
>>
>> Paweł
>
> --
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
> ---
> You received this message because you are subscribed to the Google Groups
> "Chromium-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to chromium-dev...@chromium.org.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/ba5485f4-af8a-43b5-9a46-bc71ad33d323%40chromium.org.

Nicolas

unread,
Apr 21, 2017, 9:33:57 AM4/21/17
to Chromium-dev, ca...@chromium.org, Dirk Pranke, Jochen Eisinger, Nico Weber, Alexis Hétu


On Friday, April 21, 2017 at 9:18:43 AM UTC-4, Olivier Tilloy wrote:
On Fri, Apr 21, 2017 at 3:09 PM, Nicolas <ca...@chromium.org> wrote:
>
>
> On Friday, April 21, 2017 at 4:45:41 AM UTC-4, Paweł Hajdan, Jr. wrote:
>>
>> Looks like recent chromium versions (starting from 59.0.3071.9) added
>> swiftshader which has a dependency on some nacl-related code.
>
>
> Yes, as David noted, SwiftShader for Chromium now uses PNaCl's Subzero
> project as a JIT compiler instead of LLVM. It has enabled us to shrink down
> the binaries to merely 560 kB (compressed), and ship it as an integral part
> of the installer instead of as a separately downloaded component.
>
>>
>> I found about about this while trying to package above version for one of
>> the Linux distributions. For some mysterious reason pnacl-subzero is not
>> even part of tarball, but that's an issue I plan to deal with separately.
>
>
> Subzero (still) has its own repository, and is pulled in by SwiftShader as
> part of its recursive DEPS. Could you elaborate on the tarball issue?

The third_party/swiftshader/third_party/pnacl-subzero/ folder in the
source tarball for 59.0.3071.15 is empty, so swiftshader fails to
build.

As far as I'm aware the recursive DEPS isn't conditional, so it should always be checked out. CC'ing the people who were involved with adding it.
 

Marek Harańczyk

unread,
Apr 21, 2017, 10:08:01 AM4/21/17
to Chromium-dev, Dirk Pranke, Jochen Eisinger, Nico Weber, Alexis Hétu, Nicolas
Isn't swiftshader pnacl subzero sources missing from release tags/packages
just another case of crbug.com/704909 ?
> <https://codereview.chromium.org/2695813002> with adding it.
>> > email to chromium-dev...@chromium.org.

Paweł Hajdan, Jr.

unread,
Apr 26, 2017, 11:28:36 AM4/26/17
to mhara...@opera.com, Chromium-dev, Dirk Pranke, Jochen Eisinger, Nico Weber, Alexis Hétu, Nicolas
Great catch!

Most likely it is.

I was asked to file a bug to track this specific issue, so posting it here: https://bugs.chromium.org/p/chromium/issues/detail?id=715584

Paweł

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:   http://groups.google.com/a/chromium.org/group/chromium-dev
---You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/op.yy1tg9iyd9o73q%40desktop-5hp537s.wroclaw.osa.


Reply all
Reply to author
Forward
0 new messages