Skip to content

Commit

Permalink
bootstrap: reorganize lib.rs module decl and import/re-exports.
Browse files Browse the repository at this point in the history
Make it easier to tell which import/re-export comes from what.
  • Loading branch information
jieyouxu committed Oct 15, 2024
1 parent 138db41 commit 4e98462
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions src/bootstrap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
//! More documentation can be found in each respective module below, and you can
//! also check out the `src/bootstrap/README.md` file for more information.
mod core;
mod utils;

use std::cell::{Cell, RefCell};
use std::collections::{BTreeSet, HashMap, HashSet};
use std::fmt::Display;
Expand All @@ -30,26 +33,20 @@ use build_helper::ci::gha;
use build_helper::exit;
use sha2::digest::Digest;
use termcolor::{ColorChoice, StandardStream, WriteColor};
use utils::channel::GitInfo;
use utils::helpers::hex_encode;

pub use self::core::builder::PathSet;
pub use self::core::config::Config;
pub use self::core::config::flags::{Flags, Subcommand};
use crate::core::builder;
use crate::core::builder::{Builder, Kind};
use crate::core::config::{DryRun, LldMode, LlvmLibunwind, Target, TargetSelection, flags};
pub use crate::utils::change_tracker::{
CONFIG_CHANGE_HISTORY, find_recent_config_change_ids, human_readable_changes,
};
use crate::utils::channel::GitInfo;
use crate::utils::exec::{BehaviorOnFailure, BootstrapCommand, CommandOutput, OutputMode, command};
use crate::utils::helpers::{
self, dir_is_empty, exe, libdir, mtime, output, set_file_times, symlink_dir,
};

mod core;
mod utils;

pub use core::builder::PathSet;
pub use core::config::Config;
pub use core::config::flags::{Flags, Subcommand};

pub use utils::change_tracker::{
CONFIG_CHANGE_HISTORY, find_recent_config_change_ids, human_readable_changes,
self, dir_is_empty, exe, hex_encode, libdir, mtime, output, set_file_times, symlink_dir,
};

const LLVM_TOOLS: &[&str] = &[
Expand Down

0 comments on commit 4e98462

Please sign in to comment.