Skip to content

Commit

Permalink
Fix bug mentioned by @antonysigma. (#7916)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcourteaux authored Oct 27, 2023
1 parent cf01e97 commit ed357c2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,15 @@ void Module::compile(const std::map<OutputFileType, std::string> &output_files)
// want it on its own, so we will generate it to a temp directory, since some
// build systems (e.g. Bazel) are strict about what you can generate to the 'expected'
// build-products directory (but grant exemptions for /tmp).
assembly_path = temp_assembly_dir.add_temp_file(output_files.at(OutputFileType::stmt_html),
std::string path;
if (contains(output_files, OutputFileType::stmt_html)) {
path = output_files.at(OutputFileType::stmt_html);
} else if (contains(output_files, OutputFileType::conceptual_stmt_html)) {
path = output_files.at(OutputFileType::conceptual_stmt_html);
} else {
internal_error << "A html file path is required to determine the output of the temporary assembly file.\n";
}
assembly_path = temp_assembly_dir.add_temp_file(path,
get_output_info(target()).at(OutputFileType::assembly).extension,
target());
debug(1) << "Module.compile(): creating temp file for assembly output at " << assembly_path << "\n";
Expand Down

0 comments on commit ed357c2

Please sign in to comment.