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