Revert of Auto-generate v8 version based on tags. (patchset #5 id:80001 of https://codereview.chromium.org/797503007/)
Reason for revert: Blocks roll on android_aosp: https://codereview.chromium.org/851953005/ Original issue's description: > Auto-generate v8 version based on tags. > > BUG=chromium:446166 > LOG=y > > Committed: https://crrev.com/b301b85be895c6fcd1edfe2fd1e60b5abd0ac64d > Cr-Commit-Position: refs/heads/master@{#26062} TBR=jochen@chromium.org,jkummerow@chromium.org,tandrii@chromium.org NOTREECHECKS=true NOTRY=true BUG=chromium:446166 Review URL: https://codereview.chromium.org/850263002 Cr-Commit-Position: refs/heads/master@{#26067}
This commit is contained in:
parent
51f3c66b64
commit
28d99ef77f
22
BUILD.gn
22
BUILD.gn
@ -314,25 +314,6 @@ action("run_mksnapshot") {
|
||||
}
|
||||
}
|
||||
|
||||
action("generate_v8_version") {
|
||||
visibility = [ ":*" ] # Only targets in this file can depend on this.
|
||||
|
||||
script = "tools/push-to-trunk/generate_version.py"
|
||||
|
||||
sources = [
|
||||
"src/version.cc",
|
||||
]
|
||||
|
||||
outputs = [
|
||||
"$target_gen_dir/version.cc"
|
||||
]
|
||||
|
||||
args = [
|
||||
rebase_path("$target_gen_dir/version.cc", root_build_dir),
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Source Sets (aka static libraries)
|
||||
#
|
||||
@ -417,7 +398,6 @@ source_set("v8_base") {
|
||||
visibility = [ ":*" ] # Only targets in this file can depend on this.
|
||||
|
||||
sources = [
|
||||
"$target_gen_dir/version.cc",
|
||||
"src/accessors.cc",
|
||||
"src/accessors.h",
|
||||
"src/allocation.cc",
|
||||
@ -953,6 +933,7 @@ source_set("v8_base") {
|
||||
"src/v8threads.h",
|
||||
"src/variables.cc",
|
||||
"src/variables.h",
|
||||
"src/version.cc",
|
||||
"src/version.h",
|
||||
"src/vm-state-inl.h",
|
||||
"src/vm-state.h",
|
||||
@ -1230,7 +1211,6 @@ source_set("v8_base") {
|
||||
defines = []
|
||||
deps = [
|
||||
":v8_libbase",
|
||||
":generate_v8_version",
|
||||
]
|
||||
|
||||
if (is_win) {
|
||||
|
@ -335,34 +335,6 @@
|
||||
}],
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'v8_version',
|
||||
'type': 'none',
|
||||
'conditions': [
|
||||
['want_separate_host_toolset==1', {
|
||||
'toolsets': ['host'],
|
||||
}, {
|
||||
'toolsets': ['target'],
|
||||
}],
|
||||
],
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'generate_v8_version',
|
||||
'inputs': [
|
||||
'../../tools/push-to-trunk/generate_version.py',
|
||||
'../../src/version.cc',
|
||||
],
|
||||
'outputs': [
|
||||
'<(SHARED_INTERMEDIATE_DIR)/version.cc',
|
||||
],
|
||||
'action': [
|
||||
'python',
|
||||
'../../tools/push-to-trunk/generate_version.py',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/version.cc',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'v8_base',
|
||||
'type': 'static_library',
|
||||
@ -376,7 +348,6 @@
|
||||
'../..',
|
||||
],
|
||||
'sources': [ ### gcmole(all) ###
|
||||
'<(SHARED_INTERMEDIATE_DIR)/version.cc',
|
||||
'../../src/accessors.cc',
|
||||
'../../src/accessors.h',
|
||||
'../../src/allocation.cc',
|
||||
@ -915,6 +886,7 @@
|
||||
'../../src/variables.cc',
|
||||
'../../src/variables.h',
|
||||
'../../src/vector.h',
|
||||
'../../src/version.cc',
|
||||
'../../src/version.h',
|
||||
'../../src/vm-state-inl.h',
|
||||
'../../src/vm-state.h',
|
||||
@ -926,14 +898,8 @@
|
||||
],
|
||||
'conditions': [
|
||||
['want_separate_host_toolset==1', {
|
||||
'dependencies': [
|
||||
'v8_version#host',
|
||||
],
|
||||
'toolsets': ['host', 'target'],
|
||||
}, {
|
||||
'dependencies': [
|
||||
'v8_version',
|
||||
],
|
||||
'toolsets': ['target'],
|
||||
}],
|
||||
['v8_target_arch=="arm"', {
|
||||
|
@ -19,12 +19,6 @@ CWD = os.path.abspath(
|
||||
VERSION_CC = os.path.join(CWD, "src", "version.cc")
|
||||
|
||||
def main():
|
||||
if len(sys.argv) != 2:
|
||||
print "Error: Specify the output file path for version.cc"
|
||||
return 1
|
||||
version_out = sys.argv[1]
|
||||
assert os.path.exists(os.path.dirname(version_out))
|
||||
|
||||
tag = subprocess.check_output(
|
||||
"git describe --tags",
|
||||
shell=True,
|
||||
@ -56,20 +50,21 @@ def main():
|
||||
patch = "0"
|
||||
|
||||
# Modify version.cc with the new values.
|
||||
output = []
|
||||
with open(VERSION_CC, "r") as f:
|
||||
for line in f:
|
||||
for definition, substitute in (
|
||||
("MAJOR_VERSION", major),
|
||||
("MINOR_VERSION", minor),
|
||||
("BUILD_NUMBER", build),
|
||||
("PATCH_LEVEL", patch),
|
||||
("IS_CANDIDATE_VERSION", candidate)):
|
||||
if line.startswith("#define %s" % definition):
|
||||
line = re.sub("\d+$", substitute, line)
|
||||
output.append(line)
|
||||
with open(version_out, "w") as f:
|
||||
f.write("".join(output))
|
||||
text = f.read()
|
||||
output = []
|
||||
for line in text.split("\n"):
|
||||
for definition, substitute in (
|
||||
("MAJOR_VERSION", major),
|
||||
("MINOR_VERSION", minor),
|
||||
("BUILD_NUMBER", build),
|
||||
("PATCH_LEVEL", patch),
|
||||
("IS_CANDIDATE_VERSION", candidate)):
|
||||
if line.startswith("#define %s" % definition):
|
||||
line = re.sub("\d+$", substitute, line)
|
||||
output.append(line)
|
||||
with open(VERSION_CC, "w") as f:
|
||||
f.write("\n".join(output))
|
||||
|
||||
# Log what was done.
|
||||
candidate_txt = " (candidate)" if candidate == "1" else ""
|
||||
|
Loading…
Reference in New Issue
Block a user