| 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 # Should only be running on Windows. | 5 # Should only be running on Windows. |
| 6 assert(is_win) | 6 assert(is_win) |
| 7 | 7 |
| 8 import("//build/config/win/visual_studio_version.gni") |
| 9 |
| 8 # Setup the Visual Studio state. | 10 # Setup the Visual Studio state. |
| 9 # | 11 # |
| 10 # Its argument is the location to write the environment files. | 12 # Its arguments are the VS path and the compiler wrapper tool. It will write |
| 11 # It will write "environment.x86" and "environment.x64" to this directory, | 13 # "environment.x86" and "environment.x64" to the build directory and return a |
| 12 # and return a list to us. | 14 # list to us. |
| 13 # | 15 gyp_win_tool_path = rebase_path("//tools/gyp/pylib/gyp/win_tool.py", ".", |
| 14 # The list contains the include path as its only element. (I'm expecting to | 16 root_build_dir) |
| 15 # add more so it's currently a list inside a list.) | 17 exec_script("setup_toolchain.py", [ visual_studio_path, gyp_win_tool_path ], |
| 16 #exec_script("get_msvc_config.py", | 18 "string") |
| 17 # [relative_root_output_dir], | |
| 18 # "value") | |
| 19 | |
| 20 # This will save the environment block and and copy the gyp-win-tool to the | |
| 21 # build directory. We pass in the source file of the win tool. | |
| 22 gyp_win_tool_source = | |
| 23 rebase_path("//tools/gyp/pylib/gyp/win_tool.py", ".", root_build_dir) | |
| 24 exec_script("setup_toolchain.py", [ gyp_win_tool_source ], "value") | |
| 25 | 19 |
| 26 stamp_command = "$python_path gyp-win-tool stamp \$out" | 20 stamp_command = "$python_path gyp-win-tool stamp \$out" |
| 27 copy_command = "$python_path gyp-win-tool recursive-mirror \$in \$out" | 21 copy_command = "$python_path gyp-win-tool recursive-mirror \$in \$out" |
| 28 | 22 |
| 29 # 32-bit toolchain ------------------------------------------------------------- | 23 # 32-bit toolchain ------------------------------------------------------------- |
| 30 | 24 |
| 31 toolchain("32") { | 25 toolchain("32") { |
| 32 # Make these apply to all tools below. | 26 # Make these apply to all tools below. |
| 33 lib_prefix = "" | 27 lib_prefix = "" |
| 34 lib_dir_prefix="/LIBPATH:" | 28 lib_dir_prefix="/LIBPATH:" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 | 139 |
| 146 # When invoking this toolchain not as the default one, these args will be | 140 # When invoking this toolchain not as the default one, these args will be |
| 147 # passed to the build. They are ignored when this is the default toolchain. | 141 # passed to the build. They are ignored when this is the default toolchain. |
| 148 toolchain_args() { | 142 toolchain_args() { |
| 149 cpu_arch = "x64" | 143 cpu_arch = "x64" |
| 150 # Normally the build config resets the CPU architecture to 32-bits. Setting | 144 # Normally the build config resets the CPU architecture to 32-bits. Setting |
| 151 # this flag overrides that behavior. | 145 # this flag overrides that behavior. |
| 152 force_win64 = true | 146 force_win64 = true |
| 153 } | 147 } |
| 154 } | 148 } |
| OLD | NEW |