diff --git a/es2panda/aot/emitFiles.cpp b/es2panda/aot/emitFiles.cpp index 7eca28a2e40c682ef62a3d429003aa7f7828d1dc..40b0cd20e40ac429b2557d533e0f6d40017955cc 100644 --- a/es2panda/aot/emitFiles.cpp +++ b/es2panda/aot/emitFiles.cpp @@ -85,14 +85,20 @@ void EmitMergedAbcJob::Run() for (const auto &info: progsInfo_) { progs.push_back(&(info.second->program)); } - if (!panda::pandasm::AsmEmitter::EmitPrograms(panda::os::file::File::GetExtendedFilePath(outputFileName_), progs, - true, targetApiVersion_)) { - throw Error(ErrorType::GENERIC, "Failed to emit " + outputFileName_ + ", error: " + - panda::pandasm::AsmEmitter::GetLastError()); - } + + bool success = panda::pandasm::AsmEmitter::EmitPrograms( + panda::os::file::File::GetExtendedFilePath(outputFileName_), progs, true, targetApiVersion_); + for (auto *dependant : dependants_) { dependant->Signal(); } + + if (!success) { + throw Error(ErrorType::GENERIC, "Failed to emit " + outputFileName_ + ", error: " + + panda::pandasm::AsmEmitter::GetLastError() + + "\nIf you're using any cache file generated by older version of SDK, " + + "please try cleaning the cache files and rebuild"); + } } void EmitCacheJob::Run()