-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Add a default implementation for CodegenBackend::link #132820
Conversation
As a side effect this should add raw-dylib support to cg_gcc as the default ArchiveBuilderBuilder that is used implements create_dll_import_lib. I haven't tested if the raw-dylib support actually works however.
Some changes occurred in compiler/rustc_codegen_gcc |
After link_binary the temporary files referenced by CodegenResults are deleted, so calling link_binary again with the same CodegenResults should not be allowed.
This comment has been minimized.
This comment has been minimized.
97f5f0f
to
996e728
Compare
This comment has been minimized.
This comment has been minimized.
996e728
to
e8b1029
Compare
Does this still allow overwriting the linking step in the different codegens? I sometimes stumble upon cases where I need to adjust the linking for rustc_codegen_gcc. |
Yes, this only adds a default impl. The LLVM backend still overrides the link method as it uses a different archive writer that supports reading symbols for LLVM bitcode. |
r? jieyouxu |
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.
Thanks. This adds a default impl that can be overridden, so this LGTM.
@bors r+ rollup |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#120077 (Add Set entry API ) - rust-lang#132144 (Arbitrary self types v2: (unused) Receiver trait) - rust-lang#132297 (Document some `check_expr` methods, and other misc `hir_typeck` tweaks) - rust-lang#132820 (Add a default implementation for CodegenBackend::link) - rust-lang#132881 (triagebot: Autolabel rustdoc book) - rust-lang#132912 (Simplify some places that deal with generic parameter defaults) - rust-lang#132916 (Unvacation fmease) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#120077 (Add Set entry API ) - rust-lang#132144 (Arbitrary self types v2: (unused) Receiver trait) - rust-lang#132297 (Document some `check_expr` methods, and other misc `hir_typeck` tweaks) - rust-lang#132820 (Add a default implementation for CodegenBackend::link) - rust-lang#132881 (triagebot: Autolabel rustdoc book) - rust-lang#132912 (Simplify some places that deal with generic parameter defaults) - rust-lang#132916 (Unvacation fmease) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#132820 - bjorn3:default_backend_link_impl, r=jieyouxu Add a default implementation for CodegenBackend::link As a side effect this should add raw-dylib support to cg_gcc as the default ArchiveBuilderBuilder that is used implements create_dll_import_lib. I haven't tested if the raw-dylib support actually works however.
As a side effect this should add raw-dylib support to cg_gcc as the default ArchiveBuilderBuilder that is used implements create_dll_import_lib. I haven't tested if the raw-dylib support actually works however.