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:
committed by
Gene Morgan
parent
c913e58900
commit
58aba6b2ec
@@ -104,5 +104,9 @@
|
|||||||
'wvcdm_static',
|
'wvcdm_static',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'target_name': 'dummy',
|
||||||
|
'type': 'none',
|
||||||
|
}
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
# 2) protobuf_lib_type == 'target'
|
# 2) protobuf_lib_type == 'target'
|
||||||
# Use an existing protobuf gyp target from your project.
|
# Use an existing protobuf gyp target from your project.
|
||||||
# Specify the protobuf gyp file and target in protobuf_lib.
|
# 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.
|
# Specify the path to protoc in protoc_dir.
|
||||||
#
|
#
|
||||||
# 3) protobuf_lib_type == 'source'
|
# 3) protobuf_lib_type == 'source'
|
||||||
@@ -35,6 +36,7 @@
|
|||||||
'protobuf_lib_type%': 'system',
|
'protobuf_lib_type%': 'system',
|
||||||
'protobuf_lib%': '-lprotobuf',
|
'protobuf_lib%': '-lprotobuf',
|
||||||
'protoc_dir%': '/usr/bin',
|
'protoc_dir%': '/usr/bin',
|
||||||
|
'protoc_host_target%': 'dummy',
|
||||||
}, # end variables
|
}, # end variables
|
||||||
|
|
||||||
'target_defaults': {
|
'target_defaults': {
|
||||||
|
|||||||
2
third_party/protoc.gypi
vendored
2
third_party/protoc.gypi
vendored
@@ -17,9 +17,11 @@
|
|||||||
# protobuf_lib is a gyp target.
|
# protobuf_lib is a gyp target.
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'<(protobuf_lib)',
|
'<(protobuf_lib)',
|
||||||
|
'<(protoc_host_target)',
|
||||||
],
|
],
|
||||||
'export_dependent_settings': [
|
'export_dependent_settings': [
|
||||||
'<(protobuf_lib)',
|
'<(protobuf_lib)',
|
||||||
|
'<(protoc_host_target)',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
['protobuf_lib_type=="source"', {
|
['protobuf_lib_type=="source"', {
|
||||||
|
|||||||
Reference in New Issue
Block a user