Fix protoc dependency race.

According to Eureka team, using protobuf_lib_type=="target" without a
direct dependency on a protoc target causes flakiness in the build.
This introduces a new variable to represent the protoc host target,
with a default value for platforms like iOS where a prebuilt copy of
protoc is used.

Change-Id: I39c08bd76c6bc4a5291b0e19b2d22a9f3beb04d0
This commit is contained in:
Joey Parrish
2015-04-23 14:49:10 -07:00
committed by Gene Morgan
parent c913e58900
commit 58aba6b2ec
3 changed files with 8 additions and 0 deletions

View File

@@ -104,5 +104,9 @@
'wvcdm_static',
],
},
{
'target_name': 'dummy',
'type': 'none',
}
],
}

View File

@@ -26,6 +26,7 @@
# 2) protobuf_lib_type == 'target'
# Use an existing protobuf gyp target from your project.
# Specify the protobuf gyp file and target in protobuf_lib.
# Specify the protoc gyp file and target in protoc_host_target (optional).
# Specify the path to protoc in protoc_dir.
#
# 3) protobuf_lib_type == 'source'
@@ -35,6 +36,7 @@
'protobuf_lib_type%': 'system',
'protobuf_lib%': '-lprotobuf',
'protoc_dir%': '/usr/bin',
'protoc_host_target%': 'dummy',
}, # end variables
'target_defaults': {

View File

@@ -17,9 +17,11 @@
# protobuf_lib is a gyp target.
'dependencies': [
'<(protobuf_lib)',
'<(protoc_host_target)',
],
'export_dependent_settings': [
'<(protobuf_lib)',
'<(protoc_host_target)',
],
}],
['protobuf_lib_type=="source"', {