-
Notifications
You must be signed in to change notification settings - Fork 6
Build Script Refinements/Static Linking #16
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
Build Script Refinements/Static Linking #16
Conversation
Thanks for this, I added automatic static linking for windows and emscripten platforms in #13. Now there's some conflicts in the build script though, sorry. Want me to try to resolve them? |
@@ -1,2 +1,5 @@ | |||
[target.wasm32-unknown-emscripten] | |||
linker = ".cargo/linker-emscripten" | |||
|
|||
[target.x86_64-unknown-linux-gnu] | |||
rustflags = "-C link-arg=-lGL -C link-arg=-lstdc++ -C link-arg=-lgomp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these needed?
should we really overwrite linker args just for linux/x86?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've found that these are necessary otherwise the linker complains. I think rustc only links libc, not libc++, and gomp which I guess is a projectm dependency of some sort.
Sorry for the belated response, I just now got a chance to check my github notifications. Sure, go ahead if you haven't already |
I've tried to merge your static build option with the latest, want to try it out? I hope that rustflags bit isn't necessary. It builds okay for me on macOS. |
static linking doesn't work for me, ld vomits out a whole bunch of errors about extern functions not being found, here's a snippet:
|
Alright let's just stick with what you have for now. Weird that it builds for me on non-x86 on mac without any flags like that. |
This simplifies the build script a bit and adds a static linking feature flag for those who may want it