• 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(PLUGINS_INC ${PANDA_BINARY_ROOT}/runtime/include/plugins.inc)
15panda_gen_file(
16    DATAFILE ${GEN_PLUGIN_OPTIONS_YAML}
17    TEMPLATE ${PANDA_ROOT}/runtime/templates/plugins.inc.erb
18    REQUIRES ${PANDA_ROOT}/templates/plugin_options.rb
19    EXTRA_DEPENDENCIES plugin_options_merge
20    OUTPUTFILE ${PLUGINS_INC}
21)
22
23set(PLUGINS_ENTRYPOINTS_H ${PANDA_BINARY_ROOT}/runtime/include/plugins_entrypoints_gen.h)
24panda_gen_file(
25    DATAFILE ${GEN_PLUGIN_OPTIONS_YAML}
26    TEMPLATE ${PANDA_ROOT}/runtime/entrypoints/plugins_entrypoints_gen.h.erb
27    REQUIRES ${PANDA_ROOT}/templates/plugin_options.rb
28    EXTRA_DEPENDENCIES plugin_options_merge
29    OUTPUTFILE ${PLUGINS_ENTRYPOINTS_H}
30)
31
32set(PLUGINS_INTERPRETERS_INL_H ${PANDA_BINARY_ROOT}/runtime/include/plugins_interpreters-inl.h)
33panda_gen_file(
34    DATAFILE ${GEN_PLUGIN_OPTIONS_YAML}
35    TEMPLATE ${PANDA_ROOT}/runtime/templates/plugins_interpreters-inl.h.erb
36    REQUIRES ${PANDA_ROOT}/templates/plugin_options.rb
37    EXTRA_DEPENDENCIES plugin_options_merge
38    OUTPUTFILE ${PLUGINS_INTERPRETERS_INL_H}
39)
40
41set(LANGUAGE_CONFIG_GEN_INC ${PANDA_BINARY_ROOT}/runtime/include/language_config_gen.inc)
42panda_gen_file(
43    DATAFILE ${GEN_PLUGIN_OPTIONS_YAML}
44    TEMPLATE ${PANDA_ROOT}/runtime/templates/language_config_gen.inc.erb
45    REQUIRES ${PANDA_ROOT}/templates/plugin_options.rb
46    EXTRA_DEPENDENCIES plugin_options_merge
47    OUTPUTFILE ${LANGUAGE_CONFIG_GEN_INC}
48)
49
50add_custom_target(runtime_language_context DEPENDS
51    plugin_options_gen
52    ${PLUGINS_INC}
53    ${PLUGINS_INTERPRETERS_INL_H}
54    ${LANGUAGE_CONFIG_GEN_INC}
55    ${PLUGINS_ENTRYPOINTS_H}
56)
57
58add_dependencies(arkruntime_static runtime_language_context)
59add_dependencies(arkruntime runtime_language_context)
60add_dependencies(arkaotmanager runtime_language_context)
61add_dependencies(arkcompiler runtime_language_context)
62