Sanitizer builds should obey `set-webkit-configuration --force-optimization-level` when set. The reason it doesn't currently work that a command-line Xcode variable won't override the same variable from an xcconfig file specified on the command-line.
<rdar://problem/89161649>
Created attachment 452571 [details] Patch v1
Comment on attachment 452571 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=452571&action=review > Tools/sanitizer/sanitizer.xcconfig:12 > +WK_OVERRIDE_OPTIMIZATION_LEVEL = $(WK_NOT_$(WK_EMPTY_$(WK_FORCE_OPTIMIZATION_LEVEL))); > + > +GCC_OPTIMIZATION_LEVEL = $(GCC_OPTIMIZATION_LEVEL_OVERRIDE_$(WK_OVERRIDE_OPTIMIZATION_LEVEL)); > +GCC_OPTIMIZATION_LEVEL_OVERRIDE_YES = $(WK_FORCE_OPTIMIZATION_LEVEL); > +GCC_OPTIMIZATION_LEVEL_OVERRIDE_NO = $(GCC_OPTIMIZATION_LEVEL_OVERRIDE_NO_$(CONFIGURATION)); > +GCC_OPTIMIZATION_LEVEL_OVERRIDE_NO_Debug = 0; > +GCC_OPTIMIZATION_LEVEL_OVERRIDE_NO_Production = 1; > +GCC_OPTIMIZATION_LEVEL_OVERRIDE_NO_Release = 1; I could copy this code into every `Base.xcconfig` file if we wanted to simplify the the `webkitdirs.pm` change to only set `WK_FORCE_OPTIMIZATION_LEVEL`, but I wasn't sure it was worth the extra complexity. One advantage to making that change is that it makes it slightly clearer when the optimization level is being overridden, though you can still tell by noticing when `GCC_OPTIMIZATION_LEVEL` is set on the xcodebuild command-line.
Comment on attachment 452571 [details] Patch v1 I think this looks good as-is. We can consider moving things to Base.xcconfig if we need to do this elsewhere.
Cancelled https://ews-build.webkit.org/#/builders/70/builds/736 to speed up mac-wk2 queue. It already finished running layout-tests and the failures were pre-existing.
Committed r290199 (247527@main): <https://commits.webkit.org/247527@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 452571 [details].