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" | |
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 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
950 ] | 956 ] |
951 | 957 |
952 deps = [ | 958 deps = [ |
953 "//base/third_party/dynamic_annotations", | 959 "//base/third_party/dynamic_annotations", |
954 "//third_party/modp_b64", | 960 "//third_party/modp_b64", |
955 ] | 961 ] |
956 | 962 |
957 public_deps = [ | 963 public_deps = [ |
958 ":base_paths", | 964 ":base_paths", |
959 ":base_static", | 965 ":base_static", |
966 ":build_date", | |
960 ":debugging_flags", | 967 ":debugging_flags", |
961 ] | 968 ] |
962 | 969 |
963 # Allow more direct string conversions on platforms with native utf8 | 970 # Allow more direct string conversions on platforms with native utf8 |
964 # strings | 971 # strings |
965 if (is_mac || is_ios || is_chromeos) { | 972 if (is_mac || is_ios || is_chromeos) { |
966 defines += [ "SYSTEM_NATIVE_UTF8" ] | 973 defines += [ "SYSTEM_NATIVE_UTF8" ] |
967 } | 974 } |
968 | 975 |
969 # Android. | 976 # Android. |
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1969 # Symbols for crashes when running tests on swarming. | 1976 # Symbols for crashes when running tests on swarming. |
1970 if (symbol_level > 0) { | 1977 if (symbol_level > 0) { |
1971 if (is_win) { | 1978 if (is_win) { |
1972 data += [ "$root_out_dir/base_unittests.exe.pdb" ] | 1979 data += [ "$root_out_dir/base_unittests.exe.pdb" ] |
1973 } else if (is_mac) { | 1980 } else if (is_mac) { |
1974 data += [ "$root_out_dir/base_unittests.dSYM/" ] | 1981 data += [ "$root_out_dir/base_unittests.dSYM/" ] |
1975 } | 1982 } |
1976 } | 1983 } |
1977 } | 1984 } |
1978 | 1985 |
1986 action("build_date") { | |
1987 script = "//build/write_build_date_header.py" | |
1988 outputs = [ | |
1989 "$target_gen_dir/generated_build_date.h", | |
1990 ] | |
1991 | |
1992 args = | |
1993 [ rebase_path("$target_gen_dir/generated_build_date.h", root_build_dir) ] | |
1994 | |
1995 if (override_build_date != "N/A") { | |
1996 args += [ "--override" ] | |
M-A Ruel
2016/02/01 17:52:28
Does this work?
args += [ "--override", override_b
Zachary Forman
2016/02/02 06:30:38
Yeah, it should. Fixing!
| |
1997 args += [ override_build_date ] | |
1998 } else if (is_official_build) { | |
1999 args += [ "--official" ] | |
2000 } else { | |
2001 args += [ "default" ] | |
2002 } | |
2003 } | |
2004 | |
1979 if (enable_nocompile_tests) { | 2005 if (enable_nocompile_tests) { |
1980 nocompile_test("base_nocompile_tests") { | 2006 nocompile_test("base_nocompile_tests") { |
1981 sources = [ | 2007 sources = [ |
1982 "bind_unittest.nc", | 2008 "bind_unittest.nc", |
1983 "callback_list_unittest.nc", | 2009 "callback_list_unittest.nc", |
1984 "callback_unittest.nc", | 2010 "callback_unittest.nc", |
1985 "memory/scoped_ptr_unittest.nc", | 2011 "memory/scoped_ptr_unittest.nc", |
1986 "memory/weak_ptr_unittest.nc", | 2012 "memory/weak_ptr_unittest.nc", |
1987 ] | 2013 ] |
1988 | 2014 |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2140 | 2166 |
2141 # GYP: //base.gyp:base_java_unittest_support | 2167 # GYP: //base.gyp:base_java_unittest_support |
2142 android_library("base_java_unittest_support") { | 2168 android_library("base_java_unittest_support") { |
2143 deps = [ | 2169 deps = [ |
2144 ":base_java", | 2170 ":base_java", |
2145 ] | 2171 ] |
2146 java_files = | 2172 java_files = |
2147 [ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ] | 2173 [ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ] |
2148 } | 2174 } |
2149 } | 2175 } |
OLD | NEW |