With this commit, 'make alldepend' will stop and report an error as
soon as one of the invoked command fails, which was not the case before.
This commit thus makes it possible to test that 'make alldepend' works
in an automated way.
Require flexlink.opt to be specified. Old behaviour:
make flexdll world.opt install
now becomes:
make flexdll world.opt flexlink.opt install
Without flexlink.opt, a bytecode version of flexlink.exe is installed.
The install-flexdll target now puts the object files for FlexDLL in a
subdirectory flexdll of the Standard Library instead of in the Standard
Library itself.
A configuration tweak means that -I +flexdll is effectively added to all
compiler invocations and also a pseudo-option -L+flexdll to ocamlmklib
calls to Config.mkdll which fixes PR#7373.
The code in this commit was written by Marcell Fischbach & Benedikt Meurer.
See [Mantis#5324](http://caml.inria.fr/mantis/view.php?id=5324) for some
context.
The code (which was originally written against 3.12) was ported to trunk by
doing
```bash
git clone https://github.com/bmeurer/ocaml-experimental/
cd ocaml-experimental
git diff master...linear-scan-register-allocator > t.diff
```
and then applying the diff by hand.
Run 'make lintapidiff' in the root of a git checkout to get a list of
potentially missing or wrong @since annotations.
The tool is not built by default, you have to first run 'make
world.opt', and then run 'make lintapidiff'.
lintapidiff doesn't support stop comments: add explicit list of changes to ignore.
see copyright header for license.
This target thus becomes available under Windows (Makefile.nt did not
define it).
Since no other rule makes use of this target, its usefulness needs to be
confirmed.
Before this commit, the rule was more sequential on the Unix build system
than on the Windows one. The more sequential version has been kept
so as not to break parallel builds.
Note: since commit dd74659c68, the
coreboot target on the Unix build system calls make promote with
CAMLRUN=byterun/ocamlrun, which the equivalent target on the Windows
system did not use before the present commit.
The present commit uses CAMLRUN=byterun/ocamlrun on both build systems.
On Unix core builds coldstart and coreall while on Windows core builds runtime
and coreall. This behaviour has been preserved but needs to be
clarified.
On the Unix build system, this recipe was creating stdlib/caml as a symlink
to byterun/caml. This is no longer done because it is not done on
Windows either and seems not useful.
It will however be available only on Unix because checkstack does not
yet work on Windows.
This commit removes the '@' character in front of the commands of
the checkstack rule to make debugging easier.
It also fixes the target by ensuiring that the $(EXE) extension
is used everywhere.
On Unix the otherlibraries target depends on ocamltools, which was not
the case under Windows before this commit. This commit keeps the Unix
version to make sure no constraint is lost.
On Windows the ocamllex and ocamllex.opt target did not depend on
anything, whereas they did on Unix. The dependencies have been kept as
they were under Unix to make sure no constraint is lost.
However the dependencies between ocamllex and ocamllex.opt do not seem
very coherent either.
Before this commit, ocamlyacc.byte was installed as ocamlyacc
unconditionally and then overwritten by ocamlyacc.opt, if available.
After this commit, ocamlyacc is provided as a symlink to (or copy of)
ocamlyacc.byte only if the native code version is not available.
This commit also makes sure the man pages get installed only on Unix
systems. This is useless at the moment but will become useful once the
install rule will be shared.
If appropriate, install flexdll/flexlink.opt as
$(INSTALL_BINDIR)/flexlink$(EXE). This will not happen under Unix where
flexlink is not compiled but makes this target identical to its Windows
counterpart.
This commit replaces idioms like ``cd dir; $(MAKE) foo'' and
``cd dir && $(MAKE) foo'' by ``$(MAKE) -C dir foo''.
In Makefile.nt, the command ``$(MAKEREC) installoptopt'' has also been
replaced by ``$(MAKE) installoptopt''.
This commit affects the recipe used to generate utils/config.ml
from utils/config.mlp. It adds an expression to the sed command to
replace the %%FLEXLINK_FLAGS%% token by a value. Given that this
variable is not defined for Unix build this will have no effect, except
making the recipe identical to the one used on the Windows build system.
The recipes to build utils/config.ml from utils/config.ml in Makefile
and Makefile.nt essentially are sed invocations with several
expressions. This commit sorts the expressions in alphabetical order in
both files and also makes sure all the expressions use the same
quoting style, namely single quotes.
This has no practical effect but makes the two recipes easier to
compare.
This commit removes the line introduced by commit
59853fa694
Since the proposal to have separate variables for warning
options has been implemented, such a precaution should no longer be
necessary. Moreover, this had been implemented for the Unix build system
only, not for the Windows one.
These variables represent the C compilers ocamlc and ocamlopt should use
to compile a third-party C source file when no -cc command-line option
has been specified.
Thanks to these variables, the substitutions performed in Makefile and
Makefile.nt to generate utils/config.ml from utils/config.ml become
similar.
(The NATIVE_C_COMPILER variable is not really necessary but it has still
been introduced to preserve symetry.)
This variable is used to give a value to standard_runtime in
utils/config.ml.
Before this commit, its values were hard-coded in Makefile and
Makefile.nt, in the rules generating utils/config.ml from utils/config.mlp.
This commit gets rid of this hardcoding, to prepare the sharing of the
rules mentionned above.
This commit modifies these two behaviours:
1. ``make install'' installs libraries with profiling support only when
this makes sense.
2. On platforms that do not support profiling with gprof, the -p option of
ocamlopt produces an error message.
On such platforms, ``make install'' was installing dummy profiling
libraries and ocamlopt's -p option was silently ignored.
In addition, this commit modifies the values of the PROFILING make
variable. Before the commit it was either prof or noprof. After the
commit it is either true or false.
In the asmrun directory, the call to ranlib for libasmrunp.a has also been
removed from the install target because this command is already invoked
in the rule that builds libasmrunp.a.
ocamlc/ocamlopt -config now prints the state of profiling support
This reverts commit 8adfe15f18.
This is a temporary revert caused by Continuous Integration
failure. We'll investigate the issue and merge again when it is fixed.
This commit modifies these two behaviours:
1. ``make install'' installs libraries with profiling support only when
this makes sense.
2. On platforms that do not support profiling with gprof, the -p option of
ocamlopt produces an error message.
On such platforms, ``make install'' was installing dummy profiling
libraries and ocamlopt's -p option was silently ignored.
In addition, this commit modifies the values of the PROFILING make
variable. Before the commit it was either prof or noprof. After the
commit it is either true or false.
In the asmrun directory, the call to ranlib for libasmrunp.a has also been
removed from the install target because this command is already invoked
in the rule that builds libasmrunp.a.
ocamlc/ocamlopt -config now prints the state of profiling support
Before this commit, there was no distinction between the options
used to compile C source files coming with the OCaml distribution
and third-party C source files compiled by calling ocamlc or ocamlopt.
This commit makes it possible to use options when compiling C source
files that come with OCaml without imposing these options to the compilation
of third-party code.
More specifically, the options in the BYTECCCOMPOPTS and NATIVECCCOMPOPTS
variables are not passed to the C compiler when called by ocamlc and
ocamlopt any longer.
This commit also documents the role of each concerned variable.
In addition:
- On Unix:
* The -Wall and -Werror options are no longer passed to the C
compiler by ocamlc and ocamlopt for third-party C source files
- For the MinGW port:
* The -O option has been removed from the SHAREDCCCOMPOPTS variable
* The -Wall and -Wno-unused options are no longer passed to the C
compiler by ocamlc and ocamlopt for third-party C source files
- For the msvc port: the
* The -Ox option has been removed from the SHAREDCCCOMPOPTS variable.
* The -Wall and -Wno-unused options are no longer passed to the C
compiler by ocamlc and ocamlopt for third-party C source files
Before this commit, 'make ocamlnat' was building 'ocamlnat' without any
extension, even on Windows. The extension was added by 'make install', though.
With this commit, 'ocamlnat' is given its $(EXE) extension already
at build time.
When configured with -safe-string, the OCaml tools will default to the
safe-string mode and ignore -unsafe-string command-line arguments. This
is intended to serve two purposes:
- Facilitate the detection of packages that are not ready
for -safe-string ready. (Perhaps with some OPAM switch?)
- Enable some optimizations that assume that all linked units are
compiled with -safe-string.
Note: currently, there is no check that units compiled with an OCaml
configured without -safe-string are not linked in.
Previously, `ocamlc`, `ocamlopt`, `ocamllex`, and `ocamldep` defaulted
to the bytecode versions of the tools. However, there is normally no
advantage to the bytecode versions if the native-code versions are
available, except in unusual circumstances. Instead, install the
native-code versions without the `.opt` suffix. They are still
installed with the `.opt` suffix for backwards compatibility. Finally,
install the bytecode versions with the `.byte` suffix, and build
native-code versions of tools that are not currently built in native
code.
Also, remove some duplication in tools/Makefile.shared.
Supersedes GPR #512.
The stripping is done during bootstrap, when copying the new ocamlc, ocamllex and ocamldep to boot/. The new "stripdebug" tool performs this task.
As a consequence, comparing the new compilers with the boot/ compilers at the end of bootstrap is more complicated, since the debug section must be ignored. A new tool, "cmpbyt" in tools/, performs this comparison.
(Simon Cruanes and Gabriel Scherer)
Use one of
-color auto
-color always
-color never
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16348 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
The risk of breakage of 3rd-party libraries is too high.
There might be cleaner ways to achieve this effect, e.g. split BYTECCCOMPOPTS into BYTECCCOMPOPTS and BYTECCEXTRAWARNINGS.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/cc-optim@16337 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
and unshared default clauses in the presence of many (>= 32) non-matched
constructors.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15570 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
(Reuses results of previous computations instead of recomputing them.)
(Cherry-picked from branch backend-optim.)
Tested on amd64/linux and i386/linux.
Other back-ends compile (after assorted updates) but are untested.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14688 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Noticed that I had to bootstrap to test on ARM, so I commit a new bootstrap
compiler.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14479 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
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
(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
(Patch by Adrien Nader!)
-C doesn't work on at least openbsd's make so don't use it.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14173 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
(Patch by Adrien Nader!)
The "make clean" rules were relying on the $(ROOTDIR) variable.
However this variable is only defined when ./configure runs. This broke the
usual "make clean ; ./configure && make world.opt":
< use old trunk >
./configure # config/Makefile doesn't define ROOTDIR
make world.opt
< move to new trunk >
make clean # Fails early and doesn't clean all files
./configure # config/Makefile now defines ROOTDIR
make world.opt # This fails because of left-over files
An easy solution was to run "make clean" again after configure but this is
not how everyone does and in particular, this is not how the jenkins build
bot seem to do.
The recipes for "make clean" should never rely on values defined by
configure for this exact reason.
As a simple solution, only run the commands that rely on $(ROOTDIR) if
$(ROOTDIR) is set.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14172 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
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
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
(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
(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
(modified patch from Adrien Nader!)
Add also new comments for the new INSTALL flags.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13864 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
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
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
Is enabled by saying:
# make OCAMLBUILD_NOBOOT=yes world.opt
currently just works for bytecode only.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13189 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
- 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
otherlibs/labltk: toplevellib.cma is no more, use the new compilerlibs/*.cma stuff instead
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12471 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
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