修复 c++ gen_port 编译问题

Signed-off-by: a1012112796 <1012112796@qq.com>
This commit is contained in:
2021-10-29 17:07:08 +08:00
parent 6923e908e8
commit dc09f8fd99
2 changed files with 5 additions and 5 deletions

View File

@@ -887,8 +887,8 @@ def EndBuilding(target, program = None, is_rtt = False):
Clean(target, 'rtua.py') Clean(target, 'rtua.py')
Clean(target, 'rtua.pyc') Clean(target, 'rtua.pyc')
if is_rtt: if is_rtt:
Clean(target, 'gen_ports/gen_ports.c') Clean(target, 'gen_ports/gen_ports_c.c')
Clean(target, 'gen_ports/gen_ports.cpp') Clean(target, 'gen_ports/gen_ports_cpp.cpp')
if GetOption('target'): if GetOption('target'):
GenTargetProject(program) GenTargetProject(program)

View File

@@ -122,8 +122,8 @@ class SharelibHandler:
import json import json
init_c_path = os.path.join(os.getcwd(), "gen_ports/gen_ports.c") init_c_path = os.path.join(os.getcwd(), "gen_ports/gen_ports_c.c")
init_cpp_path = init_c_path + "pp" init_cpp_path = os.path.join(os.getcwd(), "gen_ports/gen_ports_cpp.cpp")
finit_c = open(init_c_path, 'w+') finit_c = open(init_c_path, 'w+')
finit_cpp = open(init_cpp_path, 'w+') finit_cpp = open(init_cpp_path, 'w+')
@@ -132,7 +132,7 @@ class SharelibHandler:
exit(1) exit(1)
file_head = ['/**\n', file_head = ['/**\n',
' * @file: gen_ports.c/cpp\n', ' * @file: gen_ports_c.c/_cpp.cpp\n',
' * \n', ' * \n',
' * @warn: auto generated init ports file; DO NOT EDIT.', ' * @warn: auto generated init ports file; DO NOT EDIT.',
' */\n\n', ' */\n\n',