Skip to content
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

Using compiler options in cib #6

Open
strepkov opened this issue Mar 20, 2018 · 3 comments
Open

Using compiler options in cib #6

strepkov opened this issue Mar 20, 2018 · 3 comments

Comments

@strepkov
Copy link

strepkov commented Mar 20, 2018

Hi!

I'm trying to compile a program, which has been written in C++ to .wasm using cib. Could you please tell me, is it possible to pass compiler options? Maybe in the source code(like we do downloading some .zip files) or in another way?
When I do compilation with emscripten, I'm passing following parameters:

emcc.bat, pID.cpp, -o, pID.js, -I"..\armadillo", -s, WASM=1, -s, AGGRESSIVE_VARIABLE_ELIMINATION=1, -s, ALLOW_MEMORY_GROWTH=1, -L., -DARMA_DONT_USE_WRAPPER, -llapack_WIN64, -lblas_WIN64, -llibf2c, -ltmglib_WIN64, -llibfblaswr, -O3, --bind, -std=c++11

How you can see I use additional libraries. If it possible somehow use them during "web compilation"? Thank you in advance.

PS.: This is actually the code, which I'm trying to compile: https://tbfleming.github.io/cib/#gist=9bedf2bb85d1d67cf48454655aff4993

@tbfleming
Copy link
Owner

Wasm's linking format is in flux. I only implemented the minimum linker code necessary to reduce what I'll have to throw out when it finally settles down. Right now it doesn't support linking in additional libraries.

@vonwenckstern
Copy link

vonwenckstern commented Mar 21, 2018

@strepkov in [1] you have many precompiled files (with the ending .a). Maybe you just use the source files and include the source files as you did it with armadillo, then compiling needs longer but we do not need to link.
Can you try it out and tell us whether it works.

[1] https://rawgit.com/strepkov/model/master/lib.zip

PS:

@tbfleming
Copy link
Owner

@vonwenckstern good suggestion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants