5 ms·
What if I use the __DATE__ macro?
by aaaaaaaaaaab 4y ago
What if I use the __DATE__ macro?
- jvolkman 4y agoYou'll get "redacted" https://github.com/bazelbuild/bazel/blob/34ce6a23f5a2be58bb59661dd5fc9ab586ea1703/tools/cpp/unix_cc_configure.bzl#L628-L631 https://github.com/bazelbuild/bazel/blob/34ce6a23f5a2be58bb5...
- jpollock 4y agoYes, you can go out of your way to make your builds non-deterministic. That should break in Make as well. I don't know enough about bazel to answer your question definitively, but "stamping" is what you want to search for. https://bazel.build/docs/user-manual https://bazel.build/docs/user-manual
- kmarc 4y agoThe better question is, what if you change a comment? It checksums the preprocessed files, so neither `__DATE__`, no comment changes should affect your build times.
- jpollock 4y agoI think __DATE__ without redaction pushes the dependency change 1 level down, to the .o file. The .a/.so/.exe would no longer match the inputs (the .o files), causing a re-link.