Rename FORCE_DETERMINISTIC_BUILD to DONT_EMBED_BUILD_METADATA.

Strictly speaking this flag isn't here to force a deterministic build, it's here to help us to make sure that no build metadata ends up in the build artifacts to help us guarantee a deterministic build.

(See the discussion in https://codereview.chromium.org/324403006/ for more details)

FTR, Nico said he'll take care of getting rid of __DATE__ and __TIME__ so this
new define will not be necessary for that.

On the other hand we may have issues with absolute path in __FILE__ and whatever
unforeseen C++ issue. This would require #ifdef'ing them out. This is not
something devs would want to do normally so this flag is off by default.

Eventually we'll want to fix the build system to not have to hack __FILE__ out
by ensuring they are *always* relative paths but until then, this variable can
be used to make progress


R=maruel@chromium.org, thakis@chromium.org
TBR=brettw@chromium.org

BUG=314403

Review URL: https://codereview.chromium.org/330813003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278053 0039d316-1c4b-4281-b951-d872f2087c98
parent 7b40b232
......@@ -271,11 +271,11 @@
# on compile-only bots).
'fastbuild%': 0,
# Set to 1 to force deterministic builds (this isn't working yet but this
# flag will help us to get there). See http://crbug.com/314403.
# TODO(sebmarchand): Update this comment once this flag guarantee a
# deterministic build.
'force_deterministic_build%': 0,
# Set to 1 to not store any build metadata (this isn't working yet but
# this flag will help us to get there). See http://crbug.com/314403.
# TODO(sebmarchand): Update this comment once this flag guarantee that
# there's no build metadata in the build artifacts.
'dont_embed_build_metadata%': 0,
# Set to 1 to force Visual C++ to use legacy debug information format /Z7.
# This is useful for parallel compilation tools which can't support /Zi.
......@@ -1026,7 +1026,7 @@
'use_xi2_mt%':'<(use_xi2_mt)',
'image_loader_extension%': '<(image_loader_extension)',
'fastbuild%': '<(fastbuild)',
'force_deterministic_build%': '<(force_deterministic_build)',
'dont_embed_build_metadata%': '<(dont_embed_build_metadata)',
'win_z7%': '<(win_z7)',
'dcheck_always_on%': '<(dcheck_always_on)',
'tracing_like_official_build%': '<(tracing_like_official_build)',
......@@ -2579,11 +2579,11 @@
}], # clang!=1
],
}], # fastbuild!=0
['force_deterministic_build==1', {
['dont_embed_build_metadata==1', {
'defines': [
'FORCE_DETERMINISTIC_BUILD',
'DONT_EMBED_BUILD_METADATA',
],
}], # force_deterministic_build==1
}], # dont_embed_build_metadata==1
['dcheck_always_on!=0', {
'defines': ['DCHECK_ALWAYS_ON=1'],
}], # dcheck_always_on!=0
......
......@@ -13,11 +13,11 @@ declare_args() {
# catching bugs but in some cases may cause conflicts or excessive slowness.
disable_iterator_debugging = false
# Set to true to force deterministic builds (this isn't working yet but this
# flag will help us to get there). See http://crbug.com/314403.
# TODO(sebmarchand): Update this comment once this flag guarantee a
# deterministic build.
force_deterministic_build = false
# Set to true to not store any build metadata (this isn't working yet but
# this flag will help us to get there). See http://crbug.com/314403.
# TODO(sebmarchand): Update this comment once this flag guarantee that
# there's no build metadata in the build artifacts.
dont_embed_build_metadata = false
}
# TODO(brettw) Most of these should be removed. Instead of global feature
......@@ -77,8 +77,8 @@ config("feature_flags") {
if (enable_spellcheck) {
defines += [ "ENABLE_SPELLCHECK=1" ]
}
if (force_deterministic_build) {
defines += [ "FORCE_DETERMINISTIC_BUILD" ]
if (dont_embed_build_metadata) {
defines += [ "DONT_EMBED_BUILD_METADATA" ]
}
if (use_udev) {
# TODO(brettw) should probably be "=1".
......
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