State of NaCl in monorepo?

Hi all,

LLVM/Clang supports an OS called 'NaCl' (llvm/include/llvm/ADT/Triple.h).
It apparently hasn't had any development since 2015.

This page WebAssembly Migration Guide - Chrome Developers
mentions that NaCl is deprecated.

Is it still used? If not, I would propose that we remove it.
I created a patch ⚙ D78441 Delete NaCl support which I think can
delete 90% of the related code.

There are still a few references left (noticeably aligned bundling in
MC) Aligned bundling support in LLVM - The Chromium Projects
I will delete that as a follow-up.

My understanding is that the project is not active, if that is true, then there doesn’t seem like a strong reason to keep support for it in ToT LLVM.

That said, please give this a week or two for people to object - I’d also suggest poking some of the NaCl people at Google if you haven’t already,

-Chris

Hi all,

LLVM/Clang supports an OS called ‘NaCl’ (llvm/include/llvm/ADT/Triple.h).
It apparently hasn’t had any development since 2015.

This page https://developer.chrome.com/native-client/migration
mentions that NaCl is deprecated.

Is it still used? If not, I would propose that we remove it.
I created a patch https://reviews.llvm.org/D78441 which I think can
delete 90% of the related code.

There are still a few references left (noticeably aligned bundling in
MC) https://sites.google.com/a/chromium.org/dev/nativeclient/pnacl/aligned-bundling-support-in-llvm
I will delete that as a follow-up.

AFAIK aligned bundling has other users (e.g. the author of https://reviews.llvm.org/D19924 mentioned interested in using bundle locked groups for Hexagon) so its removal should be probably treated as a separate proposal.

Hi Fangrui,
As you noted we are working on helping our NaCl users transition to WebAssembly and new web APIs that cover the functionality offered by NaCl. In terms of actually turning down the platform features, we recently announced a timeline at https://blog.chromium.org/2020/01/moving-forward-from-chrome-apps.html.

In terms of LLM, I would prefer to keep the support we have in the tree until we complete the turndown as long as the support isn’t unusually onerous. Not all of our NaCl toolchain code is upstream, but we are actually about to redo part of our current downstream code soon to improve Chromium’s C++ support until we complete the platform turndown. And of course we continue to be available to support it upstream as needed, especially if there is some particular problem you’re looking to solve by removing this code.
Feel free to contact me directly as well (aside from the usual channels like this list of course) if you want more on NaCl or PNaCl.

But the most recent NaCL toolchain release is based on LLVM 3.7 from 2015.

Unless you’re planning to upgrade the NaCL toolchain to use a new release based on LLVM devhead (which would seem a rather expensive thing to attempt now, given the plan to desupport it in a year), I don’t think keeping the code in LLVM is actually useful for anyone at this point.

We do not plan to do a full NaCl toolchain release. Instead there is a smaller component that’s only used as part of the Chrome build (which builds a sandboxed runtime component from code in the Chromium codebase), which only needs to support a subset of the codegen functionality. The amount of NaCl code upstream is not actually that large; but it is largely parts that are harder to keep out-of-tree patches for.

But the most recent NaCL toolchain release is based on LLVM 3.7 from 2015.

Unless you’re planning to upgrade the NaCL toolchain to use a new release based on LLVM devhead (which would seem a rather expensive thing to attempt now, given the plan to desupport it in a year), I don’t think keeping the code in LLVM is actually useful for anyone at this point.

Right, I think this is the key issue. If the community cannot use the code that is in tree, there isn’t a strong reason for the community to maintain it.

-Chris

But the most recent NaCL toolchain release is based on LLVM 3.7 from 2015.

Unless you’re planning to upgrade the NaCL toolchain to use a new release based on LLVM devhead (which would seem a rather expensive thing to attempt now, given the plan to desupport it in a year), I don’t think keeping the code in LLVM is actually useful for anyone at this point.

Right, I think this is the key issue. If the community cannot use the code that is in tree, there isn’t a strong reason for the community to maintain it.

IIUC, Derek is saying that a build of Chrome uses the limited NaCl support, but they plan to stop this on June 2021. It’s therefore usable in a limited manner, and I don’t think there’s much of a cost to the LLVM community if we leave in until June 2021. Keeping it in likely makes his life easier because they don’t need to maintain downstream patches while the turn NaCl down. I imagine that Derek has already implicitly signed up for this maintenance, if ever is required, as well as for the removal in June 2021.

I see ~zero cost, and upsides for Derek’s team, in keeping this for now.

IIUC, Derek is saying that a build of Chrome uses the limited NaCl support, but they plan to stop this on June 2021. It’s therefore usable in a limited manner,

Yes, all the official Chrome builds use it, or will soon.

and I don’t think there’s much of a cost to the LLVM community if we leave in until June 2021. Keeping it in likely makes his life easier because they don’t need to maintain downstream patches while the turn NaCl down. I imagine that Derek has already implicitly signed up for this maintenance, if ever is required, as well as for the removal in June 2021.

Yes, exactly.

I see ~zero cost, and upsides for Derek’s team, in keeping this for now.

There are also some pieces that are specific to PNaCl (the portable subset) rather than NaCl that we can remove right away if folks want that.

Ok! Seems fine to me, thank you for explaining this,

-Chris