• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2022 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14set(ES2PANDA_AOT_SRC
15  options.cpp
16  main.cpp
17)
18
19panda_add_executable(es2panda ${ES2PANDA_AOT_SRC})
20target_link_libraries(es2panda es2panda-lib arkassembler arkbytecodeopt)
21target_include_directories(es2panda PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
22
23if (PANDA_FUZZILLI)
24    target_compile_options(es2panda
25        PRIVATE -fPIC
26    )
27endif()
28
29target_compile_options(es2panda
30  PRIVATE -Werror=shadow
31)
32
33panda_add_sanitizers(TARGET es2panda SANITIZERS ${PANDA_SANITIZERS_LIST})
34panda_add_to_clang_tidy(TARGET es2panda CHECKS
35    "-modernize-use-trailing-return-type"
36    "-llvmlibc-restrict-system-libc-headers"
37    "-llvmlibc-callee-namespace"
38    "-cert-dcl21-cpp"
39    "-cppcoreguidelines-macro-usage"
40    "-cppcoreguidelines-pro-bounds-pointer-arithmetic"
41    "-fuchsia-default-arguments-calls"
42    "-fuchsia-default-arguments-declarations"
43    "-readability-implicit-bool-conversion"
44    "-misc-non-private-member-variables-in-classes"
45    "-hicpp-signed-bitwise"
46    "-altera-struct-pack-align"
47)
48