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

Side by Side Diff: tools/gn/secondary/build/config/win/BUILD.gn

Issue 34603009: Improve Windows GN build setup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « tools/gn/ninja_target_writer.cc ('k') | tools/gn/secondary/build/toolchain/win/BUILD.gn » ('j') | 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) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. 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 declare_args() { 5 declare_args() {
6 # Full path to the Windows SDK, not including a backslash at the end.
6 windows_sdk_path = "C:\Program Files (x86)\Windows Kits\8.0" 7 windows_sdk_path = "C:\Program Files (x86)\Windows Kits\8.0"
8
9 # Full path to the Visual Studio installation, not including a backslash
10 # at the end.
11 visual_studio_path = "C:\Program Files (x86)\Microsoft Visual Studio 10.0"
7 } 12 }
8 13
9 # Compiler setup for the Windows SDK. Applied to all targets. 14 # Compiler setup for the Windows SDK. Applied to all targets.
10 config("sdk") { 15 config("sdk") {
11 # The include path is the stuff returned by the script. 16 # The include path is the stuff returned by the script.
12 #include_dirs = msvc_config[0] TODO(brettw) make this work. 17 #include_dirs = msvc_config[0] TODO(brettw) make this work.
13 18
14 defines = [ 19 defines = [
15 "_ATL_NO_OPENGL", 20 "_ATL_NO_OPENGL",
16 "_SECURE_ATL", 21 "_SECURE_ATL",
17 "_WIN32_WINNT=0x0602", 22 "_WIN32_WINNT=0x0602",
18 "_WINDOWS", 23 "_WINDOWS",
19 "CERT_CHAIN_PARA_HAS_EXTRA_FIELDS", 24 "CERT_CHAIN_PARA_HAS_EXTRA_FIELDS",
20 "NOMINMAX", 25 "NOMINMAX",
21 "NTDDI_VERSION=0x06020000", 26 "NTDDI_VERSION=0x06020000",
22 "PSAPI_VERSION=1", 27 "PSAPI_VERSION=1",
23 "WIN32", 28 "WIN32",
24 "WIN32_LEAN_AND_MEAN", 29 "WIN32_LEAN_AND_MEAN",
25 "WINVER=0x0602", 30 "WINVER=0x0602",
26 ] 31 ]
27 32
33 # The Windows SDK include directories must be first. They both have a sal.h,
34 # and the SDK one is newer and the SDK uses some newer features from it not
35 # present in the Visual Studio one.
28 include_dirs = [ 36 include_dirs = [
29 "$windows_sdk_path\Include\shared", 37 "$windows_sdk_path\Include\shared",
30 "$windows_sdk_path\Include\um", 38 "$windows_sdk_path\Include\um",
31 "$windows_sdk_path\Include\winrt", 39 "$windows_sdk_path\Include\winrt",
40 "$visual_studio_path\VC\include",
41 "$visual_studio_path\VC\atlmfc\include",
32 ] 42 ]
33 } 43 }
34 44
35 # Linker flags for Windows SDK setup, this is applied only to EXEs and DLLs. 45 # Linker flags for Windows SDK setup, this is applied only to EXEs and DLLs.
36 config("sdk_link") { 46 config("sdk_link") {
37 # TODO(brettw) 64-bit. 47 # TODO(brettw) 64-bit.
38 is_64bit = false 48 is_64bit = false
39 49
40 if (is_64bit) { 50 if (is_64bit) {
41 ldflags = [ "/MACHINE:X64" ] 51 ldflags = [ "/MACHINE:X64" ]
42 libs = [ "$windows_sdk_path\Lib\win8\um\x64" ] 52 lib_dirs = [
53 "$windows_sdk_path\Lib\win8\um\x64",
54 "$visual_studio_path\VC\lib\amd64",
55 "$visual_studio_path\VC\atlmfc\lib\amd64",
56 ]
43 } else { 57 } else {
44 ldflags = [ 58 ldflags = [
45 "/MACHINE:X86", 59 "/MACHINE:X86",
46 "/SAFESEH", # Not compatible with x64 so use only for x86. 60 "/SAFESEH", # Not compatible with x64 so use only for x86.
47 ] 61 ]
48 lib_dirs = [ "$windows_sdk_path\Lib\win8\um\x86" ] 62 lib_dirs = [
49 63 "$windows_sdk_path\Lib\win8\um\x86",
64 "$visual_studio_path\VC\lib",
65 "$visual_studio_path\VC\atlmfc\lib",
66 ]
50 #if (!is_asan) { TODO(brettw) Address Sanitizer 67 #if (!is_asan) { TODO(brettw) Address Sanitizer
51 # ldflags += "/largeaddressaware" 68 # ldflags += "/largeaddressaware"
52 #} 69 #}
53 } 70 }
54 } 71 }
55 72
56 # This default linker setup is provided separately from the SDK setup so 73 # This default linker setup is provided separately from the SDK setup so
57 # targets who want different libraries linked can remove this and specify their 74 # targets who want different libraries linked can remove this and specify their
58 # own. 75 # own.
59 config("common_linker_setup") { 76 config("common_linker_setup") {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } 139 }
123 140
124 # Incremental linking ---------------------------------------------------------- 141 # Incremental linking ----------------------------------------------------------
125 142
126 config("incremental_linking") { 143 config("incremental_linking") {
127 ldflags = [ "/INCREMENTAL" ] 144 ldflags = [ "/INCREMENTAL" ]
128 } 145 }
129 config("no_incremental_linking") { 146 config("no_incremental_linking") {
130 ldflags = [ "/INCREMENTAL:NO" ] 147 ldflags = [ "/INCREMENTAL:NO" ]
131 } 148 }
OLDNEW
« no previous file with comments | « tools/gn/ninja_target_writer.cc ('k') | tools/gn/secondary/build/toolchain/win/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698