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

Side by Side Diff: components/nacl/broker/BUILD.gn

Issue 1650633003: GN: Use special toolchain for nacl64.exe, force is_component_build off (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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 unified diff | Download patch
« no previous file with comments | « build/toolchain/win/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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/config/features.gni") 5 import("//build/config/features.gni")
6 6
7 # This file builds nacl64.exe, which is a 64-bit x86 Windows executable 7 # This file builds nacl64.exe, which is a 64-bit x86 Windows executable
8 # used only in the 32-bit x86 Windows build. The :broker code runs both 8 # used only in the 32-bit x86 Windows build. The :broker code runs both
9 # in nacl64.exe and in the 32-bit chrome executable, to launch 9 # in nacl64.exe and in the 32-bit chrome executable, to launch
10 # nacl64.exe and communicate with it. 10 # nacl64.exe and communicate with it.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 # Tests, packaging rules, etc. will expect to find nacl64.exe in the root 51 # Tests, packaging rules, etc. will expect to find nacl64.exe in the root
52 # of the output directory. It gets built in a non-default toolchain and 52 # of the output directory. It gets built in a non-default toolchain and
53 # so will be delivered in the toolchain output subdirectory. So this 53 # so will be delivered in the toolchain output subdirectory. So this
54 # just copies it to the expected place. Having this target also makes 54 # just copies it to the expected place. Having this target also makes
55 # it simpler for things to depend on nacl64, since they don't have to 55 # it simpler for things to depend on nacl64, since they don't have to
56 # use a toolchain qualifier. 56 # use a toolchain qualifier.
57 copy("nacl64") { 57 copy("nacl64") {
58 # NOTE: This must match what //build/config/BUILDCONFIG.gn uses 58 # NOTE: This must match what //build/config/BUILDCONFIG.gn uses
59 # as default toolchain for the corresponding x64 build. 59 # as default toolchain for the corresponding x64 build.
60 if (is_clang) { 60 if (is_clang) {
61 x64_toolchain = "//build/toolchain/win:clang_x64" 61 x64_toolchain = "//build/toolchain/win:clang_nacl_win64"
62 } else { 62 } else {
63 x64_toolchain = "//build/toolchain/win:x64" 63 x64_toolchain = "//build/toolchain/win:nacl_win64"
64 } 64 }
65 nacl64_label = ":nacl64($x64_toolchain)" 65 nacl64_label = ":nacl64($x64_toolchain)"
66 nacl64_out_dir = get_label_info(nacl64_label, "root_out_dir") 66 nacl64_out_dir = get_label_info(nacl64_label, "root_out_dir")
67 sources = [ 67 sources = [
68 "$nacl64_out_dir/nacl64.exe", 68 "$nacl64_out_dir/nacl64.exe",
69 ] 69 ]
70 outputs = [ 70 outputs = [
71 "$root_out_dir/{{source_file_part}}", 71 "$root_out_dir/{{source_file_part}}",
72 ] 72 ]
73 deps = [ 73 deps = [
74 nacl64_label, 74 nacl64_label,
75 ] 75 ]
76 } 76 }
77 } else if (current_cpu == "x64") { 77 } else if (current_cpu == "x64") {
78 # In the x64 toolchain context, build nacl64.exe for real. 78 # In the x64 toolchain context, build nacl64.exe for real.
79 executable("nacl64") { 79 executable("nacl64") {
80 configs += [ "//build/config/win:windowed" ] 80 configs += [ "//build/config/win:windowed" ]
81 81
82 # //build/config/compiler:optimize{,_max} adds this for official builds 82 # //build/config/compiler:optimize{,_max} adds this for official builds
83 # only, as it only reduces binary size and is not necessary for 83 # only, as it only reduces binary size and is not necessary for
84 # correctness. But for nacl64.exe, it makes more than a six-fold 84 # correctness. But for nacl64.exe, it makes more than a six-fold
85 # difference in the binary size, so always use it. 85 # difference in the binary size, so always use it in release builds.
86 ldflags = [ "/OPT:REF" ] 86 # Note that using this flag disables incremental linking. In debug
87 # builds, incremental rebuild time is usually of more concern than
88 # binary size, so incremental linking is preferable to size reduction.
89 if (!is_debug) {
90 ldflags = [ "/OPT:REF" ]
91 }
87 92
88 sources = [ 93 sources = [
89 "//chrome/nacl/nacl_exe_win_64.cc", 94 "//chrome/nacl/nacl_exe_win_64.cc",
90 ] 95 ]
91 96
92 deps = [ 97 deps = [
93 ":broker", 98 ":broker",
94 ":nacl64_content", 99 ":nacl64_content",
95 ":nacl64_crash_reporter_client", 100 ":nacl64_crash_reporter_client",
96 "//base", 101 "//base",
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 "//chrome/installer/util:with_no_strings", 153 "//chrome/installer/util:with_no_strings",
149 "//components/browser_watcher:browser_watcher_client", 154 "//components/browser_watcher:browser_watcher_client",
150 "//components/flags_ui:switches", 155 "//components/flags_ui:switches",
151 "//components/policy", 156 "//components/policy",
152 "//content/public/common:static_switches", 157 "//content/public/common:static_switches",
153 "//ipc", 158 "//ipc",
154 "//third_party/kasko:kasko_features", 159 "//third_party/kasko:kasko_features",
155 ] 160 ]
156 } 161 }
157 } 162 }
OLDNEW
« no previous file with comments | « build/toolchain/win/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698