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 system libs for LLVM when cross compiling for Windows #130398

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

ChrisDenton
Copy link
Member

Windows uses "import libraries" to link to system libraries. These are a kind of static lib that are distributed with the Windows SDK and therefore they don't rely on the host. All that matters is you have the right SDK installed for the target.

@rustbot
Copy link
Collaborator

rustbot commented Sep 15, 2024

r? @cuviper

rustbot has assigned @cuviper.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 15, 2024
@ChrisDenton
Copy link
Member Author

Note that in any case it is still necessary to pass the required libraries otherwise the build will fail. It just-so-happened to work before now because we were passing the necessary libraries to the linker via std, etc. But this failed in #129821 when we stopped doing that.

@jieyouxu jieyouxu assigned jieyouxu and unassigned cuviper Sep 15, 2024
@jieyouxu jieyouxu added the O-windows Operating system: Windows label Sep 15, 2024
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this seems reasonable.

@jieyouxu
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 15, 2024

📌 Commit 7223fd8 has been approved by jieyouxu

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 Sep 15, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 16, 2024
Add system libs for LLVM when cross compiling for Windows

Windows uses "import libraries" to link to system libraries. These are a kind of static lib that are distributed with the Windows SDK and therefore they don't rely on the host. All that matters is you have the right SDK installed for the target.
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 16, 2024
…kingjubilee

Rollup of 5 pull requests

Successful merges:

 - rust-lang#127879 (Document futility of printing temporary pointers)
 - rust-lang#130325 (Use -0.0 in `intrinsics::simd::reduce_add_unordered`)
 - rust-lang#130336 (simplify `Build::update_existing_submodule`)
 - rust-lang#130398 (Add system libs for LLVM when cross compiling for Windows)
 - rust-lang#130420 (Register tool docs for `src/tools/build_helper`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7142e0d into rust-lang:master Sep 16, 2024
6 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Sep 16, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 16, 2024
Rollup merge of rust-lang#130398 - ChrisDenton:win-cross, r=jieyouxu

Add system libs for LLVM when cross compiling for Windows

Windows uses "import libraries" to link to system libraries. These are a kind of static lib that are distributed with the Windows SDK and therefore they don't rely on the host. All that matters is you have the right SDK installed for the target.
@ChrisDenton ChrisDenton deleted the win-cross branch September 16, 2024 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Operating system: Windows S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants