wangyu5 / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

ninja generator should support cross-compilation #213

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The make gyp generator has .target and .host variants for the 
compiler/linker/helper binaries & flags, to support cross-compilation (e.g. 
building ARM binaries in an x64 chroot): 
https://github.com/martine/gyp/blob/ninja/pylib/gyp/generator/make.py#L119

ATM ninja can't be used to cross-compile this way, because it ignores whether 
build targets should be built for "host" or "target" platforms. IWBN if ninja 
did support this mode of work.

Original issue reported on code.google.com by evan@chromium.org on 25 Aug 2011 at 12:03

GoogleCodeExporter commented 9 years ago

Original comment by evan@chromium.org on 20 Sep 2011 at 6:57

GoogleCodeExporter commented 9 years ago
For interested early-adopters:

https://chromiumcodereview.appspot.com/9417030/ implements cross-compilation 
support in ninja; see first comment in review log for details on how I use it.

Note that if specifically building chromium on a platform that requires libvpx, 
this CL is required and although it's landed DEPS hasn't rolled to it yet (hung 
up on unrelated libvpx borkedness): 
https://src.chromium.org/viewvc/chrome?view=rev&revision=122398
Patch locally to play with it.

Original comment by fischman@chromium.org on 21 Feb 2012 at 1:14

GoogleCodeExporter commented 9 years ago
Commit: e6841837c079d34b6f69228cf0386682086188a5
 Email: evan@chromium.org@78cadc50-ecff-11dd-a971-7dbc132099af

Enable cross-compilation with ninja.

Replaced the specialness of _host with _target, b/c the _host
toolchain is usually the vanilla gcc/g++, so it looks better to
leave those variables alone (plus, it mirrors make.py and
GypPathToUniqueOutput).

Added an AR to the family b/c it differs between host & target.

Made generator_supports_multiple_toolsets depend on the presence
of any of the $FOO_target variables as an intermediate hack
around the double-building problem.

BUG=gyp:213

Review URL: https://chromiumcodereview.appspot.com/9417030

git-svn-id: http://gyp.googlecode.com/svn/trunk@1231 
78cadc50-ecff-11dd-a971-7dbc132099af

M   pylib/gyp/generator/ninja.py

Original comment by bugdroid1@chromium.org on 22 Feb 2012 at 11:18

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by evan@chromium.org on 22 Feb 2012 at 11:23

GoogleCodeExporter commented 9 years ago

Original comment by yukawa@chromium.org on 8 Jun 2014 at 4:47