-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Fixed an error by running scons --tartget=cmake under LINUX, #10113 #10164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
请用命令 |
感谢你的提醒!我按照你提供的方法尝试了下。不知道现在有没有满足要求 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a reported error when running "scons --target=cmake" under Linux by modifying the handling of CXXFLAGS in tools/cmake.py.
- Replaces direct replacement on env['CXXFLAGS'] with a join operation before processing.
- Adjusts flag formatting to avoid escape issues.
@@ -64,7 +64,8 @@ def GenerateCFiles(env, project, project_name): | |||
|
|||
CFLAGS = env['CFLAGS'].replace('\\', "/").replace('\"', "\\\"") | |||
if 'CXXFLAGS' in dir(rtconfig): | |||
CXXFLAGS = env['CXXFLAGS'].replace('\\', "/").replace('\"', "\\\"") | |||
cflag_str=''.join(env['CXXFLAGS']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of ''.join() assumes that env['CXXFLAGS'] is an iterable of strings. If env['CXXFLAGS'] is already a string, this can lead to unexpected behavior. Consider validating the type before joining or using a type conversion method that properly handles both strings and lists.
cflag_str=''.join(env['CXXFLAGS']) | |
if isinstance(env['CXXFLAGS'], str): | |
cflag_str = env['CXXFLAGS'] | |
else: | |
cflag_str = ''.join(env['CXXFLAGS']) |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
add RT_THREAD_CTRL_SET_PRIORITY add RT_THREAD_CTRL_SET_PRIORITY doxygen: cleanup and re-org files This patch contains two small changes, mainly to prepare for the next step of organizing the modules framework. The first change: move the files related to doxygen examples to `documentation/0.doxygen/example/` The second change: delete `documentation/0.doxygen/mainpage.h`, which is the mainpage of the old page. Now the new mainpage is `documentation/INDEX.md`, so the duplicate can be deleted. Signed-off-by: Chen Wang <[email protected]> [bsp/hpm5300evk]: 修复readme中的描述问题 (RT-Thread#10187) 1.bsp中描述路径boards不存在,只有board,并且路径中会包含openocd,把openocd路径去掉 2. 运行openocd发现cmsis-dap.cfg异常,使用ft2232.cfg可以正常烧入,修改readme 3. 添加download.bat脚本,方便下载 libcpu: aarch64: Fix NORMAL_NOCACHE_MEM attr (RT-Thread#10180) Signed-off-by: Cliff Chen <[email protected]> Signed-off-by: mouch6131 <[email protected]> Co-authored-by: Cliff Chen <[email protected]> Fixed an error by running scons --tartget=cmake under LINUX, RT-Thread#10113 (RT-Thread#10164) Fixed an error by running scons --tartget=cmake under LINUX, and associated issue RT-Thread#10113
add RT_THREAD_CTRL_SET_PRIORITY add RT_THREAD_CTRL_SET_PRIORITY doxygen: cleanup and re-org files This patch contains two small changes, mainly to prepare for the next step of organizing the modules framework. The first change: move the files related to doxygen examples to `documentation/0.doxygen/example/` The second change: delete `documentation/0.doxygen/mainpage.h`, which is the mainpage of the old page. Now the new mainpage is `documentation/INDEX.md`, so the duplicate can be deleted. Signed-off-by: Chen Wang <[email protected]> [bsp/hpm5300evk]: 修复readme中的描述问题 (RT-Thread#10187) 1.bsp中描述路径boards不存在,只有board,并且路径中会包含openocd,把openocd路径去掉 2. 运行openocd发现cmsis-dap.cfg异常,使用ft2232.cfg可以正常烧入,修改readme 3. 添加download.bat脚本,方便下载 libcpu: aarch64: Fix NORMAL_NOCACHE_MEM attr (RT-Thread#10180) Signed-off-by: Cliff Chen <[email protected]> Signed-off-by: mouch6131 <[email protected]> Co-authored-by: Cliff Chen <[email protected]> Fixed an error by running scons --tartget=cmake under LINUX, RT-Thread#10113 (RT-Thread#10164) Fixed an error by running scons --tartget=cmake under LINUX, and associated issue RT-Thread#10113 [DM/FDT] Fix garble when booting Fix garble caused by empty implementation of earlycon series function in driver.If driver doesn't offer earlycon_id or rt_f dt_earlycon_id.setup function but open option, the checking of best_earlycon_id will failed. Signed-off-by: 1078249029 <[email protected]> [bsp/phytium]适配rtthread5.2版本 (RT-Thread#10178) * rtthread 5.2适配
…ciated issue #10113
拉取/合并请求描述:(PR description)
[
修复在linux下面使用scons生成cmake报错的问题
修改cmake.py中的CXXFLAGS
]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0
代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up