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

Side by Side Diff: base/BUILD.gn

Issue 1641413002: Makes GetBuildTime behave identically on all build types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to comments + fixes gyp build error. 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 | « no previous file | base/base.gyp » ('j') | base/base.gyp » ('J')
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 # 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"
Nico 2016/02/09 22:53:49 is this still needed? doesn't look like it?
Zachary Forman 2016/02/09 23:26:23 I think it's still nice to allow users to override
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 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 960
955 deps = [ 961 deps = [
956 "//base/allocator", 962 "//base/allocator",
957 "//base/third_party/dynamic_annotations", 963 "//base/third_party/dynamic_annotations",
958 "//third_party/modp_b64", 964 "//third_party/modp_b64",
959 ] 965 ]
960 966
961 public_deps = [ 967 public_deps = [
962 ":base_paths", 968 ":base_paths",
963 ":base_static", 969 ":base_static",
970 ":build_date",
964 ":debugging_flags", 971 ":debugging_flags",
965 ] 972 ]
966 973
967 # Allow more direct string conversions on platforms with native utf8 974 # Allow more direct string conversions on platforms with native utf8
968 # strings 975 # strings
969 if (is_mac || is_ios || is_chromeos) { 976 if (is_mac || is_ios || is_chromeos) {
970 defines += [ "SYSTEM_NATIVE_UTF8" ] 977 defines += [ "SYSTEM_NATIVE_UTF8" ]
971 } 978 }
972 979
973 # Android. 980 # Android.
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 # Symbols for crashes when running tests on swarming. 1875 # Symbols for crashes when running tests on swarming.
1869 if (symbol_level > 0) { 1876 if (symbol_level > 0) {
1870 if (is_win) { 1877 if (is_win) {
1871 data += [ "$root_out_dir/base_unittests.exe.pdb" ] 1878 data += [ "$root_out_dir/base_unittests.exe.pdb" ]
1872 } else if (is_mac) { 1879 } else if (is_mac) {
1873 data += [ "$root_out_dir/base_unittests.dSYM/" ] 1880 data += [ "$root_out_dir/base_unittests.dSYM/" ]
1874 } 1881 }
1875 } 1882 }
1876 } 1883 }
1877 1884
1885 action("build_date") {
1886 script = "//build/write_build_date_header.py"
1887
1888 # Force recalculation if there's been a change.
1889 inputs = [
1890 "//build/util/LASTCHANGE",
1891 ]
1892 outputs = [
1893 "$target_gen_dir/generated_build_date.h",
1894 ]
1895
1896 args =
1897 [ rebase_path("$target_gen_dir/generated_build_date.h", root_build_dir) ]
1898
1899 if (is_official_build) {
1900 args += [ "official" ]
1901 } else {
1902 args += [ "default" ]
1903 }
1904
1905 if (override_build_date != "N/A") {
1906 args += [ override_build_date ]
1907 }
1908 }
1909
1878 if (enable_nocompile_tests) { 1910 if (enable_nocompile_tests) {
1879 nocompile_test("base_nocompile_tests") { 1911 nocompile_test("base_nocompile_tests") {
1880 sources = [ 1912 sources = [
1881 "bind_unittest.nc", 1913 "bind_unittest.nc",
1882 "callback_list_unittest.nc", 1914 "callback_list_unittest.nc",
1883 "callback_unittest.nc", 1915 "callback_unittest.nc",
1884 "memory/scoped_ptr_unittest.nc", 1916 "memory/scoped_ptr_unittest.nc",
1885 "memory/weak_ptr_unittest.nc", 1917 "memory/weak_ptr_unittest.nc",
1886 ] 1918 ]
1887 1919
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
2038 2070
2039 # GYP: //base.gyp:base_java_unittest_support 2071 # GYP: //base.gyp:base_java_unittest_support
2040 android_library("base_java_unittest_support") { 2072 android_library("base_java_unittest_support") {
2041 deps = [ 2073 deps = [
2042 ":base_java", 2074 ":base_java",
2043 ] 2075 ]
2044 java_files = 2076 java_files =
2045 [ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ] 2077 [ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ]
2046 } 2078 }
2047 } 2079 }
OLDNEW
« no previous file with comments | « no previous file | base/base.gyp » ('j') | base/base.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698