diff --git a/ets2panda/BUILD.gn b/ets2panda/BUILD.gn index 74fd1e251f035b53bd0d9164fe79d13a94301785..dc95bac79ac2b55eb8d81d4bed9bdcb558a24adf 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 a861d7d1a4751dc7daa6d89d5dceff79f7fda1e0..55f5f3e98d6100c3bdcf6e7ecf99ae3ec4c8c81c 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 52aaeb6f0c901462b64538b1d56a372a02b36ffc..b2b63e0635fceb402425dc6bd9e747c1ccb65e5b 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 b7e93a6cbdfdccd79d8f1575898297d78211e8cb..1f5a0aafc4ab0388f7a7066add558876f47c1c25 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