Don't assume cflags is non-nil

Fixes #29284.