-
Notifications
You must be signed in to change notification settings - Fork 824
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
Feat/singlepass dylib #2802
Feat/singlepass dylib #2802
Conversation
lib/engine-dylib/src/artifact.rs
Outdated
@@ -384,7 +384,7 @@ impl DylibArtifact { | |||
// We are explicit on the target when the host system is | |||
// Apple Silicon, otherwise compilation fails. | |||
if target_triple_str == "arm64-apple-darwin" { | |||
vec![format!("--target={}", target_triple_str)] | |||
vec![form at!("--target={}", target_triple_str)] |
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.
typo?
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.
yes! :O
lib/engine-dylib/src/artifact.rs
Outdated
(OperatingSystem::Linux, Architecture::X86_64) => vec!["-Wl,-z,notext"], | ||
(OperatingSystem::MacOSX, Architecture::X86_64) => vec!["-Wl,-read_only_relocs,suppress"], |
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.
We actually want to remove both of these options. They currently tell the linker to allow text relocations which we don't want for PIC code.
…ommand on linker that enable write to text section
I don't have enough context on this PR to approve myself. So we'll wait for @Amanieu review! |
I tested this branch and it seems to generate a .so file with zero runtime relocations, which is good. However I don't see why the
|
The cross compile test is failling. It compile using dylib-cranelift targetting x86_64-linux-musl and fail with a relocation of type |
Can you dump the object files that are passed to the linker in both the success and failing cases? Also the arguments passed to the linker. The |
Yes, I was thinking on the same thing, check the difference, if any, on both object files. |
generated object file are identical in both case.
so there still is a reloc for the wasmer_vm_probestack. |
Actually the I think that I know what the problem is, can you try applying this commit from #2807: 657bbae You might also need to apply this fix: a280914 |
Yes, it works with both commit. |
So I'll wait until the Stack/Corosensei branch is merged... |
bors r+ |
Description
Enable Dylib+singlepass on Linux and macOS. Works fine, but larger wasm file may still fail to link on macOS/Aarch64.
For #2736