Skip to content

Commit

Permalink
configure: don't check for Flambda
Browse files Browse the repository at this point in the history
This is best handled by Dune in the future. Flambda itself is
experimental, and proper Flambda options support will be implemented
after Flambda is stabilized.
  • Loading branch information
aantron committed Aug 31, 2018
1 parent e7be480 commit 88c7457
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 32 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ matrix:
- os: linux
env: COMPILER=4.04
- os: linux
env: COMPILER=4.05 FLAMBDA=yes
env: COMPILER=4.05
- os: linux
env: COMPILER=4.06 FLAMBDA=yes
env: COMPILER=4.06
- os: linux
env: COMPILER=4.06 FLAMBDA=yes LIBEV=no
env: COMPILER=4.06 LIBEV=no
- os: linux
env: COMPILER=4.07
- os: osx
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ clean:
dune clean
find . -name '.merlin' | xargs rm -f
rm -fr docs/api
rm -f src/jbuild-ignore src/unix/lwt_config src/core/flambda.flag
rm -f src/jbuild-ignore src/unix/lwt_config
for TEST in `ls -d test/packaging/*/*` ; \
do \
make -wC $$TEST clean ; \
Expand Down
1 change: 0 additions & 1 deletion src/core/dune
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
(synopsis "Monadic promises and concurrent I/O")
(wrapped false)
(preprocess (pps bisect_ppx -conditional))
(ocamlopt_flags (:standard (:include flambda.flag)))
(libraries bytes result)
(flags (:standard -w +A-29)))
21 changes: 1 addition & 20 deletions src/unix/config/configure.ml
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,7 @@ let main () =
print "use_pthread" !use_pthread;
print "android_target" !android_target;
print "libev_default" !libev_default;
close_out f;

(* Compilers starting from 4.03.0 support the -O3 flag. *)
let () =
let major, minor =
Scanf.sscanf Sys.ocaml_version "%u.%u"
(fun major minor -> major, minor)
in
let supports_o3 = (major, minor) >= (4, 3) in
let flags_file = open_out "src/core/flambda.flag" in
begin
if supports_o3 then
output_string flags_file "-O3\n"
else
output_string flags_file "()\n"
end;
close_out flags_file
in

()
close_out f

let () =
main ()
7 changes: 1 addition & 6 deletions src/util/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,7 @@ case $COMPILER in
*) echo Unsupported compiler $COMPILER; exit 1;;
esac

if [ "$FLAMBDA" = yes ]
then
SWITCH="$OCAML_VERSION+flambda"
else
SWITCH="$OCAML_VERSION"
fi
SWITCH="$OCAML_VERSION"

if [ -n "$DO_SWITCH" ]
then
Expand Down
1 change: 0 additions & 1 deletion test/core/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
(executable
(name main)
(ocamlopt_flags (:standard (:include ../../src/core/flambda.flag)))
(libraries lwttester)
(flags (:standard -w +A-40-42)))

Expand Down

0 comments on commit 88c7457

Please sign in to comment.