What does "gclient runhooks" do?

3,406 views
Skip to first unread message

Peter Taps

unread,
Mar 4, 2015, 1:54:02 PM3/4/15
to discuss...@googlegroups.com
Folks,

I need to staticly link with webrtc in my Android native application for ARM as well as x86. From the documentation, it appears there are broadly three steps to build webrtc code for Android.

$ export GYP_DEFINES="OS=Android..."
$ gclient runhooks
$ ninja -C out/Release AppRTCDemo
My plan is to copy the source code into my Android jni directory and create my own Android makefile. However, I am confused if I should hold the source code into two separate directories - one for ARM and one for x86. It seems the command "gclient runhooks" needs to be run for each architecture. What exactly does this command do? Does it modify the source code? Or, is it generating some configuration file that gets used by Ninja? If so, what is this configuration file?

Thank you in advance for your help.

Regards,
Peter



Henrik Kjellander

unread,
Mar 6, 2015, 3:12:03 AM3/6/15
to discuss...@googlegroups.com
the 'runhooks' command of gclient (which also runs at the end when you issue 'gclient sync') processes the hooks configured in the DEPS file (https://chromium.googlesource.com/external/webrtc/+/master/DEPS). 

Those hooks can be a variety of scripts being executed, but mostly it's downloading of additional resources and generating the projects using GYP (which takes place when it calls the https://chromium.googlesource.com/external/webrtc/+/master/webrtc/build/gyp_webrtc script).

If you're only interested in re-generating your project files, you can skip running 'gclient runhooks' and just run
webrtc/build/gyp_webrtc 
instead. 
You will need to do that every time you have made a change to a .gyp* file (like adding/removing sources etc). By default, it generates projects in out/ but you can override that location using the environment variable GYP_GENERATOR_FLAGS like this:
GYP_GENERATOR_FLAGS="output_dir=out_arm"
See http://www.webrtc.org/native-code/ios for concrete examples for iOS.

Just remember that when you're about to compile those, you have to point ninja to the right out dir.



--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages