| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """A tool to build chrome, executed by buildbot. | 6 """A tool to build chrome, executed by buildbot. |
| 7 | 7 |
| 8 When this is run, the current directory (cwd) should be the outer build | 8 When this is run, the current directory (cwd) should be the outer build |
| 9 directory (e.g., chrome-release/build/). | 9 directory (e.g., chrome-release/build/). |
| 10 | 10 |
| (...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 if not goma_ready: | 872 if not goma_ready: |
| 873 assert options.compiler not in ('goma', 'goma-clang') | 873 assert options.compiler not in ('goma', 'goma-clang') |
| 874 assert options.goma_dir is None | 874 assert options.goma_dir is None |
| 875 | 875 |
| 876 # ninja is different from all the other build systems in that it requires | 876 # ninja is different from all the other build systems in that it requires |
| 877 # most configuration to be done at gyp time. This is why this function does | 877 # most configuration to be done at gyp time. This is why this function does |
| 878 # less than the other comparable functions in this file. | 878 # less than the other comparable functions in this file. |
| 879 print 'chdir to %s' % options.src_dir | 879 print 'chdir to %s' % options.src_dir |
| 880 os.chdir(options.src_dir) | 880 os.chdir(options.src_dir) |
| 881 | 881 |
| 882 command = [options.ninja_path, '-C', options.target_output_dir] | 882 command = [options.ninja_path, '-w', 'dupbuild=err', |
| 883 '-C', options.target_output_dir] |
| 883 | 884 |
| 884 # HACK(yyanagisawa): update environment files on |env| update. | 885 # HACK(yyanagisawa): update environment files on |env| update. |
| 885 # For compiling on Windows, environment in environment files are used. | 886 # For compiling on Windows, environment in environment files are used. |
| 886 # It means even if enviroment such as GOMA_DISABLED is updated in | 887 # It means even if enviroment such as GOMA_DISABLED is updated in |
| 887 # compile.py, the update will be ignored. | 888 # compile.py, the update will be ignored. |
| 888 # We need to update environment files to reflect the update. | 889 # We need to update environment files to reflect the update. |
| 889 if chromium_utils.IsWindows() and NeedEnvFileUpdateOnWin(env): | 890 if chromium_utils.IsWindows() and NeedEnvFileUpdateOnWin(env): |
| 890 print 'Updating environment.{x86,x64} files.' | 891 print 'Updating environment.{x86,x64} files.' |
| 891 UpdateWindowsEnvironment(options.target_output_dir, env) | 892 UpdateWindowsEnvironment(options.target_output_dir, env) |
| 892 | 893 |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1354 sys.stderr.write('Unknown build tool %s.\n' % repr(options.build_tool)) | 1355 sys.stderr.write('Unknown build tool %s.\n' % repr(options.build_tool)) |
| 1355 return 2 | 1356 return 2 |
| 1356 | 1357 |
| 1357 options.target_output_dir = get_target_build_dir(args, options) | 1358 options.target_output_dir = get_target_build_dir(args, options) |
| 1358 | 1359 |
| 1359 return main(options, args) | 1360 return main(options, args) |
| 1360 | 1361 |
| 1361 | 1362 |
| 1362 if '__main__' == __name__: | 1363 if '__main__' == __name__: |
| 1363 sys.exit(real_main()) | 1364 sys.exit(real_main()) |
| OLD | NEW |