-
-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PNaCl #800
Comments
|
PNaCl has a few special passes, i.e. for type legalisation. |
|
So there is some special gear between the frontend and the .bc output? |
|
I think the PNaCl backend handels the special stuff. |
|
I am in a position where I may be able to get D adopted by my company if we have support for this. Is there anything required by the front-end other than supporting If we can output a .bc with the proper build options, then Google's official PNaCl toolchain should be able to take it from there. |
|
I have never really dealt with PNaCl beyond experimenting with the official toolchain, but as far as I can see, the compiler backend side of things should be rather simple. Maybe the target setup code will need a bit of massaging from someone vaguely familiar with LLVM, but it shouldn't be too big of a roadblock as we don't really use any obscure LLVM bitcode features (beyond inline asm). I'm not sure whether the PNaCl legalization passes are available as a standalone tool that takes standard LLVM IR as @UplinkCoder seems to suggest above. If not, you might have to build against Google's patched LLVM. But again, as we support a wide range of LLVM versions and don't really use any exotic APIs, this shouldn't be hard. The much more cumbersome part will be to port druntime to this environment, especially if you want some level of support for GC and static constructors. Unless you have somebody that is comfortable with tackling this (or find somebody else who can spare the time to do so), I can't really advise trying to sell D for PNaCl support at this point. |
|
I would have thought the legalisation passes would happen at the link step? I expect the easiest way to use LDC for these targets would be to use LDC to output .bc files, and then pipe them through Clang and the rest of the official toolchains to finish the job? I am happy to have a crack at druntime ports if any of you LDC guys can make an experimental toolchain available. I can do useful work with '-betterc' (ie, no runtime) for now. We don't need the runtime up front. This will be for very small/light workloads initially, and we can workaround missing runtime features. To get from frontent->bc, is it just a matter of configuring the target appropriately? Ie, supporting those triple's and giving proper pointer sizes and all that gear? What are the major complexities that usually appear at that level? |
|
For a simple milestone, try getting the Hello Tutorial running. There are some cpp interfaces: #include "ppapi/cpp/instance.h"
#include "ppapi/cpp/module.h"
#include "ppapi/cpp/var.h"And some hard coded extern names (namespace pp.CreateModule): |
|
I've tried this before, but I think I need an LDC build that supports the target. I have trouble imagining that the ABI will be compatible... |
|
Then, of course, there's this: Google refuses to reveal to me how to instruct the compiler to disable druntime. Something like walter's |
|
Manu, are you still working on this?
the flag -defaultlib= with nothing after it should disable druntime and phobos. |
|
I wouldn't say I'm 'working' on it. I had a couple of cracks at fiddling with it, but I'm pretty sure it'll need a special build of LDC with some patches. |
|
Wikipedia:
=> Closing as part of house cleaning. |
Has anyone looked at Google's Native Client?
I have to write some NaCl software; it looks like Clang produces a normal .bc file and then their backend toolchain takes it from there.
Is there anything special about their PNaCl Clang, and the .bc it produces?
Has anybody looked into the work involved in supporting PNaCl in LDC?
The text was updated successfully, but these errors were encountered: