Erick Tryzelaar
2008-Mar-04 06:33 UTC
[LLVMdev] [PATCH] Make sure ocamldep runs on all .mli files.
This is a small bug fix for the ocaml build system that allows for dependencies to be generated for ocaml interface files. --- bindings/ocaml/Makefile.ocaml | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) -------------- next part -------------- A non-text attachment was scrubbed... Name: 7c62c2cd93a6402e5f6ebd600e9e3ac7851b4d29.diff Type: text/x-patch Size: 994 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080303/523c9f1a/attachment.bin>
Erick Tryzelaar
2008-Mar-04 08:19 UTC
[LLVMdev] [PATCH] Prefer to use *.opt ocaml executables as they are more efficient.
I noticed that the ocaml compilation isn't using the .opt executables if they're available. We might gain a slight optimization in ocaml compile time by optionally using them with this patch. --- autoconf/configure.ac | 18 +++++ configure | 195 ++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 188 insertions(+), 25 deletions(-) -------------- next part -------------- A non-text attachment was scrubbed... Name: 97c6db7b03016306d34ee2e3ca41d0e423cf2c0c.diff Type: text/x-patch Size: 14342 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080304/05b4dd48/attachment.bin>
Erick Tryzelaar
2008-Mar-04 08:19 UTC
[LLVMdev] [PATCH] Cleanup the c and ocaml binding documentation.
--- bindings/ocaml/llvm/llvm.ml | 2 +- bindings/ocaml/llvm/llvm.mli | 2 +- bindings/ocaml/llvm/llvm_ocaml.c | 2 +- include/llvm-c/Core.h | 32 +++++++++++++++++++------------- 4 files changed, 22 insertions(+), 16 deletions(-) -------------- next part -------------- A non-text attachment was scrubbed... Name: 316a84e85ed2363551149e65a227c8e7c8192624.diff Type: text/x-patch Size: 5061 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080304/ea3f0621/attachment.bin>
Gordon Henriksen
2008-Mar-04 14:11 UTC
[LLVMdev] [PATCH] Prefer to use *.opt ocaml executables as they are more efficient.
Hi Erick, On Mar 4, 2008, at 03:19, Erick Tryzelaar wrote:> I noticed that the ocaml compilation isn't using the .opt > executables if they're available. We might gain a slight > optimization in ocaml compile time by optionally using them > with this patch.This looks like a good improvement.> --- > autoconf/configure.ac | 18 +++++ > configure | 195 ++++++++++++++++++++++++++++++++++++++++ > ++------ > 2 files changed, 188 insertions(+), 25 deletions(-)diff --git > autoconf/configure.ac autoconf/configure.ac > index 97e0305..56a25ca 100644 > --- autoconf/configure.ac > +++ autoconf/configure.ac > @@ -592,6 +592,9 @@ AC_PATH_PROG(ZIP,[zip],[echo "Skipped: zip not > found"]) > AC_PATH_PROG(OCAMLC,[ocamlc],[echo "Skipped: ocamlc not found"]) > AC_PATH_PROG(OCAMLOPT,[ocamlopt],[echo "Skipped: ocamlopt not found"]) > AC_PATH_PROG(OCAMLDEP,[ocamldep],[echo "Skipped: ocamldep not found"]) > +AC_PATH_PROG(OCAMLC_OPT,[ocamlc.opt],[echo "Skipped: ocamlc.opt not > found"]) > +AC_PATH_PROG(OCAMLOPT_OPT,[ocamlopt.opt],[echo "Skipped: > ocamlopt.opt not found"]) > +AC_PATH_PROG(OCAMLDEP_OPT,[ocamldep.opt],[echo "Skipped: > ocamldep.opt not found"]) > > dnl Determine if the linker supports the -R option. > AC_LINK_USE_R > @@ -911,6 +914,21 @@ AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, > "$LLVM_CONFIGTIME", > AC_DEFINE_UNQUOTED(LLVM_HOSTTRIPLE, "$host", > [Host triple we were built on]) > > +# prefer ocamlc.opt to ocamlc > +if test "x$OCAMLC" != x -a "x$OCAMLC_OPT" != x ; then > + OCAMLC=$OCAMLC_OPT > +fi > + > +# prefer ocamlopt.opt to ocamlopt > +if test "x$OCAMLOPT" != x -a "x$OCAMLOPT_OPT" != x ; then > + OCAMLOPT=$OCAMLOPT_OPT > +fi > + > +# prefer ocamldep.opt to ocamldep > +if test "x$OCAMLDEP" != x -a "x$OCAMLDEP_OPT" != x ; then > + OCAMLDEP=$OCAMLDEP_OPT > +fi > + > # Determine which bindings to build. > if test "$BINDINGS_TO_BUILD" = auto ; then > BINDINGS_TO_BUILD=""I think it would be simpler to use AC_PATH_PROGS instead. See how $GV is set up for instance. Can you please see whether that approach is workable? — Gordon
Gordon Henriksen
2008-Mar-04 14:54 UTC
[LLVMdev] [PATCH] Make sure ocamldep runs on all .mli files.
Hi Erick, Thanks for your patches! On Mar 4, 2008, at 01:33, Erick Tryzelaar wrote:> This is a small bug fix for the ocaml build system that allows > for dependencies to be generated for ocaml interface files.I've committed the second half of this.> --- > bindings/ocaml/Makefile.ocaml | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-)diff --git bindings/ > ocaml/Makefile.ocaml bindings/ocaml/Makefile.ocaml > index 6fc9a9a..d505ad8 100644 > --- bindings/ocaml/Makefile.ocaml > +++ bindings/ocaml/Makefile.ocaml > @@ -58,7 +58,7 @@ Archive.CMXA := $(strip $(OCAMLOPT) -a $ > (OCAMLAFLAGS) $(OCAMLDEBUGFLAG) -o) > > # Source files > OcamlSources1 := $(sort $(wildcard $(PROJ_SRC_DIR)/*.ml)) > -OcamlHeaders1 := $(OcamlSources1:.ml=.mli) > +OcamlHeaders1 := $(sort $(wildcard $(PROJ_SRC_DIR)/*.mli))Not sure how an .mli without a corresponding .ml would be useful, so I left this bit. Thanks! Gordon
Erick Tryzelaar
2008-Mar-04 17:19 UTC
[LLVMdev] [PATCH] Make sure ocamldep runs on all .mli files.
On Tue, Mar 4, 2008 at 6:54 AM, Gordon Henriksen <gordonhenriksen at mac.com> wrote:> Not sure how an .mli without a corresponding .ml would be useful, so I > left this bit.If you've got a module that only defines a type with no function definitions, you don't need the .ml file: foo.ml: let foo = Bar.A bar.mli: type t = A | B> ocamlc bar.mli > ocamlc foo.ml >In my eventual patch to switch over to using packed modules, I was thinking about making a TypeKind.mli that has just the type interface. However, I think I'd prefer to actually have this in the Type.ml{,i} files, but that would break source compatibility.
Possibly Parallel Threads
- [LLVMdev] [PATCH] Make sure ocamldep runs on all .mli files.
- [LLVMdev] r57974 & r57976 for PR2888
- ocamldep -all seems to break builds on platforms without a native compiler
- [LLVMdev] Configure problem of llvm2.5 in Mac OS X 10.4.11
- Re: ocamldep -all seems to break builds on platforms without a native compiler