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

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: Possible fix for windows 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/build_time.h » ('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"
31
32 # Whether to disable the handle verifier hooks.
33 # Hookless parts of the handle verifier will still function.
M-A Ruel 2016/02/09 13:57:06 What's that?
Dirk Pranke 2016/02/09 19:38:03 I also am assuming this is a weird/bad merge and n
Zachary Forman 2016/02/09 20:57:35 Correct! Will remove.
34 win_disable_handle_verifier_hooks = false
35 }
36
27 if (is_android) { 37 if (is_android) {
28 import("//build/config/android/rules.gni") 38 import("//build/config/android/rules.gni")
29 } 39 }
30 40
31 config("base_flags") { 41 config("base_flags") {
32 if (is_clang) { 42 if (is_clang) {
33 cflags = [ 43 cflags = [
34 # Don't die on dtoa code that uses a char as an array index. 44 # 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. 45 # This is required solely for base/third_party/dmg_fp/dtoa_wrapper.cc.
36 "-Wno-char-subscripts", 46 "-Wno-char-subscripts",
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 964
955 deps = [ 965 deps = [
956 "//base/allocator", 966 "//base/allocator",
957 "//base/third_party/dynamic_annotations", 967 "//base/third_party/dynamic_annotations",
958 "//third_party/modp_b64", 968 "//third_party/modp_b64",
959 ] 969 ]
960 970
961 public_deps = [ 971 public_deps = [
962 ":base_paths", 972 ":base_paths",
963 ":base_static", 973 ":base_static",
974 ":build_date",
964 ":debugging_flags", 975 ":debugging_flags",
965 ] 976 ]
966 977
967 # Allow more direct string conversions on platforms with native utf8 978 # Allow more direct string conversions on platforms with native utf8
968 # strings 979 # strings
969 if (is_mac || is_ios || is_chromeos) { 980 if (is_mac || is_ios || is_chromeos) {
970 defines += [ "SYSTEM_NATIVE_UTF8" ] 981 defines += [ "SYSTEM_NATIVE_UTF8" ]
971 } 982 }
972 983
973 # Android. 984 # Android.
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 # Symbols for crashes when running tests on swarming. 1879 # Symbols for crashes when running tests on swarming.
1869 if (symbol_level > 0) { 1880 if (symbol_level > 0) {
1870 if (is_win) { 1881 if (is_win) {
1871 data += [ "$root_out_dir/base_unittests.exe.pdb" ] 1882 data += [ "$root_out_dir/base_unittests.exe.pdb" ]
1872 } else if (is_mac) { 1883 } else if (is_mac) {
1873 data += [ "$root_out_dir/base_unittests.dSYM/" ] 1884 data += [ "$root_out_dir/base_unittests.dSYM/" ]
1874 } 1885 }
1875 } 1886 }
1876 } 1887 }
1877 1888
1889 action("build_date") {
1890 script = "//build/write_build_date_header.py"
1891
1892 # Force recalculation if there's been a change.
1893 inputs = [
1894 "//build/util/LASTCHANGE",
1895 ]
1896 outputs = [
1897 "$target_gen_dir/generated_build_date.h",
1898 ]
1899
1900 args =
1901 [ rebase_path("$target_gen_dir/generated_build_date.h", root_build_dir) ]
1902
1903 if (is_official_build) {
1904 args += [ "official" ]
1905 } else {
1906 args += [ "default" ]
1907 }
1908
1909 if (override_build_date != "N/A") {
1910 args += [ override_build_date ]
1911 }
1912 }
1913
1878 if (enable_nocompile_tests) { 1914 if (enable_nocompile_tests) {
1879 nocompile_test("base_nocompile_tests") { 1915 nocompile_test("base_nocompile_tests") {
1880 sources = [ 1916 sources = [
1881 "bind_unittest.nc", 1917 "bind_unittest.nc",
1882 "callback_list_unittest.nc", 1918 "callback_list_unittest.nc",
1883 "callback_unittest.nc", 1919 "callback_unittest.nc",
1884 "memory/scoped_ptr_unittest.nc", 1920 "memory/scoped_ptr_unittest.nc",
1885 "memory/weak_ptr_unittest.nc", 1921 "memory/weak_ptr_unittest.nc",
1886 ] 1922 ]
1887 1923
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
2038 2074
2039 # GYP: //base.gyp:base_java_unittest_support 2075 # GYP: //base.gyp:base_java_unittest_support
2040 android_library("base_java_unittest_support") { 2076 android_library("base_java_unittest_support") {
2041 deps = [ 2077 deps = [
2042 ":base_java", 2078 ":base_java",
2043 ] 2079 ]
2044 java_files = 2080 java_files =
2045 [ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ] 2081 [ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ]
2046 } 2082 }
2047 } 2083 }
OLDNEW
« no previous file with comments | « no previous file | base/base.gyp » ('j') | base/build_time.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698