Fix surgical linking for C hosts with extra arg

This commit is contained in:
Brendan Hansknecht 2021-09-23 21:29:53 -07:00
parent 7d1b88b3fb
commit a593713800
2 changed files with 1 additions and 1 deletions

View File

@ -275,6 +275,7 @@ pub fn build_c_host_native(
command.args(&[ command.args(&[
shared_lib_path.to_str().unwrap(), shared_lib_path.to_str().unwrap(),
"-fPIE", "-fPIE",
"-pie",
"-lm", "-lm",
"-lpthread", "-lpthread",
"-ldl", "-ldl",

View File

@ -33,7 +33,6 @@ This linker is run in 2 phases: preprocessing and surigical linking.
- Run CLI tests and/or benchmarks with the Roc Linker. - Run CLI tests and/or benchmarks with the Roc Linker.
- Test with an executable completely generated by Cargo (It will hopefully work out of the box like zig). - Test with an executable completely generated by Cargo (It will hopefully work out of the box like zig).
- Investigate why C is using absolute jumps to the main function from `_start`. This means our shifts break the executable.
- Add Macho support - Add Macho support
- Honestly should be almost exactly the same code. - Honestly should be almost exactly the same code.
This means we likely need to do a lot of refactoring to minimize the duplicate code. This means we likely need to do a lot of refactoring to minimize the duplicate code.