oilgen: hash linkage names in output path

This commit is contained in:
Jake Hillion 2023-09-15 11:26:51 -07:00 committed by Jake Hillion
parent 6abeb0c723
commit 78b1a6c840

View File

@ -152,7 +152,8 @@ fs::path OIGenerator::generateForType(const OICodeGen::Config& generatorConfig,
// TODO: Revert to outputPath and remove printing when typegraph is done.
fs::path tmpObject = outputPath;
tmpObject.replace_extension("." + linkageName + ".o");
tmpObject.replace_extension(
"." + std::to_string(std::hash<std::string>{}(linkageName)) + ".o");
if (!compiler.compile(code, sourcePath, tmpObject)) {
return {};