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

Unified Diff: tools/gyp/v8.gyp

Issue 506983002: Properly separate host and target builds when using external natives. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Do not invalidate the build by generating the same blobs from multiple targets. Also, make sure v8_… Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gyp/v8.gyp
diff --git a/tools/gyp/v8.gyp b/tools/gyp/v8.gyp
index 3b832852e3b40f2a6f2dbdd2af6f5519d50d2293..5c9ff3b6314b736f34739fb65a9be1fcae30e25f 100644
--- a/tools/gyp/v8.gyp
+++ b/tools/gyp/v8.gyp
@@ -55,11 +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', {
+ ['v8_use_external_startup_data==1 and want_separate_host_toolset==1', {
'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==1', {
- 'dependencies': ['v8_base', 'v8_external_snapshot#host'],
+ ['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)',
@@ -218,11 +230,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 +272,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',
vogelheim 2014/08/29 14:10:55 I'm a bit skeptical here: snapshot.cc and snapshot
rmcilroy 2014/08/29 14:15:47 I think the difference is that snapshot.cc is alre
vogelheim 2014/08/29 14:55:39 Ah, yes, that makes sense. Thanks for the explanat
+ ],
+ }, {
+ 'outputs': [
+ '<(INTERMEDIATE_DIR)/snapshot.cc',
+ '<(PRODUCT_DIR)/snapshot_blob.bin',
+ ],
+ }],
+ ],
+ }, {
+ 'outputs': [
+ '<(INTERMEDIATE_DIR)/snapshot.cc',
+ '<(PRODUCT_DIR)/snapshot_blob.bin',
+ ],
+ }],
],
'variables': {
'mksnapshot_flags': [
@@ -1344,7 +1374,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': [
@@ -1352,14 +1388,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'],
}],
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698