fn prepare_image(builder: &Builder<'_>, compiler: Compiler, image: &Path) {
let host = compiler.host;
let src = builder.sysroot(compiler);
- let libdir = builder.rustc_libdir(compiler);
// Copy rustc/rustdoc binaries
t!(fs::create_dir_all(image.join("bin")));
// Copy runtime DLLs needed by the compiler
if libdir_relative.to_str() != Some("bin") {
+ let libdir = builder.rustc_libdir(compiler);
for entry in builder.read_dir(&libdir) {
let name = entry.file_name();
if let Some(s) = name.to_str() {
if is_dylib(s) {
- builder.install(&entry.path(), &image.join(&libdir_relative), 0o644);
+ // Don't use custom libdir here because ^lib/ will be resolved again
+ // with installer
+ builder.install(&entry.path(), &image.join("lib"), 0o644);
}
}
}
// Copy over the codegen backends
let backends_src = builder.sysroot_codegen_backends(compiler);
- let backends_rel = backends_src.strip_prefix(&src).unwrap();
- let backends_dst = image.join(&backends_rel);
+ let backends_rel = backends_src.strip_prefix(&src).unwrap()
+ .strip_prefix(builder.sysroot_libdir_relative(compiler)).unwrap();
+ // Don't use custom libdir here because ^lib/ will be resolved again with installer
+ let backends_dst = image.join("lib").join(&backends_rel);
+
t!(fs::create_dir_all(&backends_dst));
builder.cp_r(&backends_src, &backends_dst);
if builder.hosts.iter().any(|t| t == target) {
builder.ensure(compile::Rustc { compiler, target });
} else {
- if builder.no_std(target) == Some(true) {
- // the `test` doesn't compile for no-std targets
- builder.ensure(compile::Std { compiler, target });
- } else {
- builder.ensure(compile::Test { compiler, target });
- }
+ builder.ensure(compile::Std { compiler, target });
}
let image = tmpdir(builder).join(format!("{}-{}-image", name, target));
"llvm-project/lld", "llvm-project\\lld",
"llvm-project/lldb", "llvm-project\\lldb",
"llvm-project/llvm", "llvm-project\\llvm",
+ "llvm-project/compiler-rt", "llvm-project\\compiler-rt",
];
if spath.contains("llvm-project") && !spath.ends_with("llvm-project")
&& !LLVM_PROJECTS.iter().any(|path| spath.contains(path))
"src/libproc_macro",
"src/tools/rustc-std-workspace-core",
"src/tools/rustc-std-workspace-alloc",
+ "src/tools/rustc-std-workspace-std",
"src/librustc",
"src/libsyntax",
];
}
fn run(self, builder: &Builder<'_>) {
+ // This gets called by `promote-release`
+ // (https://github.com/rust-lang/rust-central-station/tree/master/promote-release).
let mut cmd = builder.tool_cmd(Tool::BuildManifest);
if builder.config.dry_run {
return;
let addr = builder.config.dist_upload_addr.as_ref().unwrap_or_else(|| {
panic!("\n\nfailed to specify `dist.upload-addr` in `config.toml`\n\n")
});
- let file = builder.config.dist_gpg_password_file.as_ref().unwrap_or_else(|| {
- panic!("\n\nfailed to specify `dist.gpg-password-file` in `config.toml`\n\n")
- });
- let pass = t!(fs::read_to_string(&file));
+ let pass = if env::var("BUILD_MANIFEST_DISABLE_SIGNING").is_err() {
+ let file = builder.config.dist_gpg_password_file.as_ref().unwrap_or_else(|| {
+ panic!("\n\nfailed to specify `dist.gpg-password-file` in `config.toml`\n\n")
+ });
+ t!(fs::read_to_string(&file))
+ } else {
+ String::new()
+ };
let today = output(Command::new("date").arg("+%Y-%m-%d"));