Skip to content

Commit 6b6a7a4

Browse files
committed
Warn windows-gnu users that the bundled gcc can't compile
1 parent ec039c7 commit 6b6a7a4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/bootstrap/dist.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,14 @@ fn make_win_dist(
308308
builder.copy_to_folder(&src, &target_bin_dir);
309309
}
310310

311+
// Warn windows-gnu users that the bundled GCC cannot compile C files
312+
builder.create(
313+
&target_bin_dir.join("DO NOT USE THIS gcc.exe FOR COMPILATION.txt"),
314+
&"gcc.exe contained in this folder cannot be used for compiling C files - it is only\
315+
used as a linker. In order to be able to compile projects containing C code use\
316+
the GCC provided by MinGW or Cygwin."
317+
);
318+
311319
//Copy platform libs to platform-specific lib directory
312320
let target_lib_dir = plat_root.join("lib").join("rustlib").join(target_triple).join("lib");
313321
fs::create_dir_all(&target_lib_dir).expect("creating target_lib_dir failed");

0 commit comments

Comments
 (0)