diff options
author | thinkerou <thinkerou@gmail.com> | 2016-05-11 10:24:26 +0800 |
---|---|---|
committer | thinkerou <thinkerou@gmail.com> | 2016-05-11 10:24:26 +0800 |
commit | c4727db4582e8c9bdd1c822fa1d571f19e2f929e (patch) | |
tree | 27ece5b2d5b59add7756687c478f1ba6dee31642 /templates | |
parent | f7b01874fde5b276500f69dcd83ca713cde2e10b (diff) | |
parent | 8b382748fd9ce6f5d898e1acf15c97851c4fbd8b (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'templates')
-rw-r--r-- | templates/Makefile.template | 34 | ||||
-rw-r--r-- | templates/gRPC.podspec.template | 7 | ||||
-rw-r--r-- | templates/src/node/tools/package.json.template | 4 |
3 files changed, 28 insertions, 17 deletions
diff --git a/templates/Makefile.template b/templates/Makefile.template index e84ceebf22..0d5f0ec5b5 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -49,6 +49,19 @@ sources_that_need_openssl = set() sources_that_don_t_need_openssl = set() + + # warnings we'd like, but that dont exist in all compilers + PREFERRED_WARNINGS=['shadow', 'extra-semi'] + CHECK_WARNINGS=PREFERRED_WARNINGS + ['no-shift-negative-value'] + + def warning_var(fmt, warning): + return fmt % warning.replace('-', '_').upper() + + def neg_warning(warning): + if warning[0:3] == 'no-': + return warning[3:] + else: + return 'no-' + warning %> @@ -187,17 +200,14 @@ CXX11_CHECK_CMD = $(CXX) -std=c++11 -o $(TMPOUT) -c test/build/c++11.cc HAS_CXX11 = $(shell $(CXX11_CHECK_CMD) 2> /dev/null && echo true || echo false) - CHECK_SHADOW_WORKS_CMD = $(CC) -std=c99 -Werror -Wshadow -o $(TMPOUT) -c test/build/shadow.c - HAS_WORKING_SHADOW = $(shell $(CHECK_SHADOW_WORKS_CMD) 2> /dev/null && echo true || echo false) - ifeq ($(HAS_WORKING_SHADOW),true) - W_SHADOW=-Wshadow - endif - - CHECK_NO_SHIFT_NEGATIVE_VALUE_CMD = $(CC) -std=c99 -Werror -Wno-shift-negative-value -o $(TMPOUT) -c test/build/empty.c - HAS_NO_SHIFT_NEGATIVE_VALUE = $(shell $(CHECK_NO_SHIFT_NEGATIVE_VALUE_CMD) 2> /dev/null && echo true || echo false) - ifeq ($(HAS_NO_SHIFT_NEGATIVE_VALUE),true) - W_NO_SHIFT_NEGATIVE_VALUE=-Wno-shift-negative-value + %for warning in CHECK_WARNINGS: + ${warning_var('CHECK_%s_WORKS_CMD', warning)} = $(CC) -std=c99 -Werror -W${warning} -o $(TMPOUT) -c test/build/${warning}.c + ${warning_var('HAS_WORKING_%s', warning)} = $(shell $(${warning_var('CHECK_%s_WORKS_CMD', warning)}) 2> /dev/null && echo true || echo false) + ifeq ($(${warning_var('HAS_WORKING_%s', warning)}),true) + ${warning_var('W_%s', warning)}=-W${warning} + ${warning_var('NO_W_%s', warning)}=-W${neg_warning(warning)} endif + %endfor # The HOST compiler settings are used to compile the protoc plugins. # In most cases, you won't have to change anything, but if you are @@ -213,7 +223,7 @@ DEFINES += $(EXTRA_DEFINES) endif - CFLAGS += -std=c99 -Wsign-conversion -Wconversion $(W_SHADOW) + CFLAGS += -std=c99 -Wsign-conversion -Wconversion ${' '.join(warning_var('$(W_%s)', warning) for warning in PREFERRED_WARNINGS)} ifeq ($(HAS_CXX11),true) CXXFLAGS += -std=c++11 else @@ -1698,7 +1708,7 @@ # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment - $(${tgt.name.upper()}_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value + $(${tgt.name.upper()}_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(${tgt.name.upper()}_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(${tgt.name.upper()}_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE % else: diff --git a/templates/gRPC.podspec.template b/templates/gRPC.podspec.template index a9948a41df..979cb1ef8e 100644 --- a/templates/gRPC.podspec.template +++ b/templates/gRPC.podspec.template @@ -54,7 +54,7 @@ %> Pod::Spec.new do |s| s.name = 'gRPC' - version = '0.12.0' + version = '0.14.0' s.version = version s.summary = 'gRPC client library for iOS/OSX' s.homepage = 'http://www.grpc.io' @@ -62,7 +62,8 @@ s.authors = { 'The gRPC contributors' => 'grpc-packages@google.com' } s.source = { :git => 'https://github.com/grpc/grpc.git', - :tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}" } + :tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}", + :submodules => true } s.ios.deployment_target = '7.1' @@ -97,7 +98,7 @@ ss.requires_arc = false ss.libraries = 'z' - ss.dependency 'BoringSSL', '~> 2.0' + ss.dependency 'BoringSSL', '~> 3.0' # ss.compiler_flags = '-GCC_WARN_INHIBIT_ALL_WARNINGS', '-w' end diff --git a/templates/src/node/tools/package.json.template b/templates/src/node/tools/package.json.template index 4f673c48d1..69ad71a3b8 100644 --- a/templates/src/node/tools/package.json.template +++ b/templates/src/node/tools/package.json.template @@ -18,8 +18,8 @@ } ], "bin": { - "grpc-tools-protoc": "./bin/protoc.js", - "grpc-tools-plugin": "./bin/protoc_plugin.js" + "grpc_tools_node_protoc": "./bin/protoc.js", + "grpc_tools_node_protoc_plugin": "./bin/protoc_plugin.js" }, "scripts": { "install": "./node_modules/.bin/node-pre-gyp install" |