Android/Linux developement

41 views
Skip to first unread message

Justin

unread,
Nov 4, 2012, 3:03:12 PM11/4/12
to chromi...@chromium.org
So I need to do a bit of research based around the content shell on both Linux and Android (hence my earlier newbie questions)

1.What's the best way to setup a local branch for one or more developers?

The changes will mostly be additive, and due to their experimental nature, it's unclear whether there will be value committing them to main tree. I'm comfortable cloning the main git repo to a local shared one, and manually updating to LKGR every few days, but I'm not sure how the gclient sync and third party extras would affect this. Another option would be to set up an project externally, that references the chromium source, but I'd like to re-use as much of the existing build infrastructure as possible.

2. What are the steps to safely "switch" between Linux and Android builds in the same workspace?

After modifying the "target_os" in the .gclient, I was not sure what other gclient/gyp/envsetup/make steps needed to take place, so I did them all - and used a new "out" folder for each OS build. Any pointers to do this more efficiently would be appreciated.

Thanks,
Justin.

Mikhail Naganov

unread,
Nov 4, 2012, 3:57:16 PM11/4/12
to jay...@gmail.com, chromi...@chromium.org
On Sun, Nov 4, 2012 at 8:03 PM, Justin <jay...@gmail.com> wrote:
> So I need to do a bit of research based around the content shell on both
> Linux and Android (hence my earlier newbie questions)
>
> 1.What's the best way to setup a local branch for one or more developers?
> The changes will mostly be additive, and due to their experimental nature,
> it's unclear whether there will be value committing them to main tree. I'm
> comfortable cloning the main git repo to a local shared one, and manually
> updating to LKGR every few days, but I'm not sure how the gclient sync and
> third party extras would affect this. Another option would be to set up an
> project externally, that references the chromium source, but I'd like to
> re-use as much of the existing build infrastructure as possible.
>

If you change only the chromium source, gclient should work fine with
your branch(es). If you want to make changes to third_party projects,
but don't plan to commit them (e.g. just adding logging), then you can
create branches in these projects and just checkout 'master' before
doing 'gclient sync' (and rebasing your branch afterwards).

If you also plan to commit changes to WebKit, it's a bit more
involved. Read this and this on how to set up a read-write WebKit
repository with Chromium:

http://code.google.com/p/chromium/wiki/UsingWebKitGit
http://dev.chromium.org/developers/contributing-to-webkit
http://trac.webkit.org/wiki/UsingGitWithWebKit

> 2. What are the steps to safely "switch" between Linux and Android builds in
> the same workspace?
> After modifying the "target_os" in the .gclient, I was not sure what other
> gclient/gyp/envsetup/make steps needed to take place, so I did them all -
> and used a new "out" folder for each OS build. Any pointers to do this more
> efficiently would be appreciated.
>

You definitely need to use separate shell instances and dedicated
'out' directories. Also you need to re-generate make / ninja files
when switching between builds and re-building. For chromium,
regeneration is done by running 'build/gyp_chromium', for android, you
need to run 'android_gyp'. Modifying '.gclient' will be needed before
running gclient.

> Thanks,
> Justin.
>
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev

Nico Weber

unread,
Nov 5, 2012, 12:16:31 AM11/5/12
to mnag...@chromium.org, jay...@gmail.com, chromi...@chromium.org
(You can use the "-Goutput_dir=out_linux" flag to create an outdir
that's not "out", at least if you use ninja.)

Justin

unread,
Nov 7, 2012, 2:23:14 PM11/7/12
to chromi...@chromium.org, mnag...@chromium.org, jay...@gmail.com
Thank you, that's pretty handy, and I just set up Ninja builds for Linux thanks to the great instructions.
Reply all
Reply to author
Forward
0 new messages