Commit 1e14742e authored by rmcilroy@chromium.org's avatar rmcilroy@chromium.org

Properly separate host and target builds when using external natives.

R=rmcilroy@chromium.org, vogelheim@chromium.org

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

Patch from André Baixo <baixo@google.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23522 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 1047a48c
......@@ -55,12 +55,23 @@
# to appear before libv8_snapshot.a so it's listed explicitly.
'dependencies': ['v8_base', 'v8_nosnapshot'],
}],
['v8_use_external_startup_data==1 and want_separate_host_toolset==0', {
'dependencies': ['v8_base', 'v8_external_snapshot'],
}],
['v8_use_external_startup_data==1 and want_separate_host_toolset==1', {
'dependencies': ['v8_base', 'v8_external_snapshot#host'],
'dependencies': ['v8_base', 'v8_external_snapshot'],
'target_conditions': [
['_toolset=="host"', {
'inputs': [
'<(PRODUCT_DIR)/snapshot_blob_host.bin',
],
}, {
'inputs': [
'<(PRODUCT_DIR)/snapshot_blob.bin',
],
}],
],
}],
['v8_use_external_startup_data==1 and want_separate_host_toolset==0', {
'dependencies': ['v8_base', 'v8_external_snapshot'],
'inputs': [ '<(PRODUCT_DIR)/snapshot_blob.bin', ],
['component=="shared_library"', {
'type': '<(component)',
'sources': [
......@@ -218,11 +229,11 @@
'type': 'static_library',
'conditions': [
['want_separate_host_toolset==1', {
'toolsets': ['host'],
'toolsets': ['host', 'target'],
'dependencies': [
'mksnapshot#host',
'js2c#host',
'natives_blob#host',
'natives_blob',
]}, {
'toolsets': ['target'],
'dependencies': [
......@@ -260,9 +271,27 @@
'inputs': [
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)',
],
'outputs': [
'<(INTERMEDIATE_DIR)/snapshot.cc',
'<(PRODUCT_DIR)/snapshot_blob.bin',
'conditions': [
['want_separate_host_toolset==1', {
'target_conditions': [
['_toolset=="host"', {
'outputs': [
'<(INTERMEDIATE_DIR)/snapshot.cc',
'<(PRODUCT_DIR)/snapshot_blob_host.bin',
],
}, {
'outputs': [
'<(INTERMEDIATE_DIR)/snapshot.cc',
'<(PRODUCT_DIR)/snapshot_blob.bin',
],
}],
],
}, {
'outputs': [
'<(INTERMEDIATE_DIR)/snapshot.cc',
'<(PRODUCT_DIR)/snapshot_blob.bin',
],
}],
],
'variables': {
'mksnapshot_flags': [
......@@ -1398,7 +1427,13 @@
'type': 'none',
'conditions': [
[ 'v8_use_external_startup_data==1', {
'dependencies': ['js2c'],
'conditions': [
['want_separate_host_toolset==1', {
'dependencies': ['js2c#host'],
}, {
'dependencies': ['js2c'],
}],
],
'actions': [{
'action_name': 'concatenate_natives_blob',
'inputs': [
......@@ -1406,14 +1441,38 @@
'<(SHARED_INTERMEDIATE_DIR)/libraries.bin',
'<(SHARED_INTERMEDIATE_DIR)/libraries-experimental.bin',
],
'outputs': [
'<(PRODUCT_DIR)/natives_blob.bin',
'conditions': [
['want_separate_host_toolset==1', {
'target_conditions': [
['_toolset=="host"', {
'outputs': [
'<(PRODUCT_DIR)/natives_blob_host.bin',
],
'action': [
'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob_host.bin'
],
}, {
'outputs': [
'<(PRODUCT_DIR)/natives_blob.bin',
],
'action': [
'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
],
}],
],
}, {
'outputs': [
'<(PRODUCT_DIR)/natives_blob.bin',
],
'action': [
'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
],
}],
],
'action': ['python', '<@(_inputs)', '<@(_outputs)'],
}],
}],
['want_separate_host_toolset==1', {
'toolsets': ['host'],
'toolsets': ['host', 'target'],
}, {
'toolsets': ['target'],
}],
......
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