Skip to content
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

对于cl.exe,-O2应比-Ox更快 #2809

Closed
lone-wolf-akela opened this issue Sep 13, 2022 · 2 comments
Closed

对于cl.exe,-O2应比-Ox更快 #2809

lone-wolf-akela opened this issue Sep 13, 2022 · 2 comments
Labels
Milestone

Comments

@lone-wolf-akela
Copy link

Xmake 版本

xmake v2.7.1+master.5c0e53f91

操作系统版本和架构

windows 11

描述问题

根据代码:

, faster = "-O2"

, fastest = "-Ox -fp:fast"

xmake 将 cl.exe 在最大优化模式下设置为-Ox而非-O2。
根据微软文档 https://docs.microsoft.com/en-us/cpp/build/reference/ox-full-optimization?view=msvc-170

the /Ox compiler option enables only a subset of the speed optimization options enabled by /O2.

因此,这里faster和fastest的优化参数是否应该交换一下?

期待的结果

如上描述。

工程配置

No response

附加信息和错误日志

No response

@waruqi
Copy link
Member

waruqi commented Sep 13, 2022

似乎是,你可以来个 pr 过来

@waruqi waruqi added this to the v2.7.2 milestone Sep 13, 2022
@waruqi
Copy link
Member

waruqi commented Sep 13, 2022

改了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants