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', ],