Bug 907473 - Handle generator_flags gracefully in gyp. r=gps, a=bajaj
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 21 Aug 2013 09:37:45 +0900
changeset 148405 558ce0ef3f08c0747d33f6454ce213f368fd52fe
parent 148404 932735322bd0e5d6450890e41d7fb99cea2c310c
child 148406 ecb5878a171739a7ee6011e2f8baa68044195a14
push id2788
push userryanvm@gmail.com
push dateWed, 21 Aug 2013 18:40:12 +0000
treeherdermozilla-beta@ecb5878a1717 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps, bajaj
bugs907473
milestone24.0
Bug 907473 - Handle generator_flags gracefully in gyp. r=gps, a=bajaj
media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py
--- a/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py
+++ b/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py
@@ -451,17 +451,17 @@ def GenerateOutput(target_list, target_d
       forced_includes += "--include=%s" % option[20:]
 
   commandline = [topsrcdir_path(sys.argv[0]),
                  "--format=mozmake",
                  forced_includes,
                  "--depth=%s" % topsrcdir_path(options.depth),
                  "--generator-output=%s" % objdir_path(options.generator_output),
                  "--toplevel-dir=$(topsrcdir)",
-                 #XXX: handle other generator_flags gracefully?
                  "-G OBJDIR=$(DEPTH)"] + \
+                 ['-G %s' % g for g in options.generator_flags if not g.startswith('OBJDIR=')] + \
                  ['-D%s' % d for d in options.defines] + \
                  [topsrcdir_path(b) for b in params['build_files']]
 
   WriteCommonMk(os.path.join(output_dir, "common.mk"),
                 build_files,
                 scriptname,
                 commandline)