See the preRun() functions, which should call those. Can add some debug
printouts to see that that function is reached, and that Module.preRun has
the right value when it does.

(It should be called from run())

- Alon


On Wed, Oct 8, 2014 at 2:29 PM, bobajeff <[email protected]> wrote:

> I've started porting fastcomp (llvm/clang) to run in a browser to compile
> and execute c/c++ code. However I ran into an issue getting it to read some
> header files. I'm trying to use the createPreloadedFile API to load them
> from Module.preRun but that doesn't seem to be working.
>
> Here's what I put in var Module:
>       preRun: function() {
>         console.log('prerun');
>         FS.createPath("/", "system/include/libc/bits/", true, true);
>         FS.createPreloadedFile('/system/include/libc/', 'stdio.h',
> 'emscripten_datafiles/include/libc/stdiytdfhjyfo.h', true, true);
>         FS.createPreloadedFile('/system/include/libc/', 'features.h',
> 'emscripten_datafiles/include/libc/features.h', true, true);
>         FS.createPreloadedFile('/system/include/libc/bits/', 'alltypes.h',
> 'emscripten_datafiles/include/libc/bits/alltypes.h', true, true);
>
>       },
>
> The full file is in the attachment. Also, here's a link to all of the
> files for the test page *(It's modified from the test page in
> clangor-master/js <https://github.com/kripken/clangor/tree/master/js>)*:
> http://www.mediafire.com/download/dtifmmt9ktvqt2u/fastcomp_browsertest.zip
>
>
> But when I run it the javascript console doesn't print the "prerun" string
> so I suspect it's not even running. Any ideas?
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to