Commit Graph

169 Commits (bd7fa181cb64742c3b6cbb8ee13436554eb18cd7)

Author SHA1 Message Date
Alain Frisch 4907f6ca76 #5779: improve support for structured constants (better propagation, sharing, cleaner representation). Also fix #6337 (constants emitted several times).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14444 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-06 17:03:16 +00:00
Alain Frisch 10abdce7b1 Record inclusion checks between value_descriptions in .cmt files. This makes it easy in particular to track in external tools value declarations between implementations and interfaces.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14422 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-28 11:07:02 +00:00
Alain Frisch 6a296a026e Fix conditional installation of ocamldebug under Windows.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14420 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-23 12:01:44 +00:00
Xavier Leroy f65785ae55 Un-bootstrapping of ocamlbuild: build it using a plain Makefile.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14347 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-12 17:38:43 +00:00
Xavier Leroy 33f242aaea Reverting the elimination of the ocamlcomp*.sh scripts, namely the following commits:
14278
14277
14276
14176
14175
14173
14172
14171
14169
14168
14167
These changes need to mature on their own branch.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14329 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-29 13:04:38 +00:00
Jérémie Dimino 5d917633ad remove camlp4
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/minus-camlp4@14309 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-21 16:23:28 +00:00
Wojciech Meyer 928503e9b8 build: always build lex/ and ocamlc with the compiler from boot/.
(Patch by Adrien Nader!)

This is a partial revert of revision 14168 which caused issues when
bootstrapping the compiler. Since these directories don't take long to
build, we can always use a byte-compiled compiler.

Bootstrapping and more generally working on the compiler itself does not
play nice with trying to use the most recent compiler as soon as
possible: imagine you've just modified the compiler but in a way that
breaks it at runtime in a non-obvious way; all the files that are
subsequently built will have been built with your the compiler you will
be debugging.

v2: always build tools/ with boot/ocamlc since most executables link
    against compiler libs.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14277 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-10 12:32:12 +00:00
Wojciech Meyer 241585bc83 build: replace ocamlcomp*.sh.
This script was built from ocamlcomp.sh.in through sed and is called
instead of "ocamlc" (for instance).
It makes it possible to switch from "ocamlc" to "ocamlc.opt" without
changing anything in the Makefiles, only calling sed.

I couldn't cleanly make it handle both a compiler for the target and for
the build. Instead I'm replacing it and doing as much as possible
directly in the Makefiles.
I hoped it would reduce the number of shell invocations, which would
speed things up quite a lot on Windows but I still had to have at least
one since it's not possible to update a make variable from inside a make
rule: i.e. it's not possible to do X=a, build a.opt and update X to be
a.opt.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14168 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-20 00:22:38 +00:00
Wojciech Meyer 0ebaece612 build: ocamldoc.opt was not built anymore on Windows.
(Patch by Adrien Nader!)

An earlier change I had made conditionalized building ocamldoc.
I mixed up my variable names and set "WITH_OCAMLDOC_OPT" instead of
"OCAMLDOC_OPT". Later on, $(OCAMLDOC_OPT) would evaluate to the
empty-string, failing to add "ocamldoc.opt" to the prerequesites of the
"opt.opt" and "world.opt" rules.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14162 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-18 20:56:31 +00:00
Alain Frisch 842f6794a9 Synchronize with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@14042 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-28 17:10:04 +00:00
Gabriel Scherer 27b357ead2 build: fix build on Windows (patch and commit message by Adrien Nader).
CI failures and further testing made me find four more issues:
- forgot to rename a variable from "OCAMLDOC" to "WITH_OCAMLDOC"
  (this issue was also in the non-.nt Makefile)
- syntax error in the installopt rule: missing "fi"
- testsuite doesn't have Makefile.nt so don't use -f Makefile.nt for the
  "clean" rule
- had put an extra call to make "ocamltoolsopt" which in turn built the
  "opt" rule in tools/ but which isn't buildable because it is used to
  build profiling.cmx which, afaiu, is not available on windows (iirc it
  uses posix signals to "sample" the running application).
  That issue was only triggered when building "opt" and not "world.opt"
  and this is why I hadn't noticed it.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13947 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-28 21:08:13 +00:00
Gabriel Scherer 9ba35ffaed build: typo from the cross-compile patchset that makes Windows build fail
By the way, the last few commits have touched the build system and will
most likely result in build failures unless you "make clean" and
./configure again. Sorry for the inconvenience.

(Patch by Adrien Nader)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13946 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-28 19:06:44 +00:00
Wojciech Meyer b5668f67ff build: pass "-f Makefile.nt" to sub-make processes of Makefile.nt.
(Patch by Adrien Nader!)
The $(MAKE) variable of Makefiles doesn't include the -f flag. Pass it
explicitely.
build: pass "-f Makefile.nt" to sub-make processes of Makefile.nt.

The $(MAKE) variable of Makefiles doesn't include the -f flag. Pass it
explicitely.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13945 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-28 16:06:14 +00:00
Wojciech Meyer dda5f84f7c build: allow disabling ocamldoc and ocamlbuild.
(Patch by Adrien Nader!)

This doesn't touch the build system in build/ since it's obsolete and
unmaintained as far as I know (I'll try to remove it in a further
commit).

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13943 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-28 15:52:17 +00:00
Wojciech Meyer 6549fe7019 build: prepend "with_" to camlp4/ocamldebug-{en,dis}abling variables.
(Patch by Adrien Nader!)

This makes the variable names more coherent and is in preparation for
another patch that will allow disabling ocamldoc and ocamlbuild.

This changes the interface of the configuration somewhat but I don't
think anything outside of the ocaml tree reads the Makefile.config file
that gets installed in order to see whether the debugger and camlp4 have
been built. It also changes a .mli which might be problematic but I also
believe it is safe and we have time to see if there's a bad impact.

It also adds a configure switch to skip building ocamldebug.

While at it, it fixes a PR number in the Changes file.
build: prepend "with_" to camlp4/ocamldebug-{en,dis}abling variables.

This makes the variable names more coherent and is in preparation for
another patch that will allow disabling ocamldoc and ocamlbuild.

This changes the interface of the configuration somewhat but I don't
think anything outside of the ocaml tree reads the Makefile.config file
that gets installed in order to see whether the debugger and camlp4 have
been built. It also changes a .mli which might be problematic but I also
believe it is safe and we have time to see if there's a bad impact.

It also adds a configure switch to skip building ocamldebug.

While at it, it fixes a PR number in the Changes file.
build: prepend "with_" to camlp4/ocamldebug-{en,dis}abling variables.

This makes the variable names more coherent and is in preparation for
another patch that will allow disabling ocamldoc and ocamlbuild.

This changes the interface of the configuration somewhat but I don't
think anything outside of the ocaml tree reads the Makefile.config file
that gets installed in order to see whether the debugger and camlp4 have
been built. It also changes a .mli which might be problematic but I also
believe it is safe and we have time to see if there's a bad impact.

It also adds a configure switch to skip building ocamldebug.

While at it, it fixes a PR number in the Changes file.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13942 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-28 15:52:14 +00:00
Alain Frisch 525ef9d703 Synchronize with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13897 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-16 13:34:30 +00:00
Wojciech Meyer 1a241d873f configure: store $target and $host in the build configuration (fixed).
(patch by Adrien Nader!)

Compared to the previous version of this patch, this fixes too issues.

First, it updates the makefiles for mingw and msvc to set $host and
$target. I'm not completely sure why that was required since these
variables should have evaluated to empty strings which were only tested
for equality later on. Still, it's needed and it avoids an asymetry
between the regular ./configure-based builds and the ones using pre-made
Makefiles.

Second, it update the ocamlbuild config to also store $host and $target.
I had been building the cross-compilers with OCAMLBUILD_NOBOOT (which is
rather new) and updating that config wasn't needed. However it is
required for the "regular" builds.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13862 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-01 19:28:15 +00:00
Fabrice Le Fessant ad6c285818 Improved implementation of OCAMLPARAM
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13747 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-05 16:34:40 +00:00
Fabrice Le Fessant 9b53f8b10d Re-add configure option -with-frame-pointers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13738 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 18:03:59 +00:00
Fabrice Le Fessant 97bc1fa9e2 Reverting -with-frame-pointers
Fails to compile alt-ergo without frame-pointers. No time to debug
before tonight, so I revert and will merge again after fixing the
problem.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13732 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 06:29:33 +00:00
Fabrice Le Fessant 1b2667b9f2 Add -with-frame-pointers to ./configure
This option can be used to tell the native compiler that it should
update frame pointers, so that debuggers and profiling tools 
(especially Linux perf) can use them. For now, it is only supported
by the Unix/amd64 port.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13730 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 04:42:42 +00:00
Damien Doligez dc136b5464 Makefile.nt: make clean in the testsuite also
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13637 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-30 09:57:54 +00:00
Xavier Leroy e29c9d2956 PR#5986: added flag Marshal.Compat_32 and ocamlc option -compat-32.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13554 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-18 11:58:59 +00:00
Damien Doligez f8158edf4c fix whitespace and over-long lines
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13433 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-22 18:21:10 +00:00
Alain Frisch b0987fd693 Attributes on expresions (etc) are now stored in the expression record, to facilitate pattern matching on structured fragments of AST while ignoring attributes. Introducing a new Ast_helper module to help creating AST fragments.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13381 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-08 14:59:45 +00:00
Alain Frisch 779580674f Move ast_mapper to parsing/, make it part of compiler-libs, and add an interface. Plus minor code cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13249 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-16 16:10:29 +00:00
Alain Frisch 3ffcd66100 #5741: link pprintast into the compiler (unused for now, but it is available in compiler-libs).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13024 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-17 15:50:07 +00:00
Damien Doligez def31744f9 remove all $Id keywords
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-15 17:50:56 +00:00
Alain Frisch e4161112b6 Also install relevant cmx/obj files in compiler-libs.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12980 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-02 11:40:22 +00:00
Alain Frisch 93aaed4e9e Windows users also deserve printtyped and printclambda. (Seriously, we should merge those list of modules between Makefile and Makefile.nt.)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12979 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-02 09:46:39 +00:00
Wojciech Meyer cc6726aa62 Install topdirs.cmi in stdlib - update Makefile.nt too
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12749 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-19 22:56:59 +00:00
Fabrice Le Fessant 776c46fce8 Fix problem of size of bin-annot files
- Reset most of the fields of Env.t when saving bin-annot files
- Move debugger/envaux.ml to typing/, and add a function to 
    recover environements from bin-annot files.
- Move tools/typedtreeIter.ml to typing/
- Move the code of typing/typedtreeMap.ml from cmt_format.ml



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12702 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-12 11:02:18 +00:00
Damien Doligez 9d10503a1d PR#5218: use $(MAKE) instead of "make" in Makefiles
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12694 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-10 15:29:19 +00:00
Alain Frisch fc1b6c300e #5638: .a -> .a/.lib in Makefile.nt.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12587 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-06-08 12:53:40 +00:00
Fabrice Le Fessant d39d43e55f merge with branch bin-annot
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12516 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-30 14:52:37 +00:00
Fabrice Le Fessant 87f6cd4779 modified Windows Makefiles to install compiler internals
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12496 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-29 10:48:19 +00:00
Fabrice Le Fessant 7b9f2a7ddf Reverting commits 12385 and 12370, while waiting for a decision to be taken to install compiler files for 4.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12389 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-22 16:11:51 +00:00
Fabrice Le Fessant 905143bfa2 Add hooks in Asmgen
Add hooks in Asmgen to allow external developers to add
new passes on the typedtree, lambda, clambda and cmm trees.
A library 'ocamlopt.cm{a/xa}' is installed, with optmain.cm{x/o},
so that developers can create new ocamlopt executables containing
these new passes.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12370 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-18 08:50:26 +00:00
Jonathan Protzenko 1ac30d51ba Update the Makefiles on Windows to reflect the fact that compiling camlp4 is now opt-out.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12318 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-04 12:56:49 +00:00
Xavier Leroy af3cafad25 Splitting off the win32caml/ subdirectory (the simplistic Win32 UI for the toplevel). It now lives at https://forge.ocamlcore.org/projects/ocamltopwin/
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12268 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-24 10:37:53 +00:00
Alain Frisch 60dca0a103 Fix for windows (ASM_CFI_SUPPORTED=false).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12190 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-05 15:30:19 +00:00
Damien Doligez f283133875 PR#5159: better documentation of type "position"
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12144 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-10 09:08:02 +00:00
Alain Frisch 06e84a894a Unused_var has been removed.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12051 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-18 18:50:31 +00:00
Alain Frisch bfb35c4fce #5478: makes it possible to specify a custom 'ar' command.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12027 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-16 09:05:37 +00:00
Xavier Leroy e10723e701 Merged proc_nt.ml into proc.ml in directories asmcomp/i386 and asmcomp/amd64.
This avoids much code duplication and is a baby step towards Mingw-64 bits 
support (PR#5179).  (There will be no need to create a third proc_xxx.ml
file for this configuration.)
Also, in amd64/emit_nt.mlp, the ml64 assembler didn't like my label subtractions, so I put the jumptable in code area instead of in data area.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11319 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-16 17:02:48 +00:00
Alain Frisch 5f8ff42f10 #5179: the 'official' 32-bit mingw compiler is now the one from the mingw-w64 project, packaged in Cygwin (as supported by flexdll 0.27).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11300 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-12 11:38:06 +00:00
Xavier Leroy 9ef7e04cf3 Jonathan's updates to the Windows/Mingw port
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11197 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-09-15 13:38:45 +00:00
Damien Doligez 3b507dd1aa renaming of Objective Caml to OCaml and cleanup of copyright headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-27 14:17:02 +00:00
Damien Doligez 575555eecd merge changes from branching of 3.12 to release/3.12.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10643 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-08-02 14:37:22 +00:00
Jacques Garrigue ab9616c72b add world.opt target
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10472 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-28 11:21:46 +00:00