Just out of interest, what are the flags that you're trying to set?
AGL
To do what you wanted, take a look at the root Makefile, the line
looks like this.
cmd_cc = $(CC.$(TOOLSET)) $(CFLAGS.$(TOOLSET)) $(GYP_CFLAGS)
$(DEPFLAGS) -c -o $@ $<
CFLAGS.$(TOOLSET) comes from the environment CFLAGS, while GYP_CFLAGS
are the ones generated by gyp. So I think you want to swap the order
of those two.
But note that there is more than one line like this, and that this
file is generated, so what you really need to edit is
tools/gyp/pylib/gyp/generator/make.py. Send me the review.
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
>
We're all one family here -- why not adjust the Chrome build files directly?
To do what you wanted, take a look at the root Makefile, the line
looks like this.
cmd_cc = $(CC.$(TOOLSET)) $(CFLAGS.$(TOOLSET)) $(GYP_CFLAGS)
$(DEPFLAGS) -c -o $@ $<
CFLAGS.$(TOOLSET) comes from the environment CFLAGS, while GYP_CFLAGS
are the ones generated by gyp. So I think you want to swap the order
of those two.
But note that there is more than one line like this, and that this
file is generated, so what you really need to edit is
tools/gyp/pylib/gyp/generator/make.py. Send me the review.
Chromium, however, uses gypi files to generate the flags and appends
those at the end of the command line so my custom flags get
overridden.
The way I do this is with release_extra_cflags=-foo passed by
EXTRA_BUILD_ARGS in the chromeos-chrome ebuild.
For just the optimize level special there is a gyp setting
release_optimize=3.
-- trevor
On Thu, 16 Dec 2010 15:00:53 -0800, ash...@chromium.org
<ash...@chromium.org> wrote:
>
> For other ChromiumOS packages, if I export those variables (CLFAGS,
> CXXFLAGS and LDFLAGS) before doing the emerge-$BOARD, it does the
> trick and the package is compiled with those flags.
>
> Chromium, however, uses gypi files to generate the flags and appends
> those at the end of the command line so my custom flags get
> overridden.
>
> The final command line for compiling .cc files looks like:
>
> g++ <my flags here> <gypi generated flags> file.cc
>
> An example would be this:
>
> g++ -O1 -O3 file.cc
>
> In this case, the O3 overrides the O1.
>
> Can I export certain variables for the chromium ebuild or otherwise so
> that the gypi flags get pre-pended to the command line instead of
> being appended? That way I can override the gypi command line flags
> for my experiments.
>
> Thanks,
>
--
Using Opera's revolutionary email client: http://www.opera.com/mail/