1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
|
From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Date: Sat, 2 Oct 2021 01:07:59 +0100
Subject: d-0000-ignore-removed-submodules
Description: remove upstream parts that are not needed for the Debian build, in
order to both reduce the orig tarball and the vendored crates within.
Forwarded: not-needed
---
Cargo.toml | 6 ------
src/bootstrap/bootstrap.py | 4 ----
src/bootstrap/src/core/builder/cargo.rs | 5 +----
src/bootstrap/src/core/builder/mod.rs | 23 -----------------------
src/build_helper/src/util.rs | 21 +--------------------
5 files changed, 2 insertions(+), 57 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index b773030..7d9b7ba 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -21,21 +21,15 @@ members = [
"src/tools/tidy",
"src/tools/tier-check",
"src/tools/build-manifest",
- "src/tools/remote-test-client",
- "src/tools/remote-test-server",
"src/tools/rust-installer",
"src/tools/rustdoc",
- "src/tools/rls",
"src/tools/rustfmt",
- "src/tools/miri",
- "src/tools/miri/cargo-miri",
"src/tools/rustdoc-themes",
"src/tools/unicode-table-generator",
"src/tools/jsondocck",
"src/tools/jsondoclint",
"src/tools/llvm-bitcode-linker",
"src/tools/html-checker",
- "src/tools/bump-stage0",
"src/tools/replace-version-placeholder",
"src/tools/lld-wrapper",
"src/tools/collect-license-metadata",
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 535bdec..3726682 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -1129,10 +1129,6 @@ class RustBuild(object):
"-Zroot-dir=" + self.rust_root,
]
args.extend("--verbose" for _ in range(self.verbose))
- if self.use_locked_deps:
- args.append("--locked")
- if self.use_vendored_sources:
- args.append("--frozen")
if self.get_toml("metrics", "build"):
args.append("--features")
args.append("build-metrics")
diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs
index 432fbb8..a73e6cf 100644
--- a/src/bootstrap/src/core/builder/cargo.rs
+++ b/src/bootstrap/src/core/builder/cargo.rs
@@ -1140,10 +1140,7 @@ impl Builder<'_> {
}
}
- if self.config.locked_deps {
- cargo.arg("--locked");
- }
- if self.config.vendor || self.is_sudo {
+ if self.is_sudo {
cargo.arg("--frozen");
}
diff --git a/src/bootstrap/src/core/builder/mod.rs b/src/bootstrap/src/core/builder/mod.rs
index 30e42a5..579918d 100644
--- a/src/bootstrap/src/core/builder/mod.rs
+++ b/src/bootstrap/src/core/builder/mod.rs
@@ -841,26 +841,14 @@ impl<'a> Builder<'a> {
tool::Linkchecker,
tool::CargoTest,
tool::Compiletest,
- tool::RemoteTestServer,
- tool::RemoteTestClient,
tool::RustInstaller,
tool::Cargo,
- tool::Rls,
tool::RustAnalyzer,
tool::RustAnalyzerProcMacroSrv,
tool::Rustdoc,
tool::Clippy,
tool::CargoClippy,
- llvm::Llvm,
- gcc::Gcc,
- llvm::Sanitizers,
tool::Rustfmt,
- tool::Miri,
- tool::CargoMiri,
- llvm::Lld,
- llvm::Enzyme,
- llvm::CrtBeginEnd,
- tool::RustdocGUITest,
tool::OptimizedDist,
tool::CoverageDump,
tool::LlvmBitcodeLinker,
@@ -901,10 +889,6 @@ impl<'a> Builder<'a> {
check::Rustdoc,
check::CodegenBackend,
check::Clippy,
- check::Miri,
- check::CargoMiri,
- check::MiroptTestTools,
- check::Rls,
check::Rustfmt,
check::RustAnalyzer,
check::TestFloatParse,
@@ -958,8 +942,6 @@ impl<'a> Builder<'a> {
test::EmbeddedBook,
test::EditionGuide,
test::Rustfmt,
- test::Miri,
- test::CargoMiri,
test::Clippy,
test::CompiletestTest,
test::CrateRunMakeSupport,
@@ -1000,7 +982,6 @@ impl<'a> Builder<'a> {
doc::CargoBook,
doc::Clippy,
doc::ClippyBook,
- doc::Miri,
doc::EmbeddedBook,
doc::EditionGuide,
doc::StyleGuide,
@@ -1023,11 +1004,9 @@ impl<'a> Builder<'a> {
dist::Analysis,
dist::Src,
dist::Cargo,
- dist::Rls,
dist::RustAnalyzer,
dist::Rustfmt,
dist::Clippy,
- dist::Miri,
dist::LlvmTools,
dist::LlvmBitcodeLinker,
dist::RustDev,
@@ -1053,7 +1032,6 @@ impl<'a> Builder<'a> {
install::RustAnalyzer,
install::Rustfmt,
install::Clippy,
- install::Miri,
install::LlvmTools,
install::Src,
),
@@ -1061,7 +1039,6 @@ impl<'a> Builder<'a> {
run::BuildManifest,
run::BumpStage0,
run::ReplaceVersionPlaceholder,
- run::Miri,
run::CollectLicenseMetadata,
run::GenerateCopyright,
run::GenerateWindowsSys,
diff --git a/src/build_helper/src/util.rs b/src/build_helper/src/util.rs
index 72c05c4..3be35b7 100644
--- a/src/build_helper/src/util.rs
+++ b/src/build_helper/src/util.rs
@@ -52,24 +52,5 @@ pub fn try_run(cmd: &mut Command, print_cmd_on_fail: bool) -> Result<(), ()> {
/// Returns the submodule paths from the `.gitmodules` file in the given directory.
pub fn parse_gitmodules(target_dir: &Path) -> &[String] {
- static SUBMODULES_PATHS: OnceLock<Vec<String>> = OnceLock::new();
- let gitmodules = target_dir.join(".gitmodules");
- assert!(gitmodules.exists(), "'{}' file is missing.", gitmodules.display());
-
- let init_submodules_paths = || {
- let file = File::open(gitmodules).unwrap();
-
- let mut submodules_paths = vec![];
- for line in BufReader::new(file).lines().map_while(Result::ok) {
- let line = line.trim();
- if line.starts_with("path") {
- let actual_path = line.split(' ').last().expect("Couldn't get value of path");
- submodules_paths.push(actual_path.to_owned());
- }
- }
-
- submodules_paths
- };
-
- SUBMODULES_PATHS.get_or_init(|| init_submodules_paths())
+ return &[];
}
|