8000 mypyc build: when windows use correct optimization and debug flags by KotlinIsland · Pull Request #12468 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

mypyc build: when windows use correct optimization and debug flags #12468

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

Merged
merged 1 commit into from
Mar 28, 2022

Conversation

KotlinIsland
Copy link
Contributor
@KotlinIsland KotlinIsland commented Mar 27, 2022

Description

Send some more accurate optimization and debug flags to msvc.

This shouldn't fix the broken CI, but I think it's still a good idea to send correct parameters

GCC:
-O0 Reduce compilation time and make debugging produce the expected results. This is the default.
-O/-O1 Optimize. Optimizing compilation takes somewhat more time, and a lot more memory for a large function.
-O2 Optimize even more.
-O3 Optimize yet more.
-Os Optimize for size

MSVC:
/O1 sets a combination of optimizations that generate minimum size code.
/O2 sets a combination of optimizations that optimizes code for maximum speed.
/Od disables optimization, to speed compilation and simplify debugging.
here's some more info

Test Plan

N/A

@KotlinIsland KotlinIsland changed the title mypycify: msvc use opt level 1 instead of 0 mypyc build: when windows use opt level 1 instead of 0 Mar 27, 2022
@KotlinIsland KotlinIsland marked this pull request as draft March 27, 2022 10:24
@jhance
Copy link
Collaborator
jhance commented Mar 27, 2022

Passing /Od seems to be more correct than passing /O1.

@KotlinIsland KotlinIsland marked this pull request as ready for review March 27, 2022 23:44
@KotlinIsland KotlinIsland changed the title mypyc build: when windows use opt level 1 instead of 0 mypyc build: when windows use correct optimization and debug flags Mar 27, 2022
@jhance
Copy link
Collaborator
jhance commented Mar 28, 2022

Is it still not expected to fix CI?

@KotlinIsland
Copy link
Contributor Author

I wouldn't expect it to.

CI is being tracked here: #12460

@jhance
Copy link
Collaborator
jhance commented Mar 28, 2022

Okay, was just checking to make sure I'm not merging something broken.

@jhance jhance merged commit 466be21 into python:master Mar 28, 2022
@KotlinIsland KotlinIsland deleted the fix_ci branch March 28, 2022 03:42
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
0