| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |