From fa8bf762bb757ba0485f33c4d6340260bed3fc82 Mon Sep 17 00:00:00 2001 From: lordwithcc Date: Mon, 4 Jul 2022 10:10:49 +0800 Subject: [PATCH] Remove ark template Signed-off-by: lordwithcc --- ts2panda/ts2abc/BUILD.gn | 116 ++++++++++++++++++------------------- ts2panda/ts2abc_config.gni | 4 +- 2 files changed, 57 insertions(+), 63 deletions(-) diff --git a/ts2panda/ts2abc/BUILD.gn b/ts2panda/ts2abc/BUILD.gn index 54dffea651..1bfaa548f6 100755 --- a/ts2panda/ts2abc/BUILD.gn +++ b/ts2panda/ts2abc/BUILD.gn @@ -11,16 +11,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -if (!defined(ark_independent_build)) { +if (!defined(ark_standalone_build)) { import("//ark/runtime_core/ark_config.gni") import("//build/ohos.gni") + jsoncpp_root = "$ark_third_party_root/jsoncpp" } else { import("//runtime_core/ark_config.gni") import("$build_root/ark.gni") + jsoncpp_root = "//third_party/jsoncpp" } -jsoncpp_root = "$ark_third_party_root/jsoncpp" - config("ts2abc_config") { visibility = [ ":*" ] include_dirs = [ @@ -68,75 +68,69 @@ source_set("jsoncpp_set_static") { ] } -if (!defined(ark_independent_build)) { - ohos_static_library("jsoncpp_static") { - deps = [ ":jsoncpp_set_static" ] - use_exceptions = true - subsystem_name = "ark" - part_name = "ark_frontend_tool" - } +ohos_static_library("jsoncpp_static") { + deps = [ ":jsoncpp_set_static" ] + use_exceptions = true + subsystem_name = "ark" + part_name = "ark_frontend_tool" +} - ohos_executable("ts2abc") { - sources = [ - "main.cpp", - "ts2abc.cpp", - "type_adapter.cpp", - ] +ohos_executable("ts2abc") { + sources = [ + "main.cpp", + "ts2abc.cpp", + "type_adapter.cpp", + ] - configs = [ ":ts2abc_config" ] + configs = [ ":ts2abc_config" ] - cflags = [ - "-Wno-c++20-designator", - "-Wno-c99-extensions", - "-Wno-unknown-warning-option", - ] + cflags = [ + "-Wno-c++20-designator", + "-Wno-c99-extensions", + "-Wno-unknown-warning-option", + ] - deps = [ sdk_libc_secshared_dep ] + deps = [ sdk_libc_secshared_dep ] - if (is_linux || is_mingw || is_mac) { + if (is_linux || is_mingw || is_mac) { + deps += [ + "$ark_root/assembler:libarkassembler_frontend_static", + "$ark_root/libpandabase:libarkbase_frontend_static", + "$ark_root/libpandafile:libarkfile_frontend_static", + "$ark_root/libziparchive:libarkziparchive_frontend_static", + "//third_party/jsoncpp:jsoncpp_static", + ] + if (enable_bytecode_optimizer) { deps += [ - "$ark_root/assembler:libarkassembler_frontend_static", - "$ark_root/libpandabase:libarkbase_frontend_static", - "$ark_root/libpandafile:libarkfile_frontend_static", - "$ark_root/libziparchive:libarkziparchive_frontend_static", - "//third_party/jsoncpp:jsoncpp_static", + "$ark_root/bytecode_optimizer:libarkbytecodeopt_frontend_static", + "$ark_root/compiler:libarkcompiler_frontend_static", ] - if (enable_bytecode_optimizer) { - deps += [ - "$ark_root/bytecode_optimizer:libarkbytecodeopt_frontend_static", - "$ark_root/compiler:libarkcompiler_frontend_static", - ] - } - } else { + } + } else { + deps += [ + "$ark_root/assembler:libarkassembler", + "$ark_root/libpandabase:libarkbase", + "$ark_root/libpandafile:libarkfile", + "$ark_root/libziparchive:libarkziparchive", + "$jsoncpp_root:jsoncpp", + ] + if (enable_bytecode_optimizer) { deps += [ - "$ark_root/assembler:libarkassembler", - "$ark_root/libpandabase:libarkbase", - "$ark_root/libpandafile:libarkfile", - "$ark_root/libziparchive:libarkziparchive", - "$jsoncpp_root:jsoncpp", + "$ark_root/bytecode_optimizer:libarkbytecodeopt", + "$ark_root/compiler:libarkcompiler", ] - if (enable_bytecode_optimizer) { - deps += [ - "$ark_root/bytecode_optimizer:libarkbytecodeopt", - "$ark_root/compiler:libarkcompiler", - ] - } } + } - if (is_linux) { - if (build_public_version) { - ldflags = [ "-static-libstdc++" ] - } else { - libs = [ libcpp_static_lib ] - } + if (is_linux) { + if (build_public_version) { + ldflags = [ "-static-libstdc++" ] + } else { + libs = [ libcpp_static_lib ] } - - output_name = "js2abc" - install_enable = true - subsystem_name = "ark" - } -} else { - ark_static_library("jsoncpp_static") { - deps = [ ":jsoncpp_set_static" ] } + + output_name = "js2abc" + install_enable = true + subsystem_name = "ark" } diff --git a/ts2panda/ts2abc_config.gni b/ts2panda/ts2abc_config.gni index 496060cae9..a830cac61b 100755 --- a/ts2panda/ts2abc_config.gni +++ b/ts2panda/ts2abc_config.gni @@ -11,13 +11,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -if (!defined(ark_independent_build)) { +if (!defined(ark_standalone_build)) { import("//build/ohos.gni") import("//build/test.gni") build_root = "//build" ts2abc_root = "//ark/ts2abc/ts2panda" } else { - import("$build_root/ark.gni") + import("//js_runtime/build/ark.gni") ts2abc_root = "//ts2abc/ts2panda" } -- Gitee