Skip to content

Conversation

HuiYuanXin13
Copy link
Contributor

修复了这样的问题:使用android ndk构建rust源码时,rustc不会将link-args="..."的等号之后的引号特殊处理,导致传递给clang++类似'"-llog'的错误的参数。

  • Before adding new features and new modules, please go to issues to submit the relevant feature description first.
  • Write good commit messages and use the same coding conventions as the rest of the project.
  • Please commit code to dev branch and we will merge into master branch in feature
  • Ensure your edited codes with four spaces instead of TAB.

  • 增加新特性和新模块之前,请先到issues提交相关特性说明,经过讨论评估确认后,再进行相应的代码提交,避免做无用工作。
  • 编写友好可读的提交信息,并使用与工程代码相同的代码规范,代码请用4个空格字符代替tab缩进。
  • 请提交代码到dev分支,如果通过,我们会在特定时间合并到master分支上。
  • 为了规范化提交日志的格式,commit消息,不要用中文,请用英文描述。

修复了这样的问题:使用android ndk构建rust源码时,rustc不会将link-args="..."的等号之后的引号特殊处理,导致传递给clang++类似'"-llog'的错误的参数。
toolchain:add("rcldflags", "-C link-args=\"" .. (table.concat(rcldflags, " "):gsub("%-march=.-%s", "") .. "\""))
-- fix [[note: clang++: error: no such file or directory: '"-llog']] on windows
-- @note 'link-args=...' should not be 'link-args="..."'
toolchain:set("rcshflags", {"-C", "link-args=" .. (table.concat(rcshflags, " "):gsub("%-march=.-%s", ""))}, {expand=false})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expand = false 等号两边空格

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@waruqi waruqi added this to the v3.0.2 milestone Aug 21, 2025
@waruqi waruqi merged commit 1b78925 into xmake-io:dev Aug 21, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants