Skip to content

Commit 4ee3944

Browse files
committed
exclude target triple in IR when running tests
1 parent b62c290 commit 4ee3944

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/codegen.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,11 @@ impl<'ink> CodeGen<'ink> {
129129
// Get the data layout from the target machine and set the module's data layout and triple
130130
let target_data = target_machine.get_target_data();
131131
module.set_data_layout(&target_data.get_data_layout());
132-
module.set_triple(&triple);
132+
// Set the module's target triple
133+
if !cfg!(test) {
134+
// We don't want to set the triple in tests, as it will cause issues with snapshots on windows builds
135+
module.set_triple(&triple);
136+
}
133137

134138
let debug_level = if file_marker.is_internal() { DebugLevel::None } else { debug_level };
135139
let debug = debug::DebugBuilderEnum::new(context, &module, root, optimization_level, debug_level);

0 commit comments

Comments
 (0)