forked from Xilinx/mlir-aie
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlit.site.cfg.py.in
More file actions
executable file
·91 lines (80 loc) · 3.64 KB
/
lit.site.cfg.py.in
File metadata and controls
executable file
·91 lines (80 loc) · 3.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# ./lit.site.cfg.py.in -*- Python -*-
#
# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
# Copyright (C) 2022, Advanced Micro Devices, Inc.
@LIT_SITE_CFG_IN_HEADER@
import sys
import lit.util
config.host_triple = r"""@LLVM_HOST_TRIPLE@"""
config.target_triple = r"""@TARGET_TRIPLE@"""
config.llvm_src_root = r"""@LLVM_SOURCE_DIR@"""
config.llvm_obj_root = r"""@LLVM_BINARY_DIR@"""
config.llvm_tools_dir = r"""@LLVM_TOOLS_DIR@"""
config.llvm_lib_dir = r"""@LLVM_LIBRARY_DIR@"""
config.llvm_shlib_dir = r"""@SHLIBDIR@"""
config.llvm_shlib_ext = r"""@SHLIBEXT@"""
config.llvm_exe_ext = r"""@EXEEXT@"""
config.peano_install_dir = r"""@PEANO_INSTALL_DIR@"""
config.lit_tools_dir = r"""@LLVM_LIT_TOOLS_DIR@"""
config.python_executable = r"""@Python3_EXECUTABLE@"""
config.gold_executable = r"""@GOLD_EXECUTABLE@"""
config.ld64_executable = r"""@LD64_EXECUTABLE@"""
config.enable_shared = @ENABLE_SHARED@
config.enable_assertions = @ENABLE_ASSERTIONS@
config.targets_to_build = r"""@TARGETS_TO_BUILD@"""
config.native_target = r"""@LLVM_NATIVE_ARCH@"""
config.llvm_bindings = r"""@LLVM_BINDINGS@""".split(' ')
config.host_os = r"""@HOST_OS@"""
config.host_cc = r"""@HOST_CC@"""
config.host_cxx = r"""@HOST_CXX@"""
# Use a raw triple-quoted string so Windows backslashes and embedded quotes survive.
config.host_ldflags = r"""@HOST_LDFLAGS@"""
config.llvm_use_sanitizer = r"""@LLVM_USE_SANITIZER@"""
config.llvm_host_triple = r"""@LLVM_HOST_TRIPLE@"""
config.host_arch = r"""@HOST_ARCH@"""
config.xrt_dir = r"""@XRT_DIR@"""
config.xrt_bin_dir = r"""@XRT_BIN_DIR@"""
config.xrt_lib_dir = r"""@XRT_LIB_DIR@"""
config.xrt_include_dir = r"""@XRT_INCLUDE_DIR@"""
config.opencv_libs = r"""@OpenCV_LIBS@"""
config.opencv_lib_dir = r"""@OpenCV_LIB_PATH@"""
config.opencv_include_dir = r"""@OpenCV_INCLUDE_DIRS@"""
config.aie_src_root = r"""@AIE_SOURCE_DIR@"""
config.aie_obj_root = r"""@AIE_BINARY_DIR@"""
# test_exec_root: The root path where tests should be run.
config.test_exec_root = r"""@CMAKE_CURRENT_BINARY_DIR@"""
config.hsa_dir = r"""@hsa-runtime64_DIR@"""
config.hsa_found = lit.util.pythonize_bool(r"""@hsa-runtime64_FOUND@""")
# pass on vitis settings
config.enable_chess_tests = @CONFIG_ENABLE_CHESS_TESTS@
config.enable_board_tests = @CONFIG_ENABLE_BOARD_TESTS@
config.vitis_root = r"""@VITIS_ROOT@"""
config.vitis_aietools_dir = r"""@VITIS_AIETOOLS_DIR@"""
config.vitis_sysroot = r"""@Sysroot@"""
config.extraAieCcFlags = r"""@extraAieCcFlags@"""
config.aieHostTarget = r"""@AIE_RUNTIME_TEST_TARGET@"""
config.aieInstallPrefix = r"""@CMAKE_INSTALL_PREFIX@"""
config.vitis_components = []
if lit.util.pythonize_bool(r"""@AIETools_AIE_FOUND@"""):
config.vitis_components.append("AIE")
if lit.util.pythonize_bool(r"""@AIETools_AIE2_FOUND@"""):
config.vitis_components.append("AIE2")
if lit.util.pythonize_bool(r"""@AIETools_AIE2P_FOUND@"""):
config.vitis_components.append("AIE2P")
# Support substitution of the tools_dir with user parameters. This is
# used when we can't determine the tool dir at configuration time.
try:
config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
config.llvm_shlib_dir = config.llvm_shlib_dir % lit_config.params
except KeyError:
e = sys.exc_info()[1]
key, = e.args
lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
config.aie_include_integration_tests = r"""@AIE_INCLUDE_INTEGRATION_TESTS@"""
import lit.llvm
lit.llvm.initialize(lit_config, config)
# Let the main config do the real work.
lit_config.load_config(config, r"""@PROJECT_SOURCE_DIR@/lit.cfg.py""")