diff options
Diffstat (limited to 'chromium/build/config')
-rw-r--r-- | chromium/build/config/win/BUILD.gn | 30 | ||||
-rw-r--r-- | chromium/build/config/win/visual_studio_version.gni | 12 |
2 files changed, 28 insertions, 14 deletions
diff --git a/chromium/build/config/win/BUILD.gn b/chromium/build/config/win/BUILD.gn index 38d95ea0d65..f05e5a28585 100644 --- a/chromium/build/config/win/BUILD.gn +++ b/chromium/build/config/win/BUILD.gn @@ -309,16 +309,26 @@ config("sdk_link") { ldflags = [ "/MACHINE:ARM64" ] } - vcvars_toolchain_data = exec_script("../../toolchain/win/setup_toolchain.py", - [ - visual_studio_path, - windows_sdk_path, - visual_studio_runtime_dirs, - current_os, - current_cpu, - "none", - ], - "scope") + if (ninja_use_custom_environment_files) { + vcvars_toolchain_data = exec_script("../../toolchain/win/setup_toolchain.py", + [ + visual_studio_path, + windows_sdk_path, + visual_studio_runtime_dirs, + current_os, + current_cpu, + "none" + ], + "scope") + } else { + vcvars_toolchain_data = exec_script("../../toolchain/win/setup_toolchain.py", + [ + current_os, + current_cpu, + "none", + ], + "scope") + } vc_lib_path = vcvars_toolchain_data.vc_lib_path if (defined(vcvars_toolchain_data.vc_lib_atlmfc_path)) { diff --git a/chromium/build/config/win/visual_studio_version.gni b/chromium/build/config/win/visual_studio_version.gni index 982fbe8d3f0..3bc58fe4d7a 100644 --- a/chromium/build/config/win/visual_studio_version.gni +++ b/chromium/build/config/win/visual_studio_version.gni @@ -20,9 +20,11 @@ declare_args() { # This value is the default location, override if you have a different # installation location. windows_sdk_path = "C:\Program Files (x86)\Windows Kits\10" + + ninja_use_custom_environment_files = true } -if (visual_studio_path == "") { +if (visual_studio_path == "" && ninja_use_custom_environment_files) { toolchain_data = exec_script("../../vs_toolchain.py", [ "get_toolchain_dir" ], "scope") visual_studio_path = toolchain_data.vs_path @@ -33,7 +35,9 @@ if (visual_studio_path == "") { } else { assert(visual_studio_version != "", "You must set the visual_studio_version if you set the path") - assert(wdk_path != "", - "You must set the wdk_path if you set the visual studio path") - visual_studio_runtime_dirs = [] + if (ninja_use_custom_environment_files) { + assert(wdk_path != "", + "You must set the wdk_path if you set the visual studio path") + } + visual_studio_runtime_dirs = "\"\"" } |