The migration is done.
Build Performance:
Build performance doesn't seem to be affected (which is good):
Summary:
-
386 CLs with +33599, -32531 lines
- New buildflags are directly defined in build/build_config.h so header update is minimal, and no BUILD.gn update needed.
- PRESUBMIT.py updated to prevent the use of the deprecated OS defines.
- Updated .js and .py files that generate C++ code.
- There might still be some defined(OS_XXX) left in third_party/ repos, which I'll leave to owners to decide.
Cheers,
Xiaohan
-----------------------------------
If you are still reading...
Miscellaneous:
It seems there's no convention on whether the comment on #else and #endif should be the same as the #if condition, or should be the reverse, e.g. should we have "!" or not? I was following the "same" condition.
```
#if
BUILDFLAG(IS_WIN)
#else // !
BUILDFLAG(IS_WIN)
#endif // !BUILDFLAG(IS_WIN)
```
Some people even go further with the reverse logic:
```
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
#else
#endif // !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)
```
clang format doesn't handle #endif comment well in the following case:
```
#if BUILDFLAG(IS_WIN)
#include <basetsd.h> // Included before jpeglib.h because of INT32 clash
#endif // BUILDFLAG(IS_WIN)
```
Tricium likes to give the wrong suggestion for the following case:
```
Foo::Foo() {
#if BUILDFLAG(IS_MAC)
Bar();
#endif
}
```