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 target_arch = params.get("target_arch","") | |
scottmg
2015/02/11 00:08:24
nit; ' not ", and space after ","
danduong
2015/02/11 22:46:44
Done.
| |
1867 configuration = '$(Configuration)' | |
1868 if target_arch == 'x64': | |
1869 configuration += '_x64' | |
1866 spec['msvs_external_builder_out_dir'] = os.path.join( | 1870 spec['msvs_external_builder_out_dir'] = os.path.join( |
1867 gyp.common.RelativePath(params['options'].toplevel_dir, gyp_dir), | 1871 gyp.common.RelativePath(params['options'].toplevel_dir, gyp_dir), |
1868 ninja_generator.ComputeOutputDir(params), | 1872 ninja_generator.ComputeOutputDir(params), |
1869 '$(Configuration)') | 1873 configuration) |
1870 if not spec.get('msvs_external_builder_build_cmd'): | 1874 if not spec.get('msvs_external_builder_build_cmd'): |
1871 spec['msvs_external_builder_build_cmd'] = [ | 1875 spec['msvs_external_builder_build_cmd'] = [ |
1872 path_to_ninja, | 1876 path_to_ninja, |
1873 '-C', | 1877 '-C', |
1874 '$(OutDir)', | 1878 '$(OutDir)', |
1875 '$(ProjectName)', | 1879 '$(ProjectName)', |
1876 ] | 1880 ] |
1877 if not spec.get('msvs_external_builder_clean_cmd'): | 1881 if not spec.get('msvs_external_builder_clean_cmd'): |
1878 spec['msvs_external_builder_clean_cmd'] = [ | 1882 spec['msvs_external_builder_clean_cmd'] = [ |
1879 path_to_ninja, | 1883 path_to_ninja, |
(...skipping 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3416 action_spec.extend( | 3420 action_spec.extend( |
3417 # TODO(jeanluc) 'Document' for all or just if as_sources? | 3421 # TODO(jeanluc) 'Document' for all or just if as_sources? |
3418 [['FileType', 'Document'], | 3422 [['FileType', 'Document'], |
3419 ['Command', command], | 3423 ['Command', command], |
3420 ['Message', description], | 3424 ['Message', description], |
3421 ['Outputs', outputs] | 3425 ['Outputs', outputs] |
3422 ]) | 3426 ]) |
3423 if additional_inputs: | 3427 if additional_inputs: |
3424 action_spec.append(['AdditionalInputs', additional_inputs]) | 3428 action_spec.append(['AdditionalInputs', additional_inputs]) |
3425 actions_spec.append(action_spec) | 3429 actions_spec.append(action_spec) |
OLD | NEW |