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

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

Issue 217813007: Pass the /safeseh option to ml.exe. (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Rename the assmebly code test file. Created 6 years, 8 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 | « no previous file | pylib/gyp/msvs_emulation.py » ('j') | test/win/gyptest-link-safeseh.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 Google Inc. All rights reserved. 1 # Copyright (c) 2013 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 collections 5 import collections
6 import copy 6 import copy
7 import hashlib 7 import hashlib
8 import json 8 import json
9 import multiprocessing 9 import multiprocessing
10 import os.path 10 import os.path
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 extra_defines = [] 818 extra_defines = []
819 if self.flavor == 'mac': 819 if self.flavor == 'mac':
820 cflags = self.xcode_settings.GetCflags(config_name, arch=arch) 820 cflags = self.xcode_settings.GetCflags(config_name, arch=arch)
821 cflags_c = self.xcode_settings.GetCflagsC(config_name) 821 cflags_c = self.xcode_settings.GetCflagsC(config_name)
822 cflags_cc = self.xcode_settings.GetCflagsCC(config_name) 822 cflags_cc = self.xcode_settings.GetCflagsCC(config_name)
823 cflags_objc = ['$cflags_c'] + \ 823 cflags_objc = ['$cflags_c'] + \
824 self.xcode_settings.GetCflagsObjC(config_name) 824 self.xcode_settings.GetCflagsObjC(config_name)
825 cflags_objcc = ['$cflags_cc'] + \ 825 cflags_objcc = ['$cflags_cc'] + \
826 self.xcode_settings.GetCflagsObjCC(config_name) 826 self.xcode_settings.GetCflagsObjCC(config_name)
827 elif self.flavor == 'win': 827 elif self.flavor == 'win':
828 asmflags = self.msvs_settings.GetAsmflags(config_name)
828 cflags = self.msvs_settings.GetCflags(config_name) 829 cflags = self.msvs_settings.GetCflags(config_name)
829 cflags_c = self.msvs_settings.GetCflagsC(config_name) 830 cflags_c = self.msvs_settings.GetCflagsC(config_name)
830 cflags_cc = self.msvs_settings.GetCflagsCC(config_name) 831 cflags_cc = self.msvs_settings.GetCflagsCC(config_name)
831 extra_defines = self.msvs_settings.GetComputedDefines(config_name) 832 extra_defines = self.msvs_settings.GetComputedDefines(config_name)
832 # See comment at cc_command for why there's two .pdb files. 833 # See comment at cc_command for why there's two .pdb files.
833 pdbpath_c = pdbpath_cc = self.msvs_settings.GetCompilerPdbName( 834 pdbpath_c = pdbpath_cc = self.msvs_settings.GetCompilerPdbName(
834 config_name, self.ExpandSpecial) 835 config_name, self.ExpandSpecial)
835 if not pdbpath_c: 836 if not pdbpath_c:
836 obj = 'obj' 837 obj = 'obj'
837 if self.toolset != 'target': 838 if self.toolset != 'target':
(...skipping 14 matching lines...) Expand all
852 if self.toolset == 'target': 853 if self.toolset == 'target':
853 cflags_c = (os.environ.get('CPPFLAGS', '').split() + 854 cflags_c = (os.environ.get('CPPFLAGS', '').split() +
854 os.environ.get('CFLAGS', '').split() + cflags_c) 855 os.environ.get('CFLAGS', '').split() + cflags_c)
855 cflags_cc = (os.environ.get('CPPFLAGS', '').split() + 856 cflags_cc = (os.environ.get('CPPFLAGS', '').split() +
856 os.environ.get('CXXFLAGS', '').split() + cflags_cc) 857 os.environ.get('CXXFLAGS', '').split() + cflags_cc)
857 858
858 defines = config.get('defines', []) + extra_defines 859 defines = config.get('defines', []) + extra_defines
859 self.WriteVariableList(ninja_file, 'defines', 860 self.WriteVariableList(ninja_file, 'defines',
860 [Define(d, self.flavor) for d in defines]) 861 [Define(d, self.flavor) for d in defines])
861 if self.flavor == 'win': 862 if self.flavor == 'win':
863 self.WriteVariableList(ninja_file, 'asmflags',
864 map(self.ExpandSpecial, asmflags))
862 self.WriteVariableList(ninja_file, 'rcflags', 865 self.WriteVariableList(ninja_file, 'rcflags',
863 [QuoteShellArgument(self.ExpandSpecial(f), self.flavor) 866 [QuoteShellArgument(self.ExpandSpecial(f), self.flavor)
864 for f in self.msvs_settings.GetRcflags(config_name, 867 for f in self.msvs_settings.GetRcflags(config_name,
865 self.GypPathToNinja)]) 868 self.GypPathToNinja)])
866 869
867 include_dirs = config.get('include_dirs', []) 870 include_dirs = config.get('include_dirs', [])
868 871
869 env = self.GetToolchainEnv() 872 env = self.GetToolchainEnv()
870 if self.flavor == 'win': 873 if self.flavor == 'win':
871 include_dirs = self.msvs_settings.AdjustIncludeDirs(include_dirs, 874 include_dirs = self.msvs_settings.AdjustIncludeDirs(include_dirs,
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
1860 '@$out.rsp /c $in /Fo$out /Fd$pdbname_cc ') 1863 '@$out.rsp /c $in /Fo$out /Fd$pdbname_cc ')
1861 master_ninja.rule( 1864 master_ninja.rule(
1862 'cc', 1865 'cc',
1863 description='CC $out', 1866 description='CC $out',
1864 command=cc_command, 1867 command=cc_command,
1865 rspfile='$out.rsp', 1868 rspfile='$out.rsp',
1866 rspfile_content='$defines $includes $cflags $cflags_c', 1869 rspfile_content='$defines $includes $cflags $cflags_c',
1867 deps=deps) 1870 deps=deps)
1868 master_ninja.rule( 1871 master_ninja.rule(
1869 'cxx', 1872 'cxx',
1870 description='CXX $out', 1873 description='CXX $out',
wtc 2014/04/11 03:13:19 Scott: when compiling a C++ file, Ninja displays t
scottmg 2014/04/11 03:31:43 No reason, probably because Evan/Nico wrote the CC
1871 command=cxx_command, 1874 command=cxx_command,
1872 rspfile='$out.rsp', 1875 rspfile='$out.rsp',
1873 rspfile_content='$defines $includes $cflags $cflags_cc', 1876 rspfile_content='$defines $includes $cflags $cflags_cc',
1874 deps=deps) 1877 deps=deps)
1875 master_ninja.rule( 1878 master_ninja.rule(
1876 'idl', 1879 'idl',
1877 description='IDL $in', 1880 description='IDL $in',
1878 command=('%s gyp-win-tool midl-wrapper $arch $outdir ' 1881 command=('%s gyp-win-tool midl-wrapper $arch $outdir '
1879 '$tlb $h $dlldata $iid $proxy $in ' 1882 '$tlb $h $dlldata $iid $proxy $in '
1880 '$idlflags' % sys.executable)) 1883 '$idlflags' % sys.executable))
1881 master_ninja.rule( 1884 master_ninja.rule(
1882 'rc', 1885 'rc',
1883 description='RC $in', 1886 description='RC $in',
1884 # Note: $in must be last otherwise rc.exe complains. 1887 # Note: $in must be last otherwise rc.exe complains.
1885 command=('%s gyp-win-tool rc-wrapper ' 1888 command=('%s gyp-win-tool rc-wrapper '
1886 '$arch $rc $defines $resource_includes $rcflags /fo$out $in' % 1889 '$arch $rc $defines $resource_includes $rcflags /fo$out $in' %
1887 sys.executable)) 1890 sys.executable))
1888 master_ninja.rule( 1891 master_ninja.rule(
1889 'asm', 1892 'asm',
1890 description='ASM $in', 1893 description='ASM $in',
1891 command=('%s gyp-win-tool asm-wrapper ' 1894 command=('%s gyp-win-tool asm-wrapper '
1892 '$arch $asm $defines $includes /c /Fo $out $in' % 1895 '$arch $asm $defines $includes $asmflags /c /Fo $out $in' %
1893 sys.executable)) 1896 sys.executable))
1894 1897
1895 if flavor != 'mac' and flavor != 'win': 1898 if flavor != 'mac' and flavor != 'win':
1896 master_ninja.rule( 1899 master_ninja.rule(
1897 'alink', 1900 'alink',
1898 description='AR $out', 1901 description='AR $out',
1899 command='rm -f $out && $ar rcs $out $in') 1902 command='rm -f $out && $ar rcs $out $in')
1900 master_ninja.rule( 1903 master_ninja.rule(
1901 'alink_thin', 1904 'alink_thin',
1902 description='AR $out', 1905 description='AR $out',
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
2203 arglists.append( 2206 arglists.append(
2204 (target_list, target_dicts, data, params, config_name)) 2207 (target_list, target_dicts, data, params, config_name))
2205 pool.map(CallGenerateOutputForConfig, arglists) 2208 pool.map(CallGenerateOutputForConfig, arglists)
2206 except KeyboardInterrupt, e: 2209 except KeyboardInterrupt, e:
2207 pool.terminate() 2210 pool.terminate()
2208 raise e 2211 raise e
2209 else: 2212 else:
2210 for config_name in config_names: 2213 for config_name in config_names:
2211 GenerateOutputForConfig(target_list, target_dicts, data, params, 2214 GenerateOutputForConfig(target_list, target_dicts, data, params,
2212 config_name) 2215 config_name)
OLDNEW
« no previous file with comments | « no previous file | pylib/gyp/msvs_emulation.py » ('j') | test/win/gyptest-link-safeseh.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698