Merge pull request #1318 from smparkes/smparkes/grpc
add java/util support based on java/util/pom.xml
diff --git a/BUILD b/BUILD
index cc699c8..2cb96b2 100644
--- a/BUILD
+++ b/BUILD
@@ -26,6 +26,37 @@
"internal_protobuf_py_tests",
)
+config_setting(
+ name = "ios_armv7",
+ values = {
+ "ios_cpu": "armv7",
+ },
+)
+
+config_setting(
+ name = "ios_armv7s",
+ values = {
+ "ios_cpu": "armv7s",
+ },
+)
+
+config_setting(
+ name = "ios_arm64",
+ values = {
+ "ios_cpu": "arm64",
+ },
+)
+
+IOS_ARM_COPTS = COPTS + [
+ "-DOS_IOS",
+ "-miphoneos-version-min=7.0",
+ "-arch armv7",
+ "-arch armv7s",
+ "-arch arm64",
+ "-D__thread=",
+ "-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk/",
+]
+
cc_library(
name = "protobuf_lite",
srcs = [
@@ -55,7 +86,12 @@
"src/google/protobuf/wire_format_lite.cc",
],
hdrs = glob(["src/google/protobuf/**/*.h"]),
- copts = COPTS,
+ copts = select({
+ ":ios_armv7": IOS_ARM_COPTS,
+ ":ios_armv7s": IOS_ARM_COPTS,
+ ":ios_arm64": IOS_ARM_COPTS,
+ "//conditions:default": COPTS,
+ }),
includes = ["src/"],
linkopts = LINK_OPTS,
visibility = ["//visibility:public"],
@@ -120,7 +156,12 @@
"src/google/protobuf/wrappers.pb.cc",
],
hdrs = glob(["src/**/*.h"]),
- copts = COPTS,
+ copts = select({
+ ":ios_armv7": IOS_ARM_COPTS,
+ ":ios_armv7s": IOS_ARM_COPTS,
+ ":ios_arm64": IOS_ARM_COPTS,
+ "//conditions:default": COPTS,
+ }),
includes = ["src/"],
linkopts = LINK_OPTS,
visibility = ["//visibility:public"],
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc b/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
index 613a511..b912ea6 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
+++ b/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
@@ -969,7 +969,8 @@
} else {
// ...it didn't match!
*out_error = "error: Expected 'option objc_class_prefix = \"" +
- package_match->second + "\";' in '" + file->name() + "'";
+ package_match->second + "\";' for package '" + package +
+ "' in '" + file->name() + "'";
if (prefix.length()) {
*out_error += "; but found '" + prefix + "' instead";
}