aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortemporal <temporal@630680e5-0e50-0410-840e-4b1c322b438d>2009-08-17 09:42:47 +0000
committertemporal <temporal@630680e5-0e50-0410-840e-4b1c322b438d>2009-08-17 09:42:47 +0000
commitad5672bad71821354380959eaf80ea487b9007f2 (patch)
treeb1b3f9d561174cd9c080b9f77d5e967ebd02d0f5
parent0bcfeb9dcd0885e37cda8b209209c18c9822a481 (diff)
downloadprotobuf-ad5672bad71821354380959eaf80ea487b9007f2.tar.gz
protobuf-ad5672bad71821354380959eaf80ea487b9007f2.tar.bz2
protobuf-ad5672bad71821354380959eaf80ea487b9007f2.zip
Update experimental SEBS file to support cross-compiling.
-rw-r--r--src/google/protobuf/SEBS6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/google/protobuf/SEBS b/src/google/protobuf/SEBS
index b4408dc7..ba33c732 100644
--- a/src/google/protobuf/SEBS
+++ b/src/google/protobuf/SEBS
@@ -134,8 +134,11 @@ class ProtobufLibrary(sebs.Rule):
protoc.expand_once()
+ # We must build protoc for the host configuration to allow cross-compiling.
+ host_protoc = self.context.configured_artifact(protoc.binary, "host")
+
protoc_action = self.context.action(self, "protobuf")
- protoc_args = [protoc.binary, "-Isrc", "-Itmp", "-Iinclude","--cpp_out=tmp"]
+ protoc_args = [host_protoc, "-Isrc", "-Itmp", "-Iinclude","--cpp_out=tmp"]
cpp_srcs = []
for src in args.srcs:
@@ -166,6 +169,7 @@ class ProtobufLibrary(sebs.Rule):
self.__cpp_library = _cpp.Library(srcs = cpp_srcs, deps = deps,
context = self.context)
+ self.__cpp_library.label = self.label
self.outputs = []
def as_cpp_library(self):