Added AMD externs so that Binaryen builds fine#5748
Added AMD externs so that Binaryen builds fine#5748kripken merged 1 commit intoemscripten-core:incomingfrom nazar-pc:amd-externs
Conversation
| */ | ||
| var SDL; | ||
|
|
||
| // Module loaders externs, primarily for Binaryen |
There was a problem hiding this comment.
If this is primarily for binaryen, could this be done there instead?
There was a problem hiding this comment.
I believe it is not possible to pass additional arguments like externs to Closure Compiler externally, at least not right now. Also Binaryen is tightly related project.
However, allowing external arguments to Closure Compiler would be useful in general if someone can implement it.
There was a problem hiding this comment.
Thanks, I see.
Let's leave this as it is, then. Also I think define is from AMD, so it could help other things too, so makes sense to do it here.
lgtm, just waiting to merge on your ping to @dcodeIO.
There was a problem hiding this comment.
Makes sense to me to have define being declared. For instance, wabt.js has a very similar wrapper that will benefit from this.
Ideally, binaryen.js would have its own specific externs. That would also remove the necessity to use [' ... '] everywhere to prevent renaming. But that's another story, of course.
|
Confirming that it compiles again. |
This is a fix for building Binaryen.js as noted here: #5720 (comment)
With this change I've compiled Binaryen.js master branch without issues.
@dcodeIO, does it work for you too?