-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdune
46 lines (41 loc) · 1.23 KB
/
dune
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
(include_subdirs unqualified)
(copy_files# "../js/shared/*.re")
(library
(name shared_native)
(flags :standard -open ReactCompat -linkall)
(modules :standard \ plugin framework)
(libraries
react_compat
server-reason-react.react
server-reason-react.reactDom
server-reason-react.js
server-reason-react.belt
)
(preprocess
(pps
server-reason-react.ppx
server-reason-react.browser_ppx
server-reason-react.regex_ppx)))
(library
(name shared_native_dynamic)
(flags :standard -linkall)
(libraries shared_native react_plugin_dynamic)
(modules plugin)
)
; This builds a custom cmsx to include the application code in shared_native and the code in
; shared_native_dynamic to set the module reference in ui/native/react_plugin_dynamic/react_plugin
; to the latest version of the module.
(rule
(alias default)
; TODO: try depending on ml files directly to trigger changes to get around hash issues
(deps
shared_native.cmxa
shared_native_dynamic.cmxa
; this is a workaround to handle cmxa files not triggering changes
shared_native.a
shared_native_dynamic.a
)
(targets shared_native_plugin.cmxs)
(action
(chdir %{workspace_root}
(run %{ocamlopt} -linkall -shared -o %{targets} %{deps}))))