Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 # HOW TO WRITE CONDITIONALS IN THIS FILE | 5 # HOW TO WRITE CONDITIONALS IN THIS FILE |
| 6 # ====================================== | 6 # ====================================== |
| 7 # | 7 # |
| 8 # In many other places, one would write a conditional that expresses all the | 8 # In many other places, one would write a conditional that expresses all the |
| 9 # cases when a source file is used or unused, and then either add or subtract | 9 # cases when a source file is used or unused, and then either add or subtract |
| 10 # it from the sources list in that case | 10 # it from the sources list in that case |
| 11 # | 11 # |
| 12 # Since base includes so many low-level things that vary widely and | 12 # Since base includes so many low-level things that vary widely and |
| 13 # unpredictably for the various build types, we prefer a slightly different | 13 # unpredictably for the various build types, we prefer a slightly different |
| 14 # style. Instead, there are big per-platform blocks of inclusions and | 14 # style. Instead, there are big per-platform blocks of inclusions and |
| 15 # exclusions. If a given file has an inclusion or exclusion rule that applies | 15 # exclusions. If a given file has an inclusion or exclusion rule that applies |
| 16 # for multiple conditions, perfer to duplicate it in both lists. This makes it | 16 # for multiple conditions, perfer to duplicate it in both lists. This makes it |
| 17 # a bit easier to see which files apply in which cases rather than having a | 17 # a bit easier to see which files apply in which cases rather than having a |
| 18 # huge sequence of random-looking conditionals. | 18 # huge sequence of random-looking conditionals. |
| 19 | 19 |
| 20 import("//build/buildflag_header.gni") | 20 import("//build/buildflag_header.gni") |
| 21 import("//build/config/compiler/compiler.gni") | 21 import("//build/config/compiler/compiler.gni") |
| 22 import("//build/config/nacl/config.gni") | 22 import("//build/config/nacl/config.gni") |
| 23 import("//build/config/ui.gni") | 23 import("//build/config/ui.gni") |
| 24 import("//build/nocompile.gni") | 24 import("//build/nocompile.gni") |
| 25 import("//testing/test.gni") | 25 import("//testing/test.gni") |
| 26 | 26 |
| 27 declare_args() { | |
| 28 # Override this value to give a specific build date. | |
| 29 # See //base/build_time.cc for more details. | |
| 30 override_build_date = "N/A" | |
|
M-A Ruel
2016/01/30 02:58:14
What about:
- By default override_build_date is s
Zachary Forman
2016/02/01 07:28:30
I like this - we could actually use a python scrip
| |
| 31 } | |
| 32 | |
| 27 if (is_android) { | 33 if (is_android) { |
| 28 import("//build/config/android/rules.gni") | 34 import("//build/config/android/rules.gni") |
| 29 } | 35 } |
| 30 | 36 |
| 31 config("base_flags") { | 37 config("base_flags") { |
| 32 if (is_clang) { | 38 if (is_clang) { |
| 33 cflags = [ | 39 cflags = [ |
| 34 # Don't die on dtoa code that uses a char as an array index. | 40 # Don't die on dtoa code that uses a char as an array index. |
| 35 # This is required solely for base/third_party/dmg_fp/dtoa_wrapper.cc. | 41 # This is required solely for base/third_party/dmg_fp/dtoa_wrapper.cc. |
| 36 "-Wno-char-subscripts", | 42 "-Wno-char-subscripts", |
| (...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1310 data += [ "//third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer" ] | 1316 data += [ "//third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer" ] |
| 1311 } | 1317 } |
| 1312 } | 1318 } |
| 1313 | 1319 |
| 1314 configs += [ "//build/config/compiler:wexit_time_destructors" ] | 1320 configs += [ "//build/config/compiler:wexit_time_destructors" ] |
| 1315 if (!is_debug) { | 1321 if (!is_debug) { |
| 1316 configs -= [ "//build/config/compiler:default_optimization" ] | 1322 configs -= [ "//build/config/compiler:default_optimization" ] |
| 1317 configs += [ "//build/config/compiler:optimize_max" ] | 1323 configs += [ "//build/config/compiler:optimize_max" ] |
| 1318 } | 1324 } |
| 1319 | 1325 |
| 1326 if (override_build_date != "N/A") { | |
| 1327 defines += [ "BUILD_TIME=\"" + override_build_date + "\"" ] | |
| 1328 } | |
| 1329 | |
| 1320 allow_circular_includes_from = public_deps | 1330 allow_circular_includes_from = public_deps |
| 1321 } | 1331 } |
| 1322 | 1332 |
| 1323 buildflag_header("debugging_flags") { | 1333 buildflag_header("debugging_flags") { |
| 1324 header = "debugging_flags.h" | 1334 header = "debugging_flags.h" |
| 1325 header_dir = "base/debug" | 1335 header_dir = "base/debug" |
| 1326 flags = [ "ENABLE_PROFILING=$enable_profiling" ] | 1336 flags = [ "ENABLE_PROFILING=$enable_profiling" ] |
| 1327 } | 1337 } |
| 1328 | 1338 |
| 1329 # This is the subset of files from base that should not be used with a dynamic | 1339 # This is the subset of files from base that should not be used with a dynamic |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2140 | 2150 |
| 2141 # GYP: //base.gyp:base_java_unittest_support | 2151 # GYP: //base.gyp:base_java_unittest_support |
| 2142 android_library("base_java_unittest_support") { | 2152 android_library("base_java_unittest_support") { |
| 2143 deps = [ | 2153 deps = [ |
| 2144 ":base_java", | 2154 ":base_java", |
| 2145 ] | 2155 ] |
| 2146 java_files = | 2156 java_files = |
| 2147 [ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ] | 2157 [ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ] |
| 2148 } | 2158 } |
| 2149 } | 2159 } |
| OLD | NEW |