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

--sysroot should be passed on to the linker #31180

Closed
Zoxc opened this issue Jan 25, 2016 · 4 comments
Closed

--sysroot should be passed on to the linker #31180

Zoxc opened this issue Jan 25, 2016 · 4 comments
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@Zoxc
Copy link
Contributor

Zoxc commented Jan 25, 2016

The linker needs to be passed the --sysroot option so it can find libraries when cross compiling.

I tried simply modifying rustc to pass the option on to the linker, but --sysroot is used during the bootstrap of rustc without an actual sysroot (i.e. there is only rust libraries, not C, so linking will fail).

@alexcrichton
Copy link
Member

This seems like a use case for -C link-args as the Rust sysroot is very different from the C sysroot.

@Zoxc
Copy link
Contributor Author

Zoxc commented Jan 25, 2016

How is the Rust sysroot is very different from the C sysroot and why? I had plotted to use the same folder for both.

@alexcrichton
Copy link
Member

The compiler currently has basically zero knowledge about the filesystem layout of the underlying C compiler, it just assumes the linker will find the right system libraries in the provided -L paths. In that sense there is no intention for the Rust sysroot to contain the C sysroot at all, so they're intended to be separate entities.

@Mark-Simulacrum Mark-Simulacrum added the C-feature-request Category: A feature request, i.e: not implemented / a PR. label Jul 24, 2017
@jonas-schievink jonas-schievink added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) and removed T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-build labels Apr 21, 2019
@Mark-Simulacrum
Copy link
Member

Closing as per the above -- we don't intend to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

5 participants