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

Unified Diff: build/toolchain/win/BUILD.gn

Issue 722723004: Rework win_toolchains a bit and copy the vs runtime DLLs as needed. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase onto #304284 Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: build/toolchain/win/BUILD.gn
diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn
index a9fab7c4c03c422f9384ea48ce19404879015be6..988683da879abfa15c5372e8d73f0a3dff81c956 100644
--- a/build/toolchain/win/BUILD.gn
+++ b/build/toolchain/win/BUILD.gn
@@ -24,7 +24,6 @@ concurrent_links = exec_script("../get_concurrent_links.py", [], "value")
# Parameters:
# cpu_arch: cpu_arch to pass as a build arg
# environment: File name of environment file.
-# force_win64 (optional): value for this build arg.
template("msvc_toolchain") {
if (defined(invoker.concurrent_links)) {
concurrent_links = invoker.concurrent_links
@@ -32,6 +31,16 @@ template("msvc_toolchain") {
env = invoker.environment
+ if (is_debug) {
+ configuration = "Debug"
+ } else {
+ configuration = "Release"
+ }
+ exec_script("../../vs_toolchain.py", ["copy_dlls",
+ rebase_path(root_build_dir),
+ configuration,
+ invoker.cpu_arch])
+
toolchain(target_name) {
# Make these apply to all tools below.
lib_switch = ""
@@ -154,23 +163,24 @@ template("msvc_toolchain") {
# passed to the build. They are ignored when this is the default toolchain.
toolchain_args() {
cpu_arch = invoker.cpu_arch
-
- # Normally the build config resets the CPU architecture to 32-bits. Setting
- # this flag overrides that behavior.
- if (defined(invoker.force_win64)) {
- force_win64 = invoker.force_win64
- }
}
}
}
-msvc_toolchain("32") {
- environment = "environment.x86"
- cpu_arch = "x64"
+# TODO(dpranke): Declare both toolchains all of the time when we
+# get it sorted out how we want to support them both in a single build.
+# Right now only one of these can be enabled at a time because the
+# runtime libraries get copied to root_build_dir and would collide.
+if (cpu_arch == "x86") {
+ msvc_toolchain("32") {
+ environment = "environment.x86"
+ cpu_arch = "x86"
+ }
}
-msvc_toolchain("64") {
- environment = "environment.x64"
- cpu_arch = "x64"
- force_win64 = true
+if (cpu_arch == "x64") {
+ msvc_toolchain("64") {
+ environment = "environment.x64"
+ cpu_arch = "x64"
+ }
}
« no previous file with comments | « build/config/BUILDCONFIG.gn ('k') | build/vs_toolchain.py » ('j') | build/vs_toolchain.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698