diff options
author | brettw <brettw@chromium.org> | 2015-11-10 13:42:28 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-10 21:43:09 +0000 |
commit | 6bbfd4e271e88644369b01f8b43a88f09adda155 (patch) | |
tree | 522d98fd2eb5439656444a804e2b005904ab5a20 /cloud_print | |
parent | f841024ad8594dfcdffb9a5285920d0ceeff84fc (diff) | |
download | chromium_src-6bbfd4e271e88644369b01f8b43a88f09adda155.zip chromium_src-6bbfd4e271e88644369b01f8b43a88f09adda155.tar.gz chromium_src-6bbfd4e271e88644369b01f8b43a88f09adda155.tar.bz2 |
Clean up Windows GN toolchains.
Properly sets up 64-bit cross compiles when targeting 32-bit CPUs on Windows.
Enables the cloud print portmon library 64-bit cross-compile.
Removes vc_bin_dir build argument. This doesn't play nicely with multiple architectures in a build. If we need this, a more expressive build setting will need to be invented.
Review URL: https://codereview.chromium.org/1428123003
Cr-Commit-Position: refs/heads/master@{#358910}
Diffstat (limited to 'cloud_print')
-rw-r--r-- | cloud_print/BUILD.gn | 3 | ||||
-rw-r--r-- | cloud_print/virtual_driver/win/port_monitor/BUILD.gn | 25 |
2 files changed, 25 insertions, 3 deletions
diff --git a/cloud_print/BUILD.gn b/cloud_print/BUILD.gn index d92c3b2..af1eca8 100644 --- a/cloud_print/BUILD.gn +++ b/cloud_print/BUILD.gn @@ -17,8 +17,7 @@ group("cloud_print") { # When compiling 32-bit, also reference the 64-bit driver for installing on # 64-bit systems. if (target_cpu == "x86" && current_cpu == "x86") { - # TODO(brettw) enable this when Windows cross-compiles are set up. - # public_deps += [ "//cloud_print/virtual_driver/win/port_monitor(//build/toolchain/win:x64)" ] + public_deps += [ "//cloud_print/virtual_driver/win/port_monitor(//build/toolchain/win:x64)" ] } } } diff --git a/cloud_print/virtual_driver/win/port_monitor/BUILD.gn b/cloud_print/virtual_driver/win/port_monitor/BUILD.gn index 4365337..bda788b 100644 --- a/cloud_print/virtual_driver/win/port_monitor/BUILD.gn +++ b/cloud_print/virtual_driver/win/port_monitor/BUILD.gn @@ -14,7 +14,30 @@ if (target_cpu == "x86" && current_cpu == "x64") { arch_suffix = "" } -shared_library("port_monitor") { +# When compiling a 64-bit port monitor from a 32-bit build, copy the DLL to the +# root build directory. When targeting 64-bit CPUs, there is no cross-compiling +# so nothing extra needs to happen. +if (target_cpu == "x86" && current_cpu == "x64") { + copy("port_monitor") { + sources = [ + "$root_out_dir/gcp_portmon64.dll", + ] + outputs = [ + "$root_build_dir/gcp_portmon64.dll", + ] + deps = [ + ":port_monitor_dll", + ] + } +} else { + group("port_monitor") { + public_deps = [ + ":port_monitor_dll", + ] + } +} + +shared_library("port_monitor_dll") { output_name = "gcp_portmon$arch_suffix" sources = [ |