From 8741963cef82d8fb75ef7aabea85b5960a150d03 Mon Sep 17 00:00:00 2001 From: weidongz Date: Wed, 20 Sep 2023 10:17:36 +0800 Subject: [PATCH] merge-abc-9-22 Signed-off-by: weidongz Change-Id: I90a55b2d7d70722feee1b5c85326e29171536f51 --- es2panda/aot/options.cpp | 7 ++++--- es2panda/aot/options.h | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/es2panda/aot/options.cpp b/es2panda/aot/options.cpp index 6fd8a71469..d4074f7f96 100644 --- a/es2panda/aot/options.cpp +++ b/es2panda/aot/options.cpp @@ -334,6 +334,7 @@ bool Options::Parse(int argc, const char **argv) } if (opModule.GetValue()) { + mergeAbc_ = opModule.GetValue(); scriptKind_ = es2panda::parser::ScriptKind::MODULE; } else if (opCommonjs.GetValue()) { scriptKind_ = es2panda::parser::ScriptKind::COMMONJS; @@ -375,13 +376,13 @@ bool Options::Parse(int argc, const char **argv) compilerOutput_ = RemoveExtension(util::Helpers::BaseName(sourceFile_)).append(".abc"); } - if (opMergeAbc.GetValue()) { + if (opMergeAbc.GetValue() || mergeAbc_) { recordName_ = recordName.GetValue(); if (recordName_.empty()) { recordName_ = compilerOutput_.empty() ? "Base64Output" : RemoveExtension(util::Helpers::BaseName(compilerOutput_)); } - compilerOptions_.mergeAbc = opMergeAbc.GetValue(); + compilerOptions_.mergeAbc = opMergeAbc.GetValue() || mergeAbc_; } if (!inputIsEmpty) { @@ -455,7 +456,7 @@ bool Options::Parse(int argc, const char **argv) compilerOptions_.optLevel = (compilerOptions_.isDebug || !base64Input.GetValue().empty() || base64Output.GetValue()) ? 0 : opOptLevel.GetValue(); compilerOptions_.sourceFiles = sourceFiles_; - compilerOptions_.mergeAbc = opMergeAbc.GetValue(); + compilerOptions_.mergeAbc = opMergeAbc.GetValue() || mergeAbc_; compilerOptions_.patchFixOptions.dumpSymbolTable = opDumpSymbolTable.GetValue(); compilerOptions_.patchFixOptions.symbolTable = opInputSymbolTable.GetValue(); diff --git a/es2panda/aot/options.h b/es2panda/aot/options.h index 00a2b7cf99..3c284c8357 100644 --- a/es2panda/aot/options.h +++ b/es2panda/aot/options.h @@ -146,6 +146,7 @@ private: int optLevel_ {0}; int functionThreadCount_ {0}; int fileThreadCount_ {0}; + bool mergeAbc_ {false}; std::string npmModuleEntryList_; std::vector sourceFiles_; std::unordered_map outputFiles_; -- Gitee