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

Issue 2664743002: Make __DATE__, __TIME__ and __TIMESTAMP__ to evaluate to an empty string. (Closed)

Created:
3 years, 10 months ago by Yoshisato Yanagisawa
Modified:
3 years, 10 months ago
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make __DATE__, __TIME__ and __TIMESTAMP__ to evaluate to an empty string. If __DATE__, __TIME__ or __TIMESTAMP__ used in code, current date or time will be filled. Such a value may change compile by compile, and breaks deterministic build. BUG=314403 Review-Url: https://codereview.chromium.org/2664743002 Cr-Commit-Position: refs/heads/master@{#447769} Committed: https://chromium.googlesource.com/chromium/src/+/5eded4b55c92335c96702d53aa319a360c86f556

Patch Set 1 #

Total comments: 2

Patch Set 2 : also define on Windoes. #

Patch Set 3 : suppress warnings on windows #

Patch Set 4 : windows clang use the same rule with posix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -0 lines) Patch
M build/config/compiler/BUILD.gn View 1 2 3 1 chunk +20 lines, -0 lines 0 comments Download

Messages

Total messages: 55 (30 generated)
Yoshisato Yanagisawa
Nico kindly let me know I can now reland the change: https://codereview.chromium.org/2255093004/ Let me try ...
3 years, 10 months ago (2017-01-30 09:08:04 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2664743002/1
3 years, 10 months ago (2017-01-30 17:07:23 UTC) #4
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full ...
3 years, 10 months ago (2017-01-30 17:07:25 UTC) #6
M-A Ruel
lgtm
3 years, 10 months ago (2017-01-30 17:27:21 UTC) #7
Yoshisato Yanagisawa
Dirk, will you take a look? I need owner's lgtm to submit this file.
3 years, 10 months ago (2017-01-31 01:07:33 UTC) #14
Nico
https://codereview.chromium.org/2664743002/diff/1/build/config/compiler/BUILD.gn File build/config/compiler/BUILD.gn (right): https://codereview.chromium.org/2664743002/diff/1/build/config/compiler/BUILD.gn#newcode192 build/config/compiler/BUILD.gn:192: Don't we want this on Windows too?
3 years, 10 months ago (2017-01-31 01:27:56 UTC) #15
Dirk Pranke
I defer to thakis@ here ...
3 years, 10 months ago (2017-01-31 01:38:32 UTC) #16
Yoshisato Yanagisawa
https://codereview.chromium.org/2664743002/diff/1/build/config/compiler/BUILD.gn File build/config/compiler/BUILD.gn (right): https://codereview.chromium.org/2664743002/diff/1/build/config/compiler/BUILD.gn#newcode192 build/config/compiler/BUILD.gn:192: On 2017/01/31 01:27:56, Nico wrote: > Don't we want ...
3 years, 10 months ago (2017-02-01 07:56:50 UTC) #17
Yoshisato Yanagisawa
PTAL
3 years, 10 months ago (2017-02-02 03:02:24 UTC) #28
Nico
LGTM!
3 years, 10 months ago (2017-02-02 03:13:07 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2664743002/60001
3 years, 10 months ago (2017-02-02 07:09:38 UTC) #34
commit-bot: I haz the power
All required reviewers (with asterisk prefixes) have not yet approved this CL. No L-G-T-M from ...
3 years, 10 months ago (2017-02-02 07:09:40 UTC) #36
M-A Ruel
On 2017/02/02 07:09:40, commit-bot: I haz the power wrote: > All required reviewers (with asterisk ...
3 years, 10 months ago (2017-02-02 15:09:45 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2664743002/60001
3 years, 10 months ago (2017-02-02 15:10:01 UTC) #41
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/5eded4b55c92335c96702d53aa319a360c86f556
3 years, 10 months ago (2017-02-02 15:14:55 UTC) #44
kjellander_chromium
This CL breaks our Google internal builds due to redefinition (we import the WebRTC source ...
3 years, 10 months ago (2017-02-07 14:21:04 UTC) #46
Nico
How do you build with the Google toolchain and gn? On Feb 7, 2017 9:21 ...
3 years, 10 months ago (2017-02-07 15:02:58 UTC) #47
kjellander_chromium
On 2017/02/07 15:02:58, Nico wrote: > How do you build with the Google toolchain and ...
3 years, 10 months ago (2017-02-07 15:47:01 UTC) #48
Nico
On Tue, Feb 7, 2017 at 10:47 AM, <kjellander@chromium.org> wrote: > On 2017/02/07 15:02:58, Nico ...
3 years, 10 months ago (2017-02-07 15:50:20 UTC) #49
kjellander_chromium
On 2017/02/07 15:50:20, Nico wrote: > On Tue, Feb 7, 2017 at 10:47 AM, <mailto:kjellander@chromium.org> ...
3 years, 10 months ago (2017-02-07 19:30:59 UTC) #50
Nico
On Tue, Feb 7, 2017 at 2:30 PM, <kjellander@chromium.org> wrote: > On 2017/02/07 15:50:20, Nico ...
3 years, 10 months ago (2017-02-07 19:32:01 UTC) #51
Dirk Pranke
On 2017/02/07 19:32:01, Nico wrote: > On Tue, Feb 7, 2017 at 2:30 PM, <mailto:kjellander@chromium.org> ...
3 years, 10 months ago (2017-02-07 20:21:54 UTC) #52
Dirk Pranke
On 2017/02/07 20:21:54, Dirk Pranke (slow until Feb 7) wrote: > I'm lost here. How ...
3 years, 10 months ago (2017-02-07 20:30:10 UTC) #53
Nico
From my understanding, the internal toolchain sets it to undefined, and defining it to two ...
3 years, 10 months ago (2017-02-07 20:54:29 UTC) #54
kjellander_chromium
3 years, 10 months ago (2017-02-07 20:56:11 UTC) #55
Message was sent while issue was closed.
On 2017/02/07 20:21:54, Dirk Pranke (slow until Feb 7) wrote:
> On 2017/02/07 19:32:01, Nico wrote:
> > On Tue, Feb 7, 2017 at 2:30 PM, <mailto:kjellander@chromium.org> wrote:
> > 
> > > On 2017/02/07 15:50:20, Nico wrote:
> > > > On Tue, Feb 7, 2017 at 10:47 AM, <mailto:kjellander@chromium.org> wrote:
> > > >
> > > > > On 2017/02/07 15:02:58, Nico wrote:
> > > > > > How do you build with the Google toolchain and gn?
> > > > >
> > > > > We have written a tool that generates Bazel BUILD files.
> > > > >
> > > >
> > > > Is there a way to tell the google toolchain to not do global flags
setup,
> > > > since we do that already? gn assumes that it controls the build.
> > > >
> > > > This feels like something you should workaround on your end. I think we
> > > > don't want to make writing Chromium build files more difficult for that
> > > use
> > > > case.
> > >
> > > I agree this should probably be addressed downstream. But the easiest
> > > solution
> > > would be to define these macros to 'redacted'. Then they'd have the same
> > > value
> > > in Chromium and internally, thus not causing any redefinition error
(IIUC).
> > >
> > 
> > If that fixes things for you, then that sounds like something we'd accept.
> > Want to send a patch? :-)
> > 
> 
> I'm lost here. How does setting __DATE__='' cause a problem, and why would
> __DATE__=redacted be better?

The internal build toolchain sets it to __DATE__="redacted" so it would avoid
the redefinition.
But I think it's better we just filter out these defines instead (so no action
needed in Chromium).

Powered by Google App Engine
This is Rietveld 408576698