Skip to content

Commit 4b75b46

Browse files
authored
flambda-backend: Fix build system under ocaml/runtime (#1085)
1 parent 7c9fc32 commit 4b75b46

File tree

3 files changed

+20
-80
lines changed

3 files changed

+20
-80
lines changed

dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
(action
149149
(no-infer
150150
(progn
151-
(chdir yacc (run make -sj8 OCAMLYACC_INCLUDE_PATH=%{ocaml_where}))
151+
(chdir yacc (run make -s OCAMLYACC_INCLUDE_PATH=%{ocaml_where}))
152152
(copy yacc/ocamlyacc ocamlyacc)))))
153153

154154
(install

runtime/caml/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
(rule
2525
(targets opnames.h)
26-
(deps instruct.h ../sak)
26+
(deps instruct.h)
2727
(action (run make -s -C .. COMPUTE_DEPS=false caml/opnames.h)))
2828

2929
(rule

runtime/dune

Lines changed: 18 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -26,88 +26,28 @@
2626
bigarray.c eventlog.c)
2727
(action (with-stdout-to %{targets} (run %{dep:gen_primitives.sh}))))
2828

29-
; Shouldn't this use foreign build sandboxing?
30-
31-
(rule
32-
(targets libcamlrun.a libcamlrund.a libcamlruni.a libcamlrun_pic.a
33-
libcamlrun_shared.so)
34-
(mode fallback)
35-
(deps ../Makefile.config ../Makefile.common ../Makefile.build_config ../Makefile.config_if_required Makefile
36-
(glob_files caml/*.h)
37-
interp.c misc.c stacks.c fix_code.c startup_aux.c startup_byt.c
38-
freelist.c major_gc.c minor_gc.c memory.c alloc.c roots_byt.c
39-
globroots.c fail_byt.c signals.c signals_byt.c printexc.c
40-
backtrace_byt.c backtrace.c compare.c ints.c floats.c str.c array.c
41-
io.c extern.c intern.c hash.c sys.c meta.c parsing.c gc_ctrl.c md5.c
42-
obj.c lexing.c callback.c debugger.c weak.c compact.c finalise.c
43-
custom.c dynlink.c afl.c unix.c win32.c bigarray.c main.c memprof.c
44-
domain.c caml/domain_state.tbl eventlog.c skiplist.c codefrag.c
45-
instrtrace.c caml/opnames.h build_config.h prims.c)
46-
(action
47-
(progn
48-
(run make -sj8 COMPUTE_DEPS=false %{targets}))))
49-
50-
(rule
51-
(targets sak)
52-
(deps sak.c caml/misc.h caml/config.h caml/s.h caml/m.h)
53-
(action (run make -s COMPUTE_DEPS=false %{targets})))
54-
55-
(rule
56-
(targets build_config.h)
57-
(deps ../Makefile.config sak)
58-
(action (run make -s COMPUTE_DEPS=false %{targets})))
59-
60-
(rule
61-
(targets prims.c)
62-
(mode fallback)
63-
(deps primitives Makefile)
64-
(action (run make -s COMPUTE_DEPS=false %{targets})))
65-
6629
(rule
6730
(targets libasmrun.a libasmrund.a libasmruni.a libasmrun_pic.a
68-
libasmrun_shared.so prims.o)
31+
libasmrun_shared.so libcamlrun.a libcamlrund.a libcamlruni.a libcamlrun_pic.a
32+
libcamlrun_shared.so ocamlrun ocamlrund ocamlruni ld.conf
33+
sak)
6934
(mode fallback)
70-
(deps ../Makefile.config ../Makefile.common ../Makefile.build_config ../Makefile.config_if_required Makefile
71-
(glob_files caml/*.h)
72-
signals_osdep.h (glob_files *.S)
73-
startup_aux.c startup_nat.c main.c fail_nat.c roots_nat.c signals.c
74-
signals_nat.c misc.c freelist.c major_gc.c minor_gc.c memory.c alloc.c
75-
compare.c ints.c floats.c str.c array.c io.c extern.c intern.c hash.c sys.c
76-
parsing.c gc_ctrl.c md5.c obj.c lexing.c unix.c printexc.c callback.c weak.c
77-
compact.c finalise.c custom.c globroots.c backtrace_nat.c backtrace.c
78-
dynlink_nat.c debugger.c meta.c dynlink.c clambda_checks.c afl.c bigarray.c memprof.c domain.c
79-
caml/domain_state.tbl eventlog.c prims.c)
35+
(deps
36+
../Makefile.config
37+
../Makefile.build_config
38+
../Makefile.config_if_required
39+
../Makefile.common Makefile
40+
(glob_files caml/*.h)
41+
primitives
42+
signals_osdep.h (glob_files *.S)
43+
(glob_files *.c)
44+
)
8045
(action
81-
(progn
82-
(run make -sj8 COMPUTE_DEPS=false %{targets}))))
83-
84-
(rule
85-
(targets ld.conf)
86-
(deps ../Makefile.config build_config.h)
87-
(action (run make -s COMPUTE_DEPS=false %{targets})))
88-
89-
(rule
90-
(targets ocamlrun)
91-
(deps libcamlrun.a prims.o)
92-
(action
93-
(progn
94-
(run make -s COMPUTE_DEPS=false %{targets}))))
95-
96-
(rule
97-
(targets ocamlrund)
98-
; the ocamlrun dep is a hack to serialise production of ocamlrun* so there
99-
; isn't a race on prims.o
100-
(deps libcamlrund.a prims.o ocamlrun)
101-
(action
102-
(progn
103-
(run make -s COMPUTE_DEPS=false %{targets}))))
104-
105-
(rule
106-
(targets ocamlruni)
107-
(deps libcamlruni.a prims.o ocamlrund)
108-
(action
109-
(progn
110-
(run make -s COMPUTE_DEPS=false %{targets}))))
46+
(no-infer
47+
(progn
48+
(bash "touch .depend") ; hack.
49+
(run make -s %{targets} COMPUTE_DEPS=false)
50+
(bash "rm .depend")))))
11151

11252
(install
11353
(files

0 commit comments

Comments
 (0)