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

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: 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..8f2cbe0d984296cd954c65356434523e4bf416cd 100644
--- a/build/toolchain/win/BUILD.gn
+++ b/build/toolchain/win/BUILD.gn
@@ -25,6 +25,7 @@ concurrent_links = exec_script("../get_concurrent_links.py", [], "value")
# cpu_arch: cpu_arch to pass as a build arg
# environment: File name of environment file.
# force_win64 (optional): value for this build arg.
+# TODO(dpranke): Get rid of force_win64?
brettw 2014/11/14 20:45:45 You can delete this because you should get rid of
Dirk Pranke 2014/11/14 23:03:22 Done.
template("msvc_toolchain") {
if (defined(invoker.concurrent_links)) {
concurrent_links = invoker.concurrent_links
@@ -32,6 +33,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 = ""
@@ -164,13 +175,19 @@ template("msvc_toolchain") {
}
}
-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.
scottmg 2014/11/13 03:49:59 note that only one of these can be enabled at a ti
Dirk Pranke 2014/11/13 05:49:36 Will do.
Dirk Pranke 2014/11/14 23:03:22 Done.
+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"
+ force_win64 = true
+ }
}

Powered by Google App Engine
This is Rietveld 408576698