about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-08-10 16:23:52 +0200
committerGitHub <noreply@github.com>2024-08-10 16:23:52 +0200
commita7e188a8f65c16ba13c40b5c74152fc7d360c23c (patch)
treee1c16daae7761df2a33a929dd5071e7dc3fa065f
parent65875b2f5a48b6b6f8a4c49a73cae7e84c7e19e7 (diff)
parentef90df69044df03daece7ad367792a6424420f90 (diff)
downloadrust-a7e188a8f65c16ba13c40b5c74152fc7d360c23c.tar.gz
rust-a7e188a8f65c16ba13c40b5c74152fc7d360c23c.zip
Rollup merge of #128807 - ChrisDenton:bloat, r=jieyouxu
run-make: explaing why fmt-write-bloat is ignore-windows

The trouble here is that libc doesn't exist on Windows. Well it kinda does but it isn't called that so we substitute a name that works. Ideally finding necessary libs for the platform would be done at a higher level but until then this should work.

try-job: x86_64-msvc
try-job: x86_64-mingw
try-job: i686-msvc
try-job: i686-mingw
-rw-r--r--tests/run-make/fmt-write-bloat/main.rs2
-rw-r--r--tests/run-make/fmt-write-bloat/rmake.rs7
2 files changed, 6 insertions, 3 deletions
diff --git a/tests/run-make/fmt-write-bloat/main.rs b/tests/run-make/fmt-write-bloat/main.rs
index e86c48014c3..6f206d6515a 100644
--- a/tests/run-make/fmt-write-bloat/main.rs
+++ b/tests/run-make/fmt-write-bloat/main.rs
@@ -5,7 +5,7 @@
 use core::fmt;
 use core::fmt::Write;
 
-#[link(name = "c")]
+#[cfg_attr(not(windows), link(name = "c"))]
 extern "C" {}
 
 struct Dummy;
diff --git a/tests/run-make/fmt-write-bloat/rmake.rs b/tests/run-make/fmt-write-bloat/rmake.rs
index 4ae226ec0e2..6875ef9ddc0 100644
--- a/tests/run-make/fmt-write-bloat/rmake.rs
+++ b/tests/run-make/fmt-write-bloat/rmake.rs
@@ -15,9 +15,12 @@
 //! `NO_DEBUG_ASSERTIONS=1`). If debug assertions are disabled, then we can check for the absence of
 //! additional `usize` formatting and padding related symbols.
 
-// Reason: This test is `ignore-windows` because the `no_std` test (using `#[link(name = "c")])`
-// doesn't link on windows.
 //@ ignore-windows
+// Reason:
+// - MSVC targets really need to parse the .pdb file (aka the debug information).
+//   On Windows there's an API for that (dbghelp) which maybe we can use
+// - MinGW targets have a lot of symbols included in their runtime which we can't avoid.
+//   We would need to make the symbols we're looking for more specific for this test to work.
 //@ ignore-cross-compile
 
 use run_make_support::env::no_debug_assertions;