On Fri, Sep 9, 2016, at 07:05 AM, xunxun wrote: > Hi, > I want to add some cflags to webrtc module, for example, -Os. > > I noticed that there is a moz.build in webrtc tree, I try to add > some lines: > > GYP_DIRS['trunk'].sandbox_vars['cflags_mozilla'] += '-Os' > > It seems moz build doesn't understand it. > > If I add CFLAGS to moz.build, this also will not change the > subdirectories' makefile.
Right, `sandbox_vars` is just the equivalent of declaring things directly in moz.build, but for things derived from gyp files. It probably depends on how the gyp files are written, but you can set GYP_DIRS['trunk'].variables['cflags_mozilla'] = '-Os', and that's equivalent to passing -Dcflags_mozilla='-Os' on the gyp command line. However, if the gyp files aren't written to allow variable overrides they'll just ignore it unfortunately. (Variable overrides in gyp are variable declarations with a % at the end, like 'cflags_mozila%': '-foo'.) -Ted
_______________________________________________ dev-builds mailing list dev-builds@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-builds