Skip to content

Commit

Permalink
feat: Caching the builds of the compiler's vendors C++ std and C ISO …
Browse files Browse the repository at this point in the history
…standard libraries
  • Loading branch information
TheRustifyer committed May 30, 2024
1 parent a097c75 commit c523df8
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 359 deletions.
64 changes: 0 additions & 64 deletions workflows/code-coverage.yml

This file was deleted.

52 changes: 0 additions & 52 deletions workflows/code-quality.yml

This file was deleted.

119 changes: 0 additions & 119 deletions workflows/release.yml

This file was deleted.

52 changes: 0 additions & 52 deletions workflows/tests-clang-linux.yml

This file was deleted.

25 changes: 0 additions & 25 deletions workflows/tests-gcc.yml

This file was deleted.

30 changes: 0 additions & 30 deletions workflows/tests-msvc.yml

This file was deleted.

16 changes: 13 additions & 3 deletions zork++/src/lib/cache/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,18 @@ impl ZorkCache {
interfaces: Vec::with_capacity(commands.interfaces.len()),
implementations: Vec::with_capacity(commands.implementations.len()),
sources: Vec::with_capacity(commands.sources.len()),
pre_tasks: Vec::with_capacity(commands.pre_tasks.len()),
main: MainCommandLineDetail::default(),
};

let mut are_new_commands = Vec::with_capacity(3);
let mut are_new_commands = Vec::with_capacity(4);
let pre_tasks_has_new_commands = self.extend_collection_of_source_file_details(
model,
&mut commands_details.pre_tasks,
&mut commands.pre_tasks,
commands.compiler,
);
are_new_commands.push(pre_tasks_has_new_commands);
let interfaces_has_new_commands = self.extend_collection_of_source_file_details(
model,
&mut commands_details.interfaces,
Expand Down Expand Up @@ -232,9 +240,10 @@ impl ZorkCache {
/// run this process once per new cache created (cache action 1)
fn load_msvc_metadata(&mut self, program_data: &ZorkModel<'_>) -> Result<()> {
let msvc = &mut self.compilers_metadata.msvc;
let compiler = program_data.compiler.cpp_compiler;

if msvc.dev_commands_prompt.is_none() {
let compiler = program_data.compiler.cpp_compiler;

msvc.dev_commands_prompt = utils::fs::find_file(
Path::new(constants::MSVC_REGULAR_BASE_PATH),
constants::MS_ENV_VARS_BAT,
Expand Down Expand Up @@ -283,7 +292,7 @@ impl ZorkCache {
modular_stdlib_byproducts_path.with_extension(compiler.get_obj_file_extension());

let c_modular_stdlib_byproducts_path = modular_stdlib_byproducts_path;
let compat = String::from("compat.");
let compat = String::from("compat."); // TODO: find a better way
msvc.c_stdlib_bmi_path = c_modular_stdlib_byproducts_path
.with_extension(compat.clone() + compiler.get_typical_bmi_extension());
msvc.c_stdlib_obj_path = c_modular_stdlib_byproducts_path
Expand Down Expand Up @@ -429,6 +438,7 @@ pub struct CommandsDetails {
interfaces: Vec<CommandDetail>,
implementations: Vec<CommandDetail>,
sources: Vec<CommandDetail>,
pre_tasks: Vec<CommandDetail>,
main: MainCommandLineDetail,
}

Expand Down
Loading

0 comments on commit c523df8

Please sign in to comment.