OLD | NEW |
1 # Copyright (c) 2012 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 Google Inc. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import copy | 5 import copy |
6 import ntpath | 6 import ntpath |
7 import os | 7 import os |
8 import posixpath | 8 import posixpath |
9 import re | 9 import re |
10 import subprocess | 10 import subprocess |
(...skipping 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1856 if spec.get('msvs_external_builder'): | 1856 if spec.get('msvs_external_builder'): |
1857 # The spec explicitly defined an external builder, so don't change it. | 1857 # The spec explicitly defined an external builder, so don't change it. |
1858 continue | 1858 continue |
1859 | 1859 |
1860 path_to_ninja = spec.get('msvs_path_to_ninja', 'ninja.exe') | 1860 path_to_ninja = spec.get('msvs_path_to_ninja', 'ninja.exe') |
1861 | 1861 |
1862 spec['msvs_external_builder'] = 'ninja' | 1862 spec['msvs_external_builder'] = 'ninja' |
1863 if not spec.get('msvs_external_builder_out_dir'): | 1863 if not spec.get('msvs_external_builder_out_dir'): |
1864 gyp_file, _, _ = gyp.common.ParseQualifiedTarget(qualified_target) | 1864 gyp_file, _, _ = gyp.common.ParseQualifiedTarget(qualified_target) |
1865 gyp_dir = os.path.dirname(gyp_file) | 1865 gyp_dir = os.path.dirname(gyp_file) |
| 1866 configuration = '$(Configuration)' |
| 1867 if params.get('target_arch') == 'x64': |
| 1868 configuration += '_x64' |
1866 spec['msvs_external_builder_out_dir'] = os.path.join( | 1869 spec['msvs_external_builder_out_dir'] = os.path.join( |
1867 gyp.common.RelativePath(params['options'].toplevel_dir, gyp_dir), | 1870 gyp.common.RelativePath(params['options'].toplevel_dir, gyp_dir), |
1868 ninja_generator.ComputeOutputDir(params), | 1871 ninja_generator.ComputeOutputDir(params), |
1869 '$(Configuration)') | 1872 configuration) |
1870 if not spec.get('msvs_external_builder_build_cmd'): | 1873 if not spec.get('msvs_external_builder_build_cmd'): |
1871 spec['msvs_external_builder_build_cmd'] = [ | 1874 spec['msvs_external_builder_build_cmd'] = [ |
1872 path_to_ninja, | 1875 path_to_ninja, |
1873 '-C', | 1876 '-C', |
1874 '$(OutDir)', | 1877 '$(OutDir)', |
1875 '$(ProjectName)', | 1878 '$(ProjectName)', |
1876 ] | 1879 ] |
1877 if not spec.get('msvs_external_builder_clean_cmd'): | 1880 if not spec.get('msvs_external_builder_clean_cmd'): |
1878 spec['msvs_external_builder_clean_cmd'] = [ | 1881 spec['msvs_external_builder_clean_cmd'] = [ |
1879 path_to_ninja, | 1882 path_to_ninja, |
(...skipping 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3405 action_spec.extend( | 3408 action_spec.extend( |
3406 # TODO(jeanluc) 'Document' for all or just if as_sources? | 3409 # TODO(jeanluc) 'Document' for all or just if as_sources? |
3407 [['FileType', 'Document'], | 3410 [['FileType', 'Document'], |
3408 ['Command', command], | 3411 ['Command', command], |
3409 ['Message', description], | 3412 ['Message', description], |
3410 ['Outputs', outputs] | 3413 ['Outputs', outputs] |
3411 ]) | 3414 ]) |
3412 if additional_inputs: | 3415 if additional_inputs: |
3413 action_spec.append(['AdditionalInputs', additional_inputs]) | 3416 action_spec.append(['AdditionalInputs', additional_inputs]) |
3414 actions_spec.append(action_spec) | 3417 actions_spec.append(action_spec) |
OLD | NEW |