diff --git a/ReactCommon/cxxreact/BUCK b/ReactCommon/cxxreact/BUCK index 06bf8adbdaf..b24c56a3c8f 100644 --- a/ReactCommon/cxxreact/BUCK +++ b/ReactCommon/cxxreact/BUCK @@ -1,21 +1,11 @@ load("@xplat//tools/build_defs:glob_defs.bzl", "subdir_glob") -load("//ReactNative:DEFS.bzl", "ANDROID", "ANDROID_JSC_DEPS", "APPLE", "APPLE_JSC_DEPS", "IS_OSS_BUILD", "get_android_inspector_flags", "get_apple_inspector_flags", "react_native_xplat_target", "rn_xplat_cxx_library") +load("//ReactNative:DEFS.bzl", "ANDROID", "ANDROID_JSC_DEPS", "APPLE", "get_apple_compiler_flags", "APPLE_JSC_DEPS", "get_debug_preprocessor_flags", "IS_OSS_BUILD", "get_android_inspector_flags", "get_apple_inspector_flags", "react_native_xplat_target", "rn_xplat_cxx_library") CXX_LIBRARY_COMPILER_FLAGS = [ "-std=c++14", "-Wall", ] -APPLE_COMPILER_FLAGS = [] - -DEBUG_PREPROCESSOR_FLAGS = [] - -if not IS_OSS_BUILD: - load("@xplat//configurations/buck/apple:flag_defs.bzl", "flags", "get_debug_preprocessor_flags", "get_static_library_ios_flags") - - APPLE_COMPILER_FLAGS = flags.get_flag_value(get_static_library_ios_flags(), "compiler_flags") - DEBUG_PREPROCESSOR_FLAGS = get_debug_preprocessor_flags() - rn_xplat_cxx_library( name = "module", header_namespace = "", @@ -28,7 +18,7 @@ rn_xplat_cxx_library( prefix = "cxxreact", ), compiler_flags = CXX_LIBRARY_COMPILER_FLAGS, - fbobjc_compiler_flags = APPLE_COMPILER_FLAGS, + fbobjc_compiler_flags = get_apple_compiler_flags(), force_static = True, visibility = [ "PUBLIC", @@ -52,7 +42,7 @@ rn_xplat_cxx_library( "-fexceptions", "-frtti", ], - fbobjc_compiler_flags = APPLE_COMPILER_FLAGS, + fbobjc_compiler_flags = get_apple_compiler_flags(), force_static = True, visibility = [ "PUBLIC", @@ -73,7 +63,7 @@ rn_xplat_cxx_library( "-fno-omit-frame-pointer", "-fexceptions", ], - fbobjc_compiler_flags = APPLE_COMPILER_FLAGS, + fbobjc_compiler_flags = get_apple_compiler_flags(), soname = "libxplat_react_module_samplemodule.$(ext)", visibility = [ "PUBLIC", @@ -141,13 +131,13 @@ rn_xplat_cxx_library( "-DWITH_JSC_MEMORY_PRESSURE=1", "-DWITH_FB_MEMORY_PROFILING=1", ], - fbobjc_compiler_flags = APPLE_COMPILER_FLAGS, + fbobjc_compiler_flags = get_apple_compiler_flags(), fbobjc_deps = APPLE_JSC_DEPS, fbobjc_force_static = True, fbobjc_frameworks = [ "$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework", ], - fbobjc_preprocessor_flags = DEBUG_PREPROCESSOR_FLAGS + get_apple_inspector_flags(), + fbobjc_preprocessor_flags = get_debug_preprocessor_flags() + get_apple_inspector_flags(), force_static = True, macosx_tests_override = [], platforms = (ANDROID, APPLE), diff --git a/ReactCommon/jschelpers/BUCK b/ReactCommon/jschelpers/BUCK index 9f3c8261714..7739b8f7dc5 100644 --- a/ReactCommon/jschelpers/BUCK +++ b/ReactCommon/jschelpers/BUCK @@ -13,11 +13,11 @@ rn_xplat_cxx_library( name = "jscinternalhelpers", srcs = glob( ["*.cpp"], - excludes = ["systemJSCWrapper.cpp"], + exclude = ["systemJSCWrapper.cpp"], ), headers = glob( ["*.h"], - excludes = EXPORTED_HEADERS, + exclude = EXPORTED_HEADERS, ), header_namespace = "", exported_headers = dict([ diff --git a/ReactNative/DEFS.bzl b/ReactNative/DEFS.bzl index b0c85a1aaf7..0909ede2236 100644 --- a/ReactNative/DEFS.bzl +++ b/ReactNative/DEFS.bzl @@ -6,12 +6,21 @@ This lets us build React Native: """ # @lint-ignore-every SKYLINT BUCKRESTRICTEDSYNTAX +_DEBUG_PREPROCESSOR_FLAGS = [] + +_APPLE_COMPILER_FLAGS = [] + +def get_debug_preprocessor_flags(): + return _DEBUG_PREPROCESSOR_FLAGS + +def get_apple_compiler_flags(): + return _APPLE_COMPILER_FLAGS + IS_OSS_BUILD = True GLOG_DEP = "//ReactAndroid/build/third-party-ndk/glog:glog" INSPECTOR_FLAGS = [] -DEBUG_PREPROCESSOR_FLAGS = [] APPLE_JSC_INTERNAL_DEPS = [] APPLE_JSC_DEPS = []