Skip to content

Commit

Permalink
test: trying Clang 17 with Clang modules instead of standard modules
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRustifyer committed Aug 21, 2024
1 parent ed4ea79 commit 0148a50
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion zork++/src/lib/cache/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ mod clang {
// Typically, the useful information will be in stderr for `clang++ -###` commands
cache.compilers_metadata.clang = process_frontend_driver_info(&combined_output)?;

if cache.compilers_metadata.clang.major >= 17 {
if cache.compilers_metadata.clang.major > 17 {
discover_modular_stdlibs(program_data, cache)?;
}

Expand Down
2 changes: 1 addition & 1 deletion zork++/src/lib/compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub fn generate_commands_arguments<'a>(
fn generate_modular_stdlibs_cmds<'a>(model: &'a ZorkModel<'a>, cache: &mut ZorkCache<'a>) {
match model.compiler.cpp_compiler {
CppCompiler::CLANG => {
if cache.compilers_metadata.clang.major >= 17 {
if cache.compilers_metadata.clang.major > 17 {
modules::generate_modular_cpp_stdlib_args(model, cache, StdLibMode::Cpp);
modules::generate_modular_cpp_stdlib_args(model, cache, StdLibMode::CCompat);
}
Expand Down
2 changes: 1 addition & 1 deletion zork++/src/lib/domain/flyweight_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ fn generate_clang_flyweight_args<'a>(
let major = clang_metadata.major;

compiler_flyweight_args.push_opt(program_data.compiler.stdlib_arg());
if major < 17 {
if major <= 17 {
compiler_flyweight_args.push("-fimplicit-modules");
compiler_flyweight_args.push(clang_args::implicit_module_map(out_dir));
} else {
Expand Down

0 comments on commit 0148a50

Please sign in to comment.