Ninja is mostly ignorant of compiling and linking etc, it just runs commands. So I think if the issue is that gyp doesn't respect CFLAGS etc., then it's a bug in gyp's ninja.py.
It looks like that obeys CC from the environment but has no support for command-line changes to the flags passed to various commands.
You might be able to hack it with something like "CC=gcc -funroll-loops" if you didn't want to modify any code. I also wonder if there are any flags that make sense for Chromium it might make more sense to just put them in the gyp files directly. But there's always adding it to gyp too. You might need to make your flags come last if they conflict with Chromium's flags.