Commit e335101e authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

Remove override_build_date gn arg.

As far as I can tell, this is unused.

Bug: 489490
Change-Id: I729acb5d1f50ad56848e00b3c2b771e1074dba00
Reviewed-on: https://chromium-review.googlesource.com/1160777Reviewed-by: default avatarMarc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580326}
parent 59fa7f80
...@@ -34,11 +34,6 @@ import("//testing/libfuzzer/fuzzer_test.gni") ...@@ -34,11 +34,6 @@ import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni") import("//testing/test.gni")
declare_args() { declare_args() {
# Override this value to give a specific build date.
# See //base/build_time.cc and //build/write_build_date_header.py for more
# details and the expected format.
override_build_date = "N/A"
# Indicates if the Location object contains the source code information # Indicates if the Location object contains the source code information
# (file, function, line). False means only the program counter (and currently # (file, function, line). False means only the program counter (and currently
# file name) is saved. # file name) is saved.
...@@ -2751,10 +2746,6 @@ action("build_date") { ...@@ -2751,10 +2746,6 @@ action("build_date") {
} else { } else {
args += [ "default" ] args += [ "default" ]
} }
if (override_build_date != "N/A") {
args += [ override_build_date ]
}
} }
if (enable_nocompile_tests) { if (enable_nocompile_tests) {
......
...@@ -78,25 +78,17 @@ def main(): ...@@ -78,25 +78,17 @@ def main():
argument_parser.add_argument('output_file', help='The file to write to') argument_parser.add_argument('output_file', help='The file to write to')
argument_parser.add_argument( argument_parser.add_argument(
'build_type', help='The type of build', choices=('official', 'default')) 'build_type', help='The type of build', choices=('official', 'default'))
argument_parser.add_argument(
'build_date_override', nargs='?',
help='Optional override for the build date. Format must be '
'\'Mmm DD YYYY HH:MM:SS\'')
args = argument_parser.parse_args() args = argument_parser.parse_args()
if args.build_date_override: now = datetime.datetime.utcnow()
# Format is expected to be "Mmm DD YYYY HH:MM:SS". if now.hour < 5:
build_date = args.build_date_override # The time is locked at 5:00 am in UTC to cause the build cache
else: # invalidation to not happen exactly at midnight. Use the same calculation
now = datetime.datetime.utcnow() # as the day before.
if now.hour < 5: # See //base/build_time.cc.
# The time is locked at 5:00 am in UTC to cause the build cache now = now - datetime.timedelta(days=1)
# invalidation to not happen exactly at midnight. Use the same calculation now = datetime.datetime(now.year, now.month, now.day, 5, 0, 0)
# as the day before. build_date = GetBuildDate(args.build_type, now)
# See //base/build_time.cc.
now = now - datetime.timedelta(days=1)
now = datetime.datetime(now.year, now.month, now.day, 5, 0, 0)
build_date = GetBuildDate(args.build_type, now)
output = ('// Generated by //build/write_build_date_header.py\n' output = ('// Generated by //build/write_build_date_header.py\n'
'#ifndef BUILD_DATE\n' '#ifndef BUILD_DATE\n'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment