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

Add a new config flag, dist.include-mingw-linker. #108581

Merged
merged 1 commit into from
Mar 8, 2023

Conversation

jfgoog
Copy link
Contributor

@jfgoog jfgoog commented Feb 28, 2023

The flag controls whether to copy the linker, DLLs, and various libraries from MinGW into the rustc toolchain.

It applies only when the host or target is pc-windows-gnu.

The flag is true by default to preserve existing behavior.

The flag controls whether to copy the linker, DLLs, and various
libraries from MinGW into the rustc toolchain.

It applies only when the host or target is pc-windows-gnu.

The flag is true by default to preserve existing behavior.
@rustbot
Copy link
Collaborator

rustbot commented Feb 28, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ozkanonur (or someone else) soon.

Please see the contribution instructions for more information.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Feb 28, 2023
@jfgoog
Copy link
Contributor Author

jfgoog commented Feb 28, 2023

Follow-up from #108140. See discussion there for additional context.

@onur-ozkan
Copy link
Member

from #108140 r? @Mark-Simulacrum

@jfgoog
Copy link
Contributor Author

jfgoog commented Mar 1, 2023

To clarify a previous comment: It's not necessary to copy libgcc_s_seh-1.dll and libwinpthread-1.dll, but if you do not, they need to be discoverable on the path in order to bootstrap and use the toolchain.

@Mark-Simulacrum
Copy link
Member

r? @mati865 or @petrochenkov -- I want to confirm there are no concerns in terms of rustc expecting these particular files to be in a particular place.

r=me on the diff itself

@rustbot
Copy link
Collaborator

rustbot commented Mar 4, 2023

Failed to set assignee to mati865: invalid assignee

Note: Only org members, users with write permissions, or people who have commented on the PR may be assigned.

@mati865
Copy link
Contributor

mati865 commented Mar 5, 2023

As jfgoog said those executables and DLLs need to be available in PATH. So for downstream vendors having them duplicated by Rust only creates problems. In such cases these files are expected to be in proper locations already.

I don't have time to take deeper look but in overall this looks good to me.

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Mar 6, 2023

📌 Commit 848f6f9 has been approved by petrochenkov

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 6, 2023
@jfgoog
Copy link
Contributor Author

jfgoog commented Mar 6, 2023

Thanks! And, special thanks to mati865 for patiently explaining why I was wrong about the previous PR.

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 7, 2023
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#108460 (migrate `rustc_hir_analysis` to session diagnostic [Part Two])
 - rust-lang#108581 (Add a new config flag, dist.include-mingw-linker.)
 - rust-lang#108583 (Account for binders correctly when adding default RPITIT method assumption)
 - rust-lang#108783 (Sync rustc_codegen_gcc 2023/03/04)
 - rust-lang#108793 (Append to existing `PYTHONPATH` in compiletest instead of overwriting)
 - rust-lang#108822 (Remove references to PassManagerBuilder)
 - rust-lang#108866 (Force to use the stage 2 compiler  when config.download_rustc is set)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 23beda4 into rust-lang:master Mar 8, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 8, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 31, 2023
…o-dist, r=Mark-Simulacrum

Move MinGW linker dist option to proper section

Using this option currently results in the error:
```
failed to parse TOML configuration 'config.toml': unknown field `include-mingw-linker`, expected one of `optimize`, `debug`, `codegen-units`, `codegen-units-std`, `debug-assertions`, `debug-assertions-std`, `overflow-checks`, `overflow-checks-std`, `debug-logging`, `debuginfo-level`, `debuginfo-level-rustc`, `debuginfo-level-std`, `debuginfo-level-tools`, `debuginfo-level-tests`, `split-debuginfo`, `run-dsymutil`, `backtrace`, `incremental`, `parallel-compiler`, `default-linker`, `channel`, `description`, `musl-root`, `rpath`, `verbose-tests`, `optimize-tests`, `codegen-tests`, `omit-git-hash`, `dist-src`, `save-toolstates`, `codegen-backends`, `lld`, `use-lld`, `llvm-tools`, `deny-warnings`, `backtrace-on-ice`, `verify-llvm-ir`, `thin-lto-import-instr-limit`, `remap-debuginfo`, `jemalloc`, `test-compare-mode`, `llvm-libunwind`, `control-flow-guard`, `new-symbol-mangling`, `profile-generate`, `profile-use`, `download-rustc`, `lto`, `validate-mir-opts` for key `rust`
```
That's because the option [belongs to `dist` section](https://github.com/rust-lang/rust/blob/bef6ff618f17398775e9d8cd23a6f47d983869dc/src/bootstrap/config.rs#L861).

cc rust-lang#108581
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 31, 2023
…o-dist, r=Mark-Simulacrum

Move MinGW linker dist option to proper section

Using this option currently results in the error:
```
failed to parse TOML configuration 'config.toml': unknown field `include-mingw-linker`, expected one of `optimize`, `debug`, `codegen-units`, `codegen-units-std`, `debug-assertions`, `debug-assertions-std`, `overflow-checks`, `overflow-checks-std`, `debug-logging`, `debuginfo-level`, `debuginfo-level-rustc`, `debuginfo-level-std`, `debuginfo-level-tools`, `debuginfo-level-tests`, `split-debuginfo`, `run-dsymutil`, `backtrace`, `incremental`, `parallel-compiler`, `default-linker`, `channel`, `description`, `musl-root`, `rpath`, `verbose-tests`, `optimize-tests`, `codegen-tests`, `omit-git-hash`, `dist-src`, `save-toolstates`, `codegen-backends`, `lld`, `use-lld`, `llvm-tools`, `deny-warnings`, `backtrace-on-ice`, `verify-llvm-ir`, `thin-lto-import-instr-limit`, `remap-debuginfo`, `jemalloc`, `test-compare-mode`, `llvm-libunwind`, `control-flow-guard`, `new-symbol-mangling`, `profile-generate`, `profile-use`, `download-rustc`, `lto`, `validate-mir-opts` for key `rust`
```
That's because the option [belongs to `dist` section](https://github.com/rust-lang/rust/blob/bef6ff618f17398775e9d8cd23a6f47d983869dc/src/bootstrap/config.rs#L861).

cc rust-lang#108581
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 31, 2023
…o-dist, r=Mark-Simulacrum

Move MinGW linker dist option to proper section

Using this option currently results in the error:
```
failed to parse TOML configuration 'config.toml': unknown field `include-mingw-linker`, expected one of `optimize`, `debug`, `codegen-units`, `codegen-units-std`, `debug-assertions`, `debug-assertions-std`, `overflow-checks`, `overflow-checks-std`, `debug-logging`, `debuginfo-level`, `debuginfo-level-rustc`, `debuginfo-level-std`, `debuginfo-level-tools`, `debuginfo-level-tests`, `split-debuginfo`, `run-dsymutil`, `backtrace`, `incremental`, `parallel-compiler`, `default-linker`, `channel`, `description`, `musl-root`, `rpath`, `verbose-tests`, `optimize-tests`, `codegen-tests`, `omit-git-hash`, `dist-src`, `save-toolstates`, `codegen-backends`, `lld`, `use-lld`, `llvm-tools`, `deny-warnings`, `backtrace-on-ice`, `verify-llvm-ir`, `thin-lto-import-instr-limit`, `remap-debuginfo`, `jemalloc`, `test-compare-mode`, `llvm-libunwind`, `control-flow-guard`, `new-symbol-mangling`, `profile-generate`, `profile-use`, `download-rustc`, `lto`, `validate-mir-opts` for key `rust`
```
That's because the option [belongs to `dist` section](https://github.com/rust-lang/rust/blob/bef6ff618f17398775e9d8cd23a6f47d983869dc/src/bootstrap/config.rs#L861).

cc rust-lang#108581
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants