OLD | NEW |
| (Empty) |
1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 Import('env') | |
6 | |
7 env = env.Clone() | |
8 | |
9 if env.Bit('windows'): | |
10 | |
11 # NOTE: env.Replace() instead of inhering the normal *.scons settings! | |
12 env.Replace( | |
13 CPPDEFINES = [ | |
14 ('_WIN32_WINNT', '0x0501'), | |
15 ('WINVER', '0x0501'), | |
16 'WIN32', | |
17 '_UNICODE', | |
18 'UNICODE', | |
19 ], | |
20 CPPPATH = [ | |
21 '$CHROME_SRC_DIR', | |
22 ], | |
23 CCFLAGS = [ | |
24 '/nologo', | |
25 | |
26 '/EHsc', | |
27 | |
28 '/GS-', # VCCLCompilerTool.BufferSecurityCheck="false" | |
29 '/GR-', # VCCLCompilerTool.RuntimeTypeInfo="false" | |
30 '/W3', # treat warnings as errors | |
31 '/Wp64', # VCCLCompilerTool.Detect64BitPortabilityProblems="false" | |
32 | |
33 # In the old Visual Studio build, we used /Zi (edit and continue), | |
34 # VCCLComilerTool.DebugInformationFormat="3". | |
35 # | |
36 # /Zi ends up with multiple compiler invocations trying to updat | |
37 # the same vc80.pdb file at the same time, with race conditions | |
38 # and permission problems. We're using /Z7 because it makes things | |
39 # work even in parallel builds, without special config to avoid | |
40 # multiple simultaneous updates the vc80.pdb file. All the | |
41 # debugging information and capability still end up in the | |
42 # executables. | |
43 '/Z7', # VCCLCompilerTool.DebugInformationFormat="1" | |
44 | |
45 ], | |
46 LINKFLAGS = [ | |
47 '/nologo', | |
48 '/INCREMENTAL:NO', | |
49 '/DEBUG', | |
50 '/MACHINE:X64', | |
51 '/SUBSYSTEM:WINDOWS', | |
52 ], | |
53 ) | |
54 if env['TARGET_DEBUG']: | |
55 env.Append( | |
56 CPPDEFINES = [ | |
57 '_DEBUG', | |
58 ], | |
59 CCFLAGS = [ | |
60 '/Od', | |
61 '/MTd', | |
62 ], | |
63 ) | |
64 else: | |
65 env.Append( | |
66 CPPDEFINES = [ | |
67 'NDEBUG', | |
68 ], | |
69 CCFLAGS = [ | |
70 '/O2', | |
71 '/GL', | |
72 '/FD', | |
73 '/MT', # VCCLLinkerTool.RuntimeLibrary="0" | |
74 ], | |
75 LINKFLAGS = [ | |
76 '/OPT:REF', # VCCLLinkerTool.OptimizeReferences="2" | |
77 '/OPT:ICF', # VCCLLinkerTool.EnableCOMDATFolding="2" | |
78 ], | |
79 ) | |
80 | |
81 input_files = [ | |
82 'service64_resolver.cc', | |
83 'target_code.cc', | |
84 'wow_helper.cc', | |
85 ] | |
86 | |
87 env.ChromeProgram('wow_helper', input_files) | |
OLD | NEW |