Skip to content

Rollup of 10 pull requests #80496

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

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
6e852cc
remove redundant clones (clippy::redundant_clone)
matthiaskrgr Dec 24, 2020
a8775d4
Edit rustc_span documentation
pierwill Dec 24, 2020
1b77f8e
Constify intrinsics::copy[_nonoverlapping]
usbalbin Dec 26, 2020
7594d2a
Constify ptr::read and ptr::read_unaligned
usbalbin Dec 26, 2020
d4fd798
Constify *const T::read[_unaligned] and *mut T::read[_unaligned]
usbalbin Dec 26, 2020
1975a6e
Constify MaybeUninit::assume_init_read
usbalbin Dec 26, 2020
5e27765
Add tests
usbalbin Dec 26, 2020
0cea1c9
Added reference to tracking issue #80377
usbalbin Dec 26, 2020
0f25712
Revert "Cleanup markdown span handling"
Dec 26, 2020
7ac02bd
Don't give an error when creating a file for the first time
jyn514 Dec 27, 2020
c482ffd
bump rust-installer submodule
pietroalbini Dec 14, 2020
2f58422
Improvements to NatVis support
sivadeilra Dec 22, 2020
122e91c
promotion: factor some common code into validate_ref
RalfJung Dec 28, 2020
c177e68
merge two match'es for more exhaustiveness
RalfJung Dec 28, 2020
8d5dc8c
Add missing commas to `rustc_ast_pretty::pp` docs
camelid Dec 28, 2020
4a90a58
make more matches exhaustive
RalfJung Dec 28, 2020
0a2034d
bootstrap: add the dist.compression-formats option
pietroalbini Dec 14, 2020
d0d0ee0
ci: stop producing gzip-compressed dist tarballs
pietroalbini Dec 28, 2020
51cec58
fix a comment
RalfJung Dec 29, 2020
c857cbe
Lint on redundant trailing semicolon after item
Aaron1011 Dec 7, 2020
21ed141
Remove trailing semicolon in librustdoc
Aaron1011 Dec 8, 2020
4c4700d
Remove unnecessary semicolon from Rustdoc-generated code
Aaron1011 Dec 28, 2020
6bef37c
Remove unnecessary semicolon from Clippy test
Aaron1011 Dec 29, 2020
927a94a
Rollup merge of #79684 - usbalbin:const_copy, r=oli-obk
Dylan-DPC Dec 30, 2020
b6e565f
Rollup merge of #79812 - Aaron1011:lint-item-trailing-semi, r=oli-obk
Dylan-DPC Dec 30, 2020
7a32e57
Rollup merge of #80311 - sivadeilra:natvis, r=petrochenkov
Dylan-DPC Dec 30, 2020
2932e87
Rollup merge of #80348 - matthiaskrgr:less_clones, r=Dylan-DPC
Dylan-DPC Dec 30, 2020
16550d2
Rollup merge of #80358 - pierwill:edit_rustc_span, r=lcnr
Dylan-DPC Dec 30, 2020
9b5cdd8
Rollup merge of #80381 - rust-lang:revert-80244-spans, r=GuillaumeGomez
Dylan-DPC Dec 30, 2020
b432edb
Rollup merge of #80424 - jyn514:bootstrap-cleanup, r=Mark-Simulacrum
Dylan-DPC Dec 30, 2020
13ef40a
Rollup merge of #80435 - pietroalbini:compression-formats, r=Mark-Sim…
Dylan-DPC Dec 30, 2020
fd364d6
Rollup merge of #80457 - camelid:pretty-docs-commas, r=jonas-schievink
Dylan-DPC Dec 30, 2020
ea43757
Rollup merge of #80458 - RalfJung:promotion-refactor, r=oli-obk
Dylan-DPC Dec 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bootstrap: add the dist.compression-formats option
The option allows to add or remove compression formats used while
producing dist tarballs.
  • Loading branch information
pietroalbini committed Dec 29, 2020
commit 0a2034dca46f72d24d94c04b47c48d30149693bd
4 changes: 4 additions & 0 deletions config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -669,3 +669,7 @@ changelog-seen = 2

# Whether to allow failures when building tools
#missing-tools = false

# List of compression formats to use when generating dist tarballs. The list of
# formats is provided to rust-installer, which must support all of them.
#compression-formats = ["gz", "xz"]
3 changes: 3 additions & 0 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ pub struct Config {
pub dist_sign_folder: Option<PathBuf>,
pub dist_upload_addr: Option<String>,
pub dist_gpg_password_file: Option<PathBuf>,
pub dist_compression_formats: Option<Vec<String>>,

// libstd features
pub backtrace: bool, // support for RUST_BACKTRACE
Expand Down Expand Up @@ -438,6 +439,7 @@ struct Dist {
upload_addr: Option<String>,
src_tarball: Option<bool>,
missing_tools: Option<bool>,
compression_formats: Option<Vec<String>>,
}

#[derive(Deserialize)]
Expand Down Expand Up @@ -936,6 +938,7 @@ impl Config {
config.dist_sign_folder = t.sign_folder.map(PathBuf::from);
config.dist_gpg_password_file = t.gpg_password_file.map(PathBuf::from);
config.dist_upload_addr = t.upload_addr;
config.dist_compression_formats = t.compression_formats;
set(&mut config.rust_dist_src, t.src_tarball);
set(&mut config.missing_tools, t.missing_tools);
}
Expand Down
4 changes: 4 additions & 0 deletions src/bootstrap/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ def v(*args):
"experimental LLVM targets to build")
v("release-channel", "rust.channel", "the name of the release channel to build")
v("release-description", "rust.description", "optional descriptive string for version output")
v("dist-compression-formats", None,
"comma-separated list of compression formats to use")

# Used on systems where "cc" is unavailable
v("default-linker", "rust.default-linker", "the default linker")
Expand Down Expand Up @@ -349,6 +351,8 @@ def set(key, value):
elif option.name == 'option-checking':
# this was handled above
pass
elif option.name == 'dist-compression-formats':
set('dist.compression-formats', value.split(','))
else:
raise RuntimeError("unhandled option {}".format(option.name))

Expand Down
16 changes: 15 additions & 1 deletion src/bootstrap/tarball.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,25 @@ impl<'a> Tarball<'a> {

build_cli(&self, &mut cmd);
cmd.arg("--work-dir").arg(&self.temp_dir);
if let Some(formats) = &self.builder.config.dist_compression_formats {
assert!(!formats.is_empty(), "dist.compression-formats can't be empty");
cmd.arg("--compression-formats").arg(formats.join(","));
}
self.builder.run(&mut cmd);
if self.delete_temp_dir {
t!(std::fs::remove_dir_all(&self.temp_dir));
}

crate::dist::distdir(self.builder).join(format!("{}.tar.gz", package_name))
// Use either the first compression format defined, or "gz" as the default.
let ext = self
.builder
.config
.dist_compression_formats
.as_ref()
.and_then(|formats| formats.get(0))
.map(|s| s.as_str())
.unwrap_or("gz");

crate::dist::distdir(self.builder).join(format!("{}.tar.{}", package_name, ext))
}
}