Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Side by Side Diff: pylib/gyp/generator/msvs.py

Issue 880813004: Make msvs-ninja work for target_arch=x64 (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pylib/gyp/__init__.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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', '')
1867 configuration = '$(Configuration)'
1868 if target_arch == 'x64':
scottmg 2015/02/11 22:58:14 remove the separate "target_arch = ..." line and r
danduong 2015/02/11 23:26:08 Done.
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 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after
3405 action_spec.extend( 3409 action_spec.extend(
3406 # TODO(jeanluc) 'Document' for all or just if as_sources? 3410 # TODO(jeanluc) 'Document' for all or just if as_sources?
3407 [['FileType', 'Document'], 3411 [['FileType', 'Document'],
3408 ['Command', command], 3412 ['Command', command],
3409 ['Message', description], 3413 ['Message', description],
3410 ['Outputs', outputs] 3414 ['Outputs', outputs]
3411 ]) 3415 ])
3412 if additional_inputs: 3416 if additional_inputs:
3413 action_spec.append(['AdditionalInputs', additional_inputs]) 3417 action_spec.append(['AdditionalInputs', additional_inputs])
3414 actions_spec.append(action_spec) 3418 actions_spec.append(action_spec)
OLDNEW
« no previous file with comments | « pylib/gyp/__init__.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698