From 60e3c9c0903b96882f906387d1fcf9ae78074c75 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Fri, 13 Jun 2014 16:28:05 +0000 Subject: [PATCH] Fix generation of the binary distribution using gyp_chromium (issue #1304). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1746 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- patch/patch.cfg | 3 +++ patch/patches/build.patch | 43 +++++++++++++++++++++++++++------------ tools/make_distrib.py | 11 +++++++--- 3 files changed, 41 insertions(+), 16 deletions(-) diff --git a/patch/patch.cfg b/patch/patch.cfg index b79e39293..36c0594f8 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -17,6 +17,9 @@ patches = [ # # Disable Warning 4702 ("Unreachable code") for Windows VS builds. # https://code.google.com/p/chromium/issues/detail?id=346399#c55 + # + # Allow use of the make gyp generator on Linux. + # https://code.google.com/p/chromiumembedded/issues/detail?id=1304 'name': 'build', 'path': '../build/', }, diff --git a/patch/patches/build.patch b/patch/patches/build.patch index 6dbd0889f..6d4866df7 100644 --- a/patch/patches/build.patch +++ b/patch/patches/build.patch @@ -1,3 +1,33 @@ +Index: mac/strip_save_dsym +=================================================================== +--- mac/strip_save_dsym (revision 275973) ++++ mac/strip_save_dsym (working copy) +@@ -48,7 +48,7 @@ + "bundle"] + macho_types_re = "Mach-O (?:64-bit )?(?:" + "|".join(macho_types) + ")" + +- file_cmd = subprocess.Popen(["/usr/bin/file", "-b", "--", macho], ++ file_cmd = subprocess.Popen(["/usr/bin/file", "-b", "-L", "--", macho], + stdout=subprocess.PIPE) + + archs = [] +Index: gyp_chromium +=================================================================== +--- gyp_chromium (revision 275973) ++++ gyp_chromium (working copy) +@@ -251,12 +251,6 @@ + if sys.platform not in ('darwin',): + args.append('--no-circular-check') + +- # We explicitly don't support the make gyp generator (crbug.com/348686). Be +- # nice and fail here, rather than choking in gyp. +- if re.search(r'(^|,|\s)make($|,|\s)', os.environ.get('GYP_GENERATORS', '')): +- print 'Error: make gyp generator not supported (check GYP_GENERATORS).' +- sys.exit(1) +- + # Default to ninja on linux and windows, but only if no generator has + # explicitly been set. + # Also default to ninja on mac, but only when not building chrome/ios. Index: common.gypi =================================================================== --- common.gypi (revision 275973) @@ -22,16 +52,3 @@ Index: common.gypi ], 'msvs_settings': { 'VCCLCompilerTool': { -Index: mac/strip_save_dsym -=================================================================== ---- mac/strip_save_dsym (revision 275973) -+++ mac/strip_save_dsym (working copy) -@@ -48,7 +48,7 @@ - "bundle"] - macho_types_re = "Mach-O (?:64-bit )?(?:" + "|".join(macho_types) + ")" - -- file_cmd = subprocess.Popen(["/usr/bin/file", "-b", "--", macho], -+ file_cmd = subprocess.Popen(["/usr/bin/file", "-b", "-L", "--", macho], - stdout=subprocess.PIPE) - - archs = [] diff --git a/tools/make_distrib.py b/tools/make_distrib.py index 9379a6479..ce62b4861 100644 --- a/tools/make_distrib.py +++ b/tools/make_distrib.py @@ -185,7 +185,10 @@ def generate_msvs_projects(version): sys.stdout.write('Generating '+version+' project files...') os.environ['GYP_GENERATORS'] = 'msvs' os.environ['GYP_MSVS_VERSION'] = version - gyper = [ 'python', '.../build/gyp_chromium', + # Don't use the bundled toolchain because it will cause the above values to + # be ignored. + os.environ['DEPOT_TOOLS_WIN_TOOLCHAIN'] = '0' + gyper = [ 'python', '../build/gyp_chromium', os.path.relpath(os.path.join(output_dir, 'cefclient.gyp'), cef_dir) ] RunAction(cef_dir, gyper); move_file(os.path.relpath(os.path.join(output_dir, 'cefclient.sln')), \ @@ -220,7 +223,8 @@ def create_xcode_projects(): """ Create Xcode project files. """ sys.stdout.write('Generating Xcode project files...') os.environ['GYP_GENERATORS'] = 'xcode' - gyper = [ 'python', 'tools/gyp_cef', os.path.relpath(os.path.join(output_dir, 'cefclient.gyp'), cef_dir) ] + gyper = [ 'python', '../build/gyp_chromium', + os.path.relpath(os.path.join(output_dir, 'cefclient.gyp'), cef_dir) ] RunAction(cef_dir, gyper); # Post-process the Xcode project file. @@ -253,7 +257,8 @@ def create_make_projects(): # Generate make project files sys.stdout.write('Generating make project files...') os.environ['GYP_GENERATORS'] = 'make' - gyper = [ 'python', 'tools/gyp_cef', os.path.relpath(os.path.join(output_dir, 'cefclient.gyp'), cef_dir) ] + gyper = [ 'python', '../build/gyp_chromium', + os.path.relpath(os.path.join(output_dir, 'cefclient.gyp'), cef_dir) ] RunAction(cef_dir, gyper); # Copy the resulting Makefile to the destination directory