Convert buildtype to optimization and debug options#3489
Conversation
|
Flake8 detected 12 issues on 33d0914 |
mesonbuild/compilers/c.py
Outdated
| return ['/Fo' + target] | ||
|
|
||
| def get_optimization_args(self, optimization_level): | ||
| return msvc_optimization_args[optimization_level] |
There was a problem hiding this comment.
[Flake8]
[F821] undefined name 'msvc_optimization_args'
mesonbuild/compilers/compilers.py
Outdated
| 'minsize': [], # In a future release: ['-C', 'opt-level=s'], | ||
| 'debugoptimized': ['-C', 'debuginfo=2'], | ||
| 'release': [], | ||
| 'minsize': [], |
There was a problem hiding this comment.
[Flake8]
[W291] trailing whitespace
mesonbuild/compilers/c.py
Outdated
| return msvc_optimization_args[optimization_level] | ||
|
|
||
| def get_debug_args(self, is_debug): | ||
| return msvc_debug_args[is_debug] |
There was a problem hiding this comment.
[Flake8]
[F821] undefined name 'msvc_debug_args'
4153d9b to
185b5da
Compare
|
Flake8 detected 6 issues on 185b5da |
185b5da to
98d1385
Compare
13712e8 to
5ec6b74
Compare
|
Flake8 detected 23 issues on 5ec6b74 |
5ec6b74 to
04b9089
Compare
|
This PR has very large regression potential. We should probably merge it at the very beginning of the next dev cycle so there is enough time to work out the kinks. |
04b9089 to
250df1d
Compare
|
I'll review this after the release. |
250df1d to
a5731db
Compare
|
Flake8 detected 10 issues on a5731db |
a5731db to
d900c31
Compare
|
Flake8 detected 16 issues on d900c31 |
d900c31 to
8f96da0
Compare
mesonbuild/compilers/c.py
Outdated
| return msvc_optimization_args[optimization_level] | ||
|
|
||
| def get_debug_args(self, is_debug): | ||
| return msvc_debug_args[is_debug] |
There was a problem hiding this comment.
[Flake8]
[F821] undefined name 'msvc_debug_args'
mesonbuild/compilers/c.py
Outdated
| return self.crt_args[crt_val] | ||
| assert(crt_val == 'from_buildtype') | ||
| # Match what build type flags used to do. | ||
| if builtype == 'plain': |
There was a problem hiding this comment.
[Flake8]
[F821] undefined name 'builtype'
mesonbuild/compilers/c.py
Outdated
| return ['/Fo' + target] | ||
|
|
||
| def get_optimization_args(self, optimization_level): | ||
| return msvc_optimization_args[optimization_level] |
There was a problem hiding this comment.
[Flake8]
[F821] undefined name 'msvc_optimization_args'
8f96da0 to
8a5bc80
Compare
7223b27 to
ffde7d0
Compare
|
I mean, a commit message like "Fix Visual Studio." is not very useful, neither is a commit message like "Fix flake8 errors.". In such PRs, either the commits should be squashed and reorganised into logical steps, or squashed into one commit, otherwise it's just noise. The tests also fail between commits, so it's difficult to do a git bisect inside the merge commit. |
|
To quote our documentation on this subject:
|
|
I know, but in this merge all the commits will fail the tests. |
|
If you really want me to squash this I can do it. But in my opinion that is worse because you lose all incrementality. |
|
I think preserving history make sense when you have a series of incremental atomic changes. Doing a part of a change (that breaks other things) is incremental in a "work-in-progress" fashion, but not in an "atomic steps" fashion. I am not deeply invested in this particular PR being squashed or merged, I just want to clarify my thoughts on the matter about when merge commits are useful. |
|
Travis failure is unrelated. |
A temporary hack while waiting for the merge of mesonbuild#3489
|
The GDBM wrap is now broken since it has an option named |
A temporary hack while waiting for the merge of mesonbuild#3489
A temporary hack while waiting for the merge of mesonbuild#3489
A temporary hack while waiting for the merge of mesonbuild#3489
A temporary hack while waiting for the merge of mesonbuild#3489
A temporary hack while waiting for the merge of mesonbuild#3489
A temporary hack while waiting for the merge of mesonbuild#3489
The current setup of a couple of different build types is a bit limiting. Ideally you'd want to toggle the optimization levels and "debugness" independent of each other. Some people might want to do releases with
-O2and others with-O3for example.This is a very rudimentary fix showing how a small fraction of this would be done. The full setup would go something like this:
custombuildtypesets also the value of the other two to match current behaviourbuiltypeis set to that, otherwise it is set tocustomComments welcome.