diff --git a/ts2panda/BUILD.gn b/ts2panda/BUILD.gn index c5f498c329d2b94175c421aee5425df9946de2fd..89de1457b46516a6ab693560f294b106e843183a 100755 --- a/ts2panda/BUILD.gn +++ b/ts2panda/BUILD.gn @@ -259,13 +259,15 @@ ohos_copy("copy_ts2abc_tests") { module_install_name = "" } -group("ts2abc_unittests") { - if (host_os == "linux") { - testonly = true - deps = [ - "tests:ts2abc_ts_instruction_type_test(${toolchain_linux})", - "tests:ts2abc_ts_type_system_test(${toolchain_linux})", - "tests:ts2abc_ts_ut_test(${toolchain_linux})", - ] +if (!ark_standalone_build) { + group("ts2abc_unittests") { + if (host_os == "linux") { + testonly = true + deps = [ + "tests:ts2abc_ts_instruction_type_test(${toolchain_linux})", + "tests:ts2abc_ts_type_system_test(${toolchain_linux})", + "tests:ts2abc_ts_ut_test(${toolchain_linux})", + ] + } } } diff --git a/ts2panda/ts2abc/BUILD.gn b/ts2panda/ts2abc/BUILD.gn index 19f7bc1a7bcaad28c16b360de48031bfa02671a5..eb7339ccb99345e7ab541f59c1d942129188909f 100755 --- a/ts2panda/ts2abc/BUILD.gn +++ b/ts2panda/ts2abc/BUILD.gn @@ -19,7 +19,7 @@ config("ts2abc_config") { visibility = [ ":*" ] include_dirs = [ ".", - "$jsoncpp_root/include", + "//third_party/jsoncpp/include", "$ark_root/libpandabase", ] @@ -58,79 +58,77 @@ source_set("jsoncpp_set_static") { public_configs = [ "$jsoncpp_root:jsoncpp_config" ] public_configs += [ ":flag_config" ] include_dirs = [ - "$jsoncpp_root/include", - "$jsoncpp_root/include/json/", + "//third_party/jsoncpp/include", + "//third_party/jsoncpp/include/json/", ] } -if (!ark_standalone_build) { - ohos_static_library("jsoncpp_static") { - deps = [ ":jsoncpp_set_static" ] - use_exceptions = true - part_name = "ets_frontend" - subsystem_name = "arkcompiler" - } +ohos_static_library("jsoncpp_static") { + deps = [ ":jsoncpp_set_static" ] + use_exceptions = true + part_name = "ets_frontend" + subsystem_name = "arkcompiler" +} - ohos_executable("ts2abc") { - sources = [ - "main.cpp", - "ts2abc.cpp", - ] +ohos_executable("ts2abc") { + sources = [ + "main.cpp", + "ts2abc.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 = [ - "//arkcompiler/ets_frontend/merge_abc:panda_assembly_proto_static", - sdk_libc_secshared_dep, - ] + deps = [ + "//arkcompiler/ets_frontend/merge_abc:panda_assembly_proto_static", + 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", + "$ark_third_party_root/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 = false - part_name = "ets_frontend" - subsystem_name = "arkcompiler" } + + output_name = "js2abc" + install_enable = false + part_name = "ets_frontend" + subsystem_name = "arkcompiler" }