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