From f29e195cb75c5fc957b42417d99032d2dd512adc Mon Sep 17 00:00:00 2001 From: Mark Wang Date: Sat, 11 Jun 2016 20:47:59 -0700 Subject: [PATCH] More inherited_buck_flags in fbobjc. Reviewed By: beefon Differential Revision: D3414903 fbshipit-source-id: 83528910b4d7f60765b7bfdb779c1c08921d8b9a --- ReactCommon/cxxreact/BUCK | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ReactCommon/cxxreact/BUCK b/ReactCommon/cxxreact/BUCK index 43e52bbdc..1cc81173e 100644 --- a/ReactCommon/cxxreact/BUCK +++ b/ReactCommon/cxxreact/BUCK @@ -1,3 +1,10 @@ +CXX_LIBRARY_COMPILER_FLAGS = [] +REACT_LIBRARY_EXTRA_COMPILER_FLAGS = [] +if THIS_IS_FBOBJC: + inherited_buck_flags = buck_flags(STATIC_LIBRARY_IOS_FLAGS) + CXX_LIBRARY_COMPILER_FLAGS = inherited_buck_flags.combined_flags_as_dict()['compiler_flags'] + REACT_LIBRARY_EXTRA_COMPILER_FLAGS = ['-Wno-shadow', '-Wno-missing-prototypes'] + def kwargs_add(base_kwargs, **new_kwargs): ret_kwargs = dict(base_kwargs) for name, add_value in new_kwargs.iteritems(): @@ -42,6 +49,7 @@ elif THIS_IS_FBOBJC: ios_library( name = 'bridge', header_path_prefix = "cxxreact", + inherited_buck_flags = buck_flags(STATIC_LIBRARY_IOS_FLAGS), frameworks = [ '$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework', ], @@ -57,6 +65,7 @@ elif THIS_IS_FBOBJC: cxx_library( name = 'module', force_static = True, + compiler_flags = CXX_LIBRARY_COMPILER_FLAGS, exported_headers = [ 'CxxModule.h', 'FollySupport.h', @@ -78,7 +87,7 @@ cxx_library( srcs = ['SampleCxxModule.cpp'], exported_headers = ['SampleCxxModule.h'], header_namespace = '', - compiler_flags = [ + compiler_flags = CXX_LIBRARY_COMPILER_FLAGS + [ '-fno-omit-frame-pointer', '-Wall', '-Werror', @@ -149,7 +158,7 @@ react_library( '-fexceptions', '-fvisibility=hidden', '-frtti', - ], + ] + REACT_LIBRARY_EXTRA_COMPILER_FLAGS, deps = [ '//xplat/fbsystrace:fbsystrace', ],