forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#134966 - matthiaskrgr:rollup-lmhmgsv, r=matth…
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#134610 (Format `build.toml` consistently in platform support docs) - rust-lang#134918 (Windows: Enable issue 70093 link tests) - rust-lang#134953 (Fix doc for read&write unaligned in zst operation) - rust-lang#134956 (Account for C string literals and `format_args` in `HiddenUnicodeCodepoints` lint) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
23 changed files
with
205 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 0 additions & 10 deletions
10
tests/ui/link-native-libs/issue-70093/issue-70093-link-directives.rs
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Ensure that `#[link]` attributes are entirely ignore when using `-Zlink-directives=no`. | ||
|
||
//@ run-pass | ||
//@ compile-flags: -Zlink-directives=no | ||
//@ ignore-fuchsia - missing __libc_start_main for some reason (#84733) | ||
//@ ignore-cross-compile - default-linker-libraries=yes doesn't play well with cross compiling | ||
|
||
// Usually these `#[link]` attribute would cause `libsome-random-non-existent-library` | ||
// to be passed to the linker, causing it to fail because the file doesn't exist. | ||
// However, with -Zlink-directives=no, the `#[link]` is ignored. | ||
#[link(name = "some-random-non-existent-library", kind = "static")] | ||
extern "C" {} | ||
|
||
fn main() {} |
26 changes: 26 additions & 0 deletions
26
tests/ui/link-native-libs/issue-70093/link-native-libraries.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Ensure that rust does not pass native libraries to the linker when | ||
// `-Zlink-native-libraries=no` is used. | ||
|
||
//@ run-pass | ||
//@ compile-flags: -Zlink-native-libraries=no -Cdefault-linker-libraries=yes | ||
//@ ignore-fuchsia - missing __libc_start_main for some reason (#84733) | ||
//@ ignore-cross-compile - default-linker-libraries=yes doesn't play well with cross compiling | ||
|
||
//@ revisions: other | ||
//@[other] ignore-msvc | ||
|
||
//@ revisions: msvc | ||
// On Windows MSVC, default-linker-libraries=yes doesn't work because | ||
// rustc drives the linker directly instead of going through another compiler. | ||
// Therefore rustc would need to implement default-linker-libraries itself but doesn't. | ||
// So instead we use -Clink-arg to directly set the required msvcrt.lib as a link arg. | ||
//@[msvc] compile-flags: -Clink-arg=msvcrt.lib | ||
//@[msvc] only-msvc | ||
|
||
// Usually these `#[link]` attribute would cause `libsome-random-non-existent-library` | ||
// to be passed to the linker, causing it to fail because the file doesn't exist. | ||
// However, -Zlink-native-libraries=no disables that. | ||
#[link(name = "some-random-non-existent-library", kind = "static")] | ||
extern "C" {} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.