BUCK 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # BUILD FILE SYNTAX: SKYLARK
  2. load("@fbsource//tools/build_defs:default_platform_defs.bzl", "APPLE", "IOS", "MACOSX")
  3. load("//tools/build_defs/oss:rn_defs.bzl", "react_native_xplat_dep", "rn_xplat_cxx_library")
  4. rn_xplat_cxx_library(
  5. name = "jsi",
  6. srcs = [
  7. "jsi/jsi.cpp",
  8. ],
  9. header_namespace = "",
  10. exported_headers = [
  11. "jsi/instrumentation.h",
  12. "jsi/jsi.h",
  13. "jsi/jsi-inl.h",
  14. "jsi/jsilib.h",
  15. ],
  16. compiler_flags = [
  17. "-O3",
  18. "-fexceptions",
  19. "-frtti",
  20. "-std=c++14",
  21. "-Wall",
  22. "-Werror",
  23. "-Wextra",
  24. "-Wcast-qual",
  25. "-Wdelete-non-virtual-dtor",
  26. "-Wwrite-strings",
  27. ],
  28. cxx_compiler_flags = [
  29. "-Wglobal-constructors",
  30. "-Wmissing-prototypes",
  31. ],
  32. fbobjc_compiler_flags = [
  33. "-Wglobal-constructors",
  34. "-Wmissing-prototypes",
  35. ],
  36. visibility = ["PUBLIC"],
  37. )
  38. rn_xplat_cxx_library(
  39. name = "JSIDynamic",
  40. srcs = [
  41. "jsi/JSIDynamic.cpp",
  42. ],
  43. header_namespace = "",
  44. exported_headers = [
  45. "jsi/JSIDynamic.h",
  46. ],
  47. compiler_flags = [
  48. "-fexceptions",
  49. "-frtti",
  50. ],
  51. fbobjc_force_static = True,
  52. visibility = [
  53. "PUBLIC",
  54. ],
  55. xcode_public_headers_symlinks = True,
  56. deps = [
  57. "//xplat/folly:molly",
  58. react_native_xplat_dep("jsi:jsi"),
  59. ],
  60. )
  61. rn_xplat_cxx_library(
  62. name = "JSCRuntime",
  63. srcs = [
  64. "JSCRuntime.cpp",
  65. ],
  66. header_namespace = "jsi",
  67. exported_headers = [
  68. "JSCRuntime.h",
  69. ],
  70. apple_sdks = (IOS, MACOSX),
  71. fbobjc_compiler_flags = [
  72. "-Os",
  73. ],
  74. fbobjc_frameworks = [
  75. "$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework",
  76. ],
  77. fbobjc_labels = ["supermodule:ios/default/public.react_native.infra"],
  78. # TODO (T55502220): Remove when iOS 9.0 deprecation is complete everywhere.
  79. fbobjc_target_sdk_version = "9.0",
  80. platforms = APPLE,
  81. visibility = ["PUBLIC"],
  82. xplat_mangled_args = {
  83. "soname": "libjscjsi.$(ext)",
  84. },
  85. exported_deps = [
  86. react_native_xplat_dep("jsi:jsi"),
  87. ],
  88. )