GN: default to -O1
In a GN world we are no longer tied to the Debug/Release dichotomy of GYP, and extra_cflags makes it trivially easy to override any flags we set by default. These two together mean we don't have to make the default Debug build pointlessly unoptimized. -O1 takes negligibly longer to compile than -O0, doesn't make debugging difficult, and the code is considerably better. DM runs ~4x faster this way. Backstory: I just re-noticed we do this for our Debug MSAN builds, which has had a serious wall-time slimming effect. I was about to restore it to my GN MSAN builds when I realized, hey, maybe we should do this for all builds. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2322753002 Review-Url: https://codereview.chromium.org/2322753002
This commit is contained in:
parent
48ba2b8550
commit
5e3a630753
@ -28,6 +28,7 @@ config("no_rtti") {
|
||||
|
||||
config("default") {
|
||||
cflags = [
|
||||
"-O1",
|
||||
"-g",
|
||||
"-fstrict-aliasing",
|
||||
"-fPIC",
|
||||
|
@ -545,7 +545,7 @@ SkGlyphCache* SkGlyphCache::VisitCache(SkTypeface* typeface,
|
||||
|
||||
// Precondition: the typeface id must be the fFontID in the descriptor
|
||||
SkDEBUGCODE(
|
||||
uint32_t length;
|
||||
uint32_t length = 0;
|
||||
const SkScalerContext::Rec* rec = static_cast<const SkScalerContext::Rec*>(
|
||||
desc->findEntry(kRec_SkDescriptorTag, &length));
|
||||
SkASSERT(rec);
|
||||
|
Loading…
Reference in New Issue
Block a user