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

Side by Side Diff: build/config/BUILDCONFIG.gn

Issue 83733005: Add support for 32-bit and 64-bit Windows compiles in GN. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | build/config/compiler/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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 # ============================================================================= 5 # =============================================================================
6 # BUILD FLAGS 6 # BUILD FLAGS
7 # ============================================================================= 7 # =============================================================================
8 # 8 #
9 # This block lists input arguments to the build, along with their default 9 # This block lists input arguments to the build, along with their default
10 # values. GN requires listing them explicitly so it can validate input and have 10 # values. GN requires listing them explicitly so it can validate input and have
(...skipping 25 matching lines...) Expand all
36 # ASH is enabled. 36 # ASH is enabled.
37 # TODO(brettw) this should be moved out of the main build config file. 37 # TODO(brettw) this should be moved out of the main build config file.
38 use_ash = false 38 use_ash = false
39 # Aura is enabled. 39 # Aura is enabled.
40 # TODO(brettw) this should be moved out of the main build config file. 40 # TODO(brettw) this should be moved out of the main build config file.
41 use_aura = false 41 use_aura = false
42 # Ozone is enabled. 42 # Ozone is enabled.
43 # TODO(brettw) this should be moved out of the main build config file. 43 # TODO(brettw) this should be moved out of the main build config file.
44 use_ozone = false 44 use_ozone = false
45 45
46 # Forces a 64-bit build on Windows. Does nothing on other platforms. Normally
47 # we build 32-bit on Windows regardless of the current host OS bit depth.
48 # Setting this flag will override this logic and generate 64-bit toolchains.
49 #
50 # Normally this would get set automatically when you specify a target using
51 # the 64-bit toolchain. You can also set this on the command line to convert
52 # the default toolchain to 64-bit.
53 force_win64 = false
54
46 # Set to true on the command line when invoked by GYP. Build files can key 55 # Set to true on the command line when invoked by GYP. Build files can key
47 # off of this to make any GYP-output-specific changes to the build. 56 # off of this to make any GYP-output-specific changes to the build.
48 is_gyp = false 57 is_gyp = false
49 } 58 }
50 59
51 # ============================================================================= 60 # =============================================================================
52 # OS DEFINITIONS 61 # OS DEFINITIONS
53 # ============================================================================= 62 # =============================================================================
54 # 63 #
55 # We set these various is_FOO booleans for convenience in writing OS-based 64 # We set these various is_FOO booleans for convenience in writing OS-based
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 is_nacl = false 140 is_nacl = false
132 is_posix = true 141 is_posix = true
133 is_win = false 142 is_win = false
134 } 143 }
135 144
136 # ============================================================================= 145 # =============================================================================
137 # CPU ARCHITECTURE 146 # CPU ARCHITECTURE
138 # ============================================================================= 147 # =============================================================================
139 148
140 if (is_win) { 149 if (is_win) {
141 # Always use 32-bit on Windows, even when compiling on a 64-bit host OS. 150 # Always use 32-bit on Windows, even when compiling on a 64-bit host OS,
142 # TODO(brettw) when we support 64-bit cross-compiles, we probably need to 151 # unless the override flag is specified.
143 # set a build arg in the toolchain to disable this override. 152 if (force_win64) {
144 cpu_arch = "ia32" 153 cpu_arch = "x64"
154 } else {
155 cpu_arch = "x86"
156 }
145 } 157 }
146 158
147 # ============================================================================= 159 # =============================================================================
148 # SOURCES FILTERS 160 # SOURCES FILTERS
149 # ============================================================================= 161 # =============================================================================
150 # 162 #
151 # These patterns filter out platform-specific files when assigning to the 163 # These patterns filter out platform-specific files when assigning to the
152 # sources variable. The magic variable |sources_assignment_filter| is applied 164 # sources variable. The magic variable |sources_assignment_filter| is applied
153 # to each assignment or appending to the sources variable and matches are 165 # to each assignment or appending to the sources variable and matches are
154 # automatcally removed. 166 # automatcally removed.
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 # ============================================================================== 376 # ==============================================================================
365 # TOOLCHAIN SETUP 377 # TOOLCHAIN SETUP
366 # ============================================================================== 378 # ==============================================================================
367 # 379 #
368 # Here we set the default toolchain, as well as the variable host_toolchain 380 # Here we set the default toolchain, as well as the variable host_toolchain
369 # which will identify the toolchain corresponding to the local system when 381 # which will identify the toolchain corresponding to the local system when
370 # doing cross-compiles. When not cross-compiling, this will be the same as the 382 # doing cross-compiles. When not cross-compiling, this will be the same as the
371 # default toolchain. 383 # default toolchain.
372 384
373 if (is_win) { 385 if (is_win) {
374 host_toolchain = "//build/toolchain/win:32" 386 if (cpu_arch == "x64") {
387 host_toolchain = "//build/toolchain/win:64"
388 } else if (cpu_arch == "x86") {
389 host_toolchain = "//build/toolchain/win:32"
390 }
375 set_default_toolchain(host_toolchain) 391 set_default_toolchain(host_toolchain)
376 } else if (is_linux) { 392 } else if (is_linux) {
377 host_toolchain = "//build/toolchain/linux:host" 393 host_toolchain = "//build/toolchain/linux:host"
378 if (cpu_arch == "arm" && build_cpu_arch != "arm") { 394 if (cpu_arch == "arm" && build_cpu_arch != "arm") {
379 # Special toolchain for ARM cross-compiling. 395 # Special toolchain for ARM cross-compiling.
380 set_default_toolchain("//build/toolchain/linux:arm-cross-compile") 396 set_default_toolchain("//build/toolchain/linux:arm-cross-compile")
381 } else { 397 } else {
382 # Use whatever GCC is on the current platform. 398 # Use whatever GCC is on the current platform.
383 set_default_toolchain(host_toolchain) 399 set_default_toolchain(host_toolchain)
384 } 400 }
385 } else if (is_mac) { 401 } else if (is_mac) {
386 host_toolchain = "//build/toolchain/mac:clang" 402 host_toolchain = "//build/toolchain/mac:clang"
387 set_default_toolchain(host_toolchain) 403 set_default_toolchain(host_toolchain)
388 } 404 }
OLDNEW
« no previous file with comments | « no previous file | build/config/compiler/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698