支持叠加编译

Signed-off-by: HanSY <hansiyuan1@huawei.com>
This commit is contained in:
HanSY
2024-11-12 11:39:23 +08:00
parent a8926b7797
commit f21607c496
21 changed files with 244 additions and 16 deletions
+12 -1
View File
@@ -101,7 +101,18 @@ bool GenericCompiler::IsIgnore(const FileInfo &fileInfo)
{
std::lock_guard<std::mutex> lock(mutex_);
string output = GetOutputFilePath(fileInfo);
if (!g_resourceSet.emplace(output).second) {
bool hapEmplaceSuccess = true;
bool gResEmplaceSuccess = true;
if (isHapRes_) {
hapEmplaceSuccess = g_hapResourceSet.emplace(output).second;
gResEmplaceSuccess = g_resourceSet.emplace(output).second;
} else if (g_hapResourceSet.count(output)) { // overlap the hap resource by new resource
g_hapResourceSet.erase(output);
} else {
gResEmplaceSuccess = g_resourceSet.emplace(output).second;
}
if (!hapEmplaceSuccess || !gResEmplaceSuccess) {
cerr << "Warning: '" << fileInfo.filePath << "' is defined repeatedly." << endl;
return true;
}