# Copyright (c) 2021 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//ark/js_runtime/js_runtime_config.gni") import("//ark/js_runtime/test/test_helper.gni") import("//build/test.gni") config("include_llvm_config") { if (compile_llvm_online) { include_dirs = [ "//third_party/llvm-project/build/include", "//third_party/llvm-project/llvm/include/", ] } else { include_dirs = [ "//prebuilts/ark_js_prebuilts/llvm_prebuilts/llvm/include", "//prebuilts/ark_js_prebuilts/llvm_prebuilts/build/include", ] } } module_output_path = "ark/js_runtime" host_unittest_action("StubTest") { module_out_path = module_output_path sources = [ # test file "stub_tests.cpp", ] configs = [ ":include_llvm_config", "//ark/js_runtime:ecma_test_config", "//ark/js_runtime/ecmascript/compiler:ark_jsruntime_compiler_config", "//ark/js_runtime:ark_jsruntime_public_config", "$ark_root/runtime:arkruntime_public_config", ] if (compile_llvm_online) { lib_dirs = [ "//third_party/llvm-project/build/lib" ] } else { lib_dirs = [ "//prebuilts/ark_js_prebuilts/llvm_prebuilts/build/lib" ] } libs = [ "stdc++", "z", "LLVMTarget", "LLVMObject", "LLVMMC", "LLVMSupport", "LLVMCore", "LLVMExecutionEngine", "LLVMInterpreter", "LLVMMCJIT", "LLVMExegesis", "LLVMRuntimeDyld", "LLVMInstCombine", "LLVMAnalysis", "LLVMScalarOpts", "LLVMBinaryFormat", "LLVMDebugInfoDWARF", "LLVMRemarks", "LLVMTextAPI", "LLVMScalarOpts", "LLVMTransformUtils", "LLVMBitReader", "LLVMAsmPrinter", "LLVMProfileData", "LLVMBitstreamReader", "LLVMSelectionDAG", "LLVMGlobalISel", "LLVMLTO", "LLVMCFGuard", "LLVMVectorize", "LLVMDemangle", "LLVMipo", "LLVMInstrumentation", "LLVMDebugInfoCodeView", "LLVMAggressiveInstCombine", "LLVMAsmParser", "LLVMMCParser", "LLVMMIRParser", "LLVMX86Info", "LLVMAArch64Info", "LLVMARMDesc", "LLVMAArch64Desc", "LLVMX86Desc", "LLVMX86Disassembler", "LLVMARMDisassembler", "LLVMAArch64Disassembler", "LLVMMCDisassembler", "LLVMAArch64CodeGen", "LLVMARMCodeGen", "LLVMCodeGen", "LLVMX86CodeGen", "LLVMX86AsmParser", "LLVMTransformUtils", "LLVMAArch64Utils", "LLVMARMUtils", "LLVMIRReader", ] deps = [ "$ark_root/libpandabase:libarkbase", "//ark/js_runtime/ecmascript/compiler:libark_jsoptimizer_test", sdk_libc_secshared_dep, ] } group("host_unittest") { testonly = true # deps file # deps = [ ":StubTestAction" ] }