File tree 5 files changed +27
-2
lines changed
5 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -414,6 +414,7 @@ utils/config.ml: utils/config.mlp config/Makefile
414
414
-e ' s|%%MKMAINDLL%%|$(MKMAINDLL)|' \
415
415
-e ' s|%%HOST%%|$(HOST)|' \
416
416
-e ' s|%%TARGET%%|$(TARGET)|' \
417
+ -e ' s|%%FLAMBDA%%|$(FLAMBDA)|' \
417
418
utils/config.mlp > utils/config.ml
418
419
419
420
partialclean ::
Original file line number Diff line number Diff line change @@ -313,6 +313,7 @@ utils/config.ml: utils/config.mlp config/Makefile
313
313
-e 's|%%CC_PROFILE%%||' \
314
314
-e 's|%%HOST%%|$(HOST)|' \
315
315
-e 's|%%TARGET%%|$(TARGET)|' \
316
+ -e 's|%%FLAMBDA%%|$(FLAMBDA)|' \
316
317
utils/config.mlp > utils/config.ml
317
318
318
319
partialclean::
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ no_naked_pointers=false
51
51
native_compiler=true
52
52
TOOLPREF=" "
53
53
with_cfi=true
54
+ flambda=false
54
55
55
56
# Try to turn internationalization off, can cause config.guess to malfunction!
56
57
unset LANG
@@ -162,6 +163,8 @@ while : ; do
162
163
with_cfi=false;;
163
164
-no-native-compiler)
164
165
native_compiler=false;;
166
+ -flambda)
167
+ flambda=true;;
165
168
* ) if echo " $1 " | grep -q -e ' ^--\?[a-zA-Z0-9-]\+=' ; then
166
169
err " configure expects arguments of the form '-prefix /foo/bar'," \
167
170
" not '-prefix=/foo/bar' (note the '=')."
@@ -1788,6 +1791,7 @@ echo "HOST=$host" >> Makefile
1788
1791
if [ " $ostype " = Cygwin ]; then
1789
1792
echo " DIFF=diff -q --strip-trailing-cr" >> Makefile
1790
1793
fi
1794
+ echo " FLAMBDA=$flambda " >> Makefile
1791
1795
1792
1796
1793
1797
rm -f tst hasgot.c
@@ -1856,6 +1860,11 @@ else
1856
1860
else
1857
1861
inf " profiling with gprof ..... not supported"
1858
1862
fi
1863
+ if test " $flambda " = " true" ; then
1864
+ inf " using flambda middle-end . yes"
1865
+ else
1866
+ inf " using flambda middle-end . no"
1867
+ fi
1859
1868
fi
1860
1869
1861
1870
if test " $with_debugger " = " ocamldebugger" ; then
Original file line number Diff line number Diff line change @@ -127,3 +127,6 @@ val target : string
127
127
(* Whether the compiler is a cross-compiler *)
128
128
129
129
val print_config : out_channel -> unit ;;
130
+
131
+ val flambda : bool
132
+ (* Whether the compiler was configured for flambda *)
Original file line number Diff line number Diff line change @@ -48,12 +48,22 @@ let mkdll = "%%MKDLL%%"
48
48
let mkexe = "%%MKEXE%%"
49
49
let mkmaindll = "%%MKMAINDLL%%"
50
50
51
+ let flambda = %%FLAMBDA%%
52
+
51
53
let exec_magic_number = "Caml1999X011"
52
54
and cmi_magic_number = "Caml1999I020"
53
55
and cmo_magic_number = "Caml1999O011"
54
56
and cma_magic_number = "Caml1999A012"
55
- and cmx_magic_number = "Caml1999Y015"
56
- and cmxa_magic_number = "Caml1999Z014"
57
+ and cmx_magic_number =
58
+ if flambda then
59
+ "Caml1999Y016"
60
+ else
61
+ "Caml1999Y015"
62
+ and cmxa_magic_number =
63
+ if flambda then
64
+ "Caml1999Z015"
65
+ else
66
+ "Caml1999Z014"
57
67
and ast_impl_magic_number = "Caml1999M019"
58
68
and ast_intf_magic_number = "Caml1999N018"
59
69
and cmxs_magic_number = "Caml2007D002"
@@ -126,6 +136,7 @@ let print_config oc =
126
136
p_bool "systhread_supported" systhread_supported;
127
137
p "host" host;
128
138
p "target" target;
139
+ p_bool "flambda" flambda;
129
140
130
141
(* print the magic number *)
131
142
p "exec_magic_number" exec_magic_number;
You can’t perform that action at this time.
0 commit comments