From ca289631eb51ec0213bf673306a00fcf6d4daf52 Mon Sep 17 00:00:00 2001 From: oh_ci Date: Thu, 7 Aug 2025 12:25:30 +0000 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80=20'Pull=20Request=20!7366=20?= =?UTF-8?q?:=20Add=20-O3=20optimization'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ets2panda/BUILD.gn | 12 ------------ ets2panda/aot/BUILD.gn | 3 +-- ets2panda/es2panda.cpp | 2 +- ets2panda/es2panda.h | 2 +- 4 files changed, 3 insertions(+), 16 deletions(-) diff --git a/ets2panda/BUILD.gn b/ets2panda/BUILD.gn index 74fd1e251f..dc95bac79a 100644 --- a/ets2panda/BUILD.gn +++ b/ets2panda/BUILD.gn @@ -1137,17 +1137,6 @@ config("libes2panda_config") { "-fexceptions", "-Werror=shadow", ] - - if (!is_debug) { - cflags_cc += [ - "-flto=thin", - "-O3", - ] - ldflags = [ - "-flto=thin", - "-O3", - ] - } } if ((defined(ark_standalone_build) && ark_standalone_build) || @@ -1248,7 +1237,6 @@ ohos_source_set("libes2panda_frontend_static") { } ohos_shared_library("libes2panda_public") { - configs = [ ":libes2panda_config" ] deps = [ ":libes2panda_public_frontend_static" ] if (is_mingw || is_win) { output_extension = "dll" diff --git a/ets2panda/aot/BUILD.gn b/ets2panda/aot/BUILD.gn index a861d7d1a4..55f5f3e98d 100644 --- a/ets2panda/aot/BUILD.gn +++ b/ets2panda/aot/BUILD.gn @@ -53,8 +53,7 @@ ohos_executable("ets2panda") { } configs += [ - "$ark_es2panda_root:libes2panda_public_config", - "$ark_es2panda_root:libes2panda_config", + "$ark_es2panda_root:libes2panda_public_config" ] deps = [ diff --git a/ets2panda/es2panda.cpp b/ets2panda/es2panda.cpp index 52aaeb6f0c..b2b63e0635 100644 --- a/ets2panda/es2panda.cpp +++ b/ets2panda/es2panda.cpp @@ -139,5 +139,5 @@ void Compiler::DumpAsm(const pandasm::Program *prog) } // When compiling multi thread, this is need by each thread indenpengdentlt -util::DiagnosticEngine *g_diagnosticEngine = nullptr; +thread_local util::DiagnosticEngine *g_diagnosticEngine = nullptr; } // namespace ark::es2panda diff --git a/ets2panda/es2panda.h b/ets2panda/es2panda.h index b7e93a6cbd..1f5a0aafc4 100644 --- a/ets2panda/es2panda.h +++ b/ets2panda/es2panda.h @@ -141,7 +141,7 @@ private: // g_diagnosticEngine used only for flush diagnostic before unexpected process termination: // - inside SIGSEGV handler -extern util::DiagnosticEngine *g_diagnosticEngine; +thread_local extern util::DiagnosticEngine *g_diagnosticEngine; } // namespace ark::es2panda #endif -- Gitee