diff options
| author | jyn <github@jyn.dev> | 2023-05-08 04:12:38 -0500 |
|---|---|---|
| committer | jyn <github@jyn.dev> | 2023-05-17 23:54:21 -0500 |
| commit | d5f2b8e5c65b0406254b990296793f664c1926a0 (patch) | |
| tree | 7245f2f921a806ae8fc6dad29d543af26ab0f452 /src/tools/replace-version-placeholder | |
| parent | 0dddad0dc5d614f799d7e04de4895e7a7418eccb (diff) | |
| download | rust-d5f2b8e5c65b0406254b990296793f664c1926a0.tar.gz rust-d5f2b8e5c65b0406254b990296793f664c1926a0.zip | |
Only depend on CFG_VERSION in rustc_interface
this avoids having to rebuild the whole compiler on each commit when `omit-git-hash = false`.
Diffstat (limited to 'src/tools/replace-version-placeholder')
| -rw-r--r-- | src/tools/replace-version-placeholder/src/main.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/tools/replace-version-placeholder/src/main.rs b/src/tools/replace-version-placeholder/src/main.rs index 0aebfc4aad2..5c9c18b9b36 100644 --- a/src/tools/replace-version-placeholder/src/main.rs +++ b/src/tools/replace-version-placeholder/src/main.rs @@ -8,15 +8,13 @@ fn main() { let version_path = root_path.join("src").join("version"); let version_str = t!(std::fs::read_to_string(&version_path), version_path); let version_str = version_str.trim(); - walk::walk( - &root_path, + walk::walk_many( + &[&root_path.join("compiler"), &root_path.join("library")], |path, _is_dir| { walk::filter_dirs(path) // We exempt these as they require the placeholder // for their operation || path.ends_with("compiler/rustc_attr/src/builtin.rs") - || path.ends_with("src/tools/tidy/src/features/version.rs") - || path.ends_with("src/tools/replace-version-placeholder") }, &mut |entry, contents| { if !contents.contains(VERSION_PLACEHOLDER) { |
