-
Notifications
You must be signed in to change notification settings - Fork 114
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
Produce statically linked oak_loader
binary
#864
Conversation
Interestingly, this now causes the binary to fail at runtime because of the C++ / Rust linkage. I guess the C++ side of things still relies on dynamically linking libc, and it panics when it's not. @daviddrysdale why did this not fail at link time? And what should we do about it?
|
cc @ipetr0v |
@@ -157,6 +157,9 @@ RUN rustup default ${RUST_VERSION} | |||
# Install WebAssembly target for Rust. | |||
RUN rustup target add wasm32-unknown-unknown | |||
|
|||
# Install musl target for Rust (for statically linked binaries). | |||
RUN rustup target add x86_64-unknown-linux-musl |
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 guess we may need to add something equivalent to the rust-repository-set
in WORKSPACE
once we've sorted out #724?
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 think so
I think that call stack is a red herring – the fragment of log just shows a script sending in a [1]: The |
Relies on the `x86_64-unknown-linux-musl` build target to produce a fully static binary.
Relies on the
x86_64-unknown-linux-musl
build target to produce afully static binary.
Checklist
cover any TODOs and/or unfinished work.
construction.