From 5d980c878d40fb6490ec2bdbc6a2fc5791c709ab Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Tue, 27 Aug 2019 19:37:10 -0700 Subject: [PATCH] Disallow __DATE__/__TIME__ on host builds Instead of just making this an error when building for the device, also turn on this error for host builds. This is more important as we begin to use remote caches during the build. Test: treehugger Change-Id: I6fcc945464032d951729aead540ea77850c88c41 --- cc/config/global.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cc/config/global.go b/cc/config/global.go index 2150abf0d..d873494c7 100644 --- a/cc/config/global.go +++ b/cc/config/global.go @@ -46,6 +46,8 @@ var ( "-g", "-fno-strict-aliasing", + + "-Werror=date-time", } commonGlobalConlyflags = []string{} @@ -67,7 +69,6 @@ var ( "-Werror=non-virtual-dtor", "-Werror=address", "-Werror=sequence-point", - "-Werror=date-time", "-Werror=format-security", }