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

[beta] backports #94933

Merged
merged 10 commits into from
Mar 14, 2022
Merged

[beta] backports #94933

merged 10 commits into from
Mar 14, 2022

Conversation

Mark-Simulacrum
Copy link
Member

r? @Mark-Simulacrum

nikic and others added 9 commits March 14, 2022 11:46
The problematic compile-time issue should be resolved with this
version.
PR rust-lang#93918 made it so that `-static-libstdc++` was only set in one place,
and was only set during linking, but accidentally also made it so that
it is no longer passed when building LLD or sanitizers, only when
building LLVM itself. This moves the logic for setting
`-static-libstdc++` in the linker flags back to `configure_cmake` so
that it takes effect for all CMake invocations in `native.rs`.

As a side-effect, this also causes libstdc++ to be statically compiled
into sanitizers and LLD if `llvm-tools-enabled` is set but
`llvm-static-stdcpp` is not, even though previously it was only linked
statically if `llvm-static-stdcpp` was set explicitly. But that seems
more like the expected behavior anyway.
First, this reverts the `CFLAGS`/`CXXFLAGS` of rust-lang#93918. Those flags are
already read by `cc` and populated into `Build` earlier on in the
process. We shouldn't be overriding that based on `CFLAGS`, since `cc`
also respects overrides like `CFLAGS_{TARGET}` and `HOST_CFLAGS`, which
we want to take into account.

Second, this adds the same capability to specify target-specific
versions of `LDFLAGS` as we have through `cc` for the `C*` flags:
https://github.com/alexcrichton/cc-rs#external-configuration-via-environment-variables

Note that this also necessitated an update to compiletest to treat
CXXFLAGS separately from CFLAGS.
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 14, 2022
@rust-highfive
Copy link
Collaborator

⚠️ Warning ⚠️

  • Pull requests are usually filed against the master branch for this repo, but this one is against beta. Please double check that you specified the right target!
  • These commits modify submodules.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 14, 2022
@Mark-Simulacrum
Copy link
Member Author

@bors r+ rollup=never p=5

Once this lands I'll also kick off another crater run.

@bors
Copy link
Contributor

bors commented Mar 14, 2022

📌 Commit 9d7e021 has been approved by Mark-Simulacrum

@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 14, 2022
@rust-log-analyzer

This comment has been minimized.

@Mark-Simulacrum
Copy link
Member Author

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 14, 2022
@Mark-Simulacrum
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Mar 14, 2022

📌 Commit 12cae30 has been approved by Mark-Simulacrum

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 14, 2022
@bors
Copy link
Contributor

bors commented Mar 14, 2022

⌛ Testing commit 12cae30 with merge 99f967e...

@bors
Copy link
Contributor

bors commented Mar 14, 2022

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 99f967e to beta...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 14, 2022
@bors bors merged commit 99f967e into rust-lang:beta Mar 14, 2022
@rustbot rustbot added this to the 1.60.0 milestone Mar 14, 2022
@Mark-Simulacrum Mark-Simulacrum deleted the beta-next branch March 18, 2022 22:23
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 22, 2022
…k-Simulacrum

[beta] Remove statement that was forgotten when backporting rust-lang#94596

This `if` statement was introduced in rust-lang#94438, then removed in rust-lang#94596. Both of these PRs were beta-backported in rust-lang#94933, but I think there was a mistake in the order they were applied or this removal was overlooked. I think this fixes the remaining issues referenced in rust-lang#94511 (comment).

Not sure this is the correct way to put something up for beta-backport, but the PR is at least open so it can be referenced and the commit can be cherry-picked. Feel free to close this PR.

r? `@Mark-Simulacrum`
cc: rust-lang#94511
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

9 participants