Commit Graph

1236 Commits (master)

Author SHA1 Message Date
François Bobot da3f9f34f5 Use reraise_raw_backtrace in Misc.try_finally
And add labels ~always for previous cleanup function and
    ~exceptionally for new cleanup function in exceptional case
2018-07-25 17:58:32 +02:00
Florian Angeletti 4be6cafcc3
manual, code example preprocessor : full conversion to compiler-libs (#1863)
* manual tools: use toploop directly in caml_tex2
* manual tool: improved error messages
* manual: always print errors and warnings
* fix nefarious interaction with GPR#1120
* move manual/tools/caml_tex2 to tools/caml_tex
* Basic text for caml-tex
2018-07-25 10:38:08 +02:00
Sébastien Hinderer cc2b15ee3f Fix typos in tools/ci/inria/main 2018-07-24 18:26:06 +02:00
Nicolás Ojeda Bär 84bc3621b4 Build tools with debugging information 2018-07-24 13:39:39 +02:00
Gabriel Radanne 1be47bf7ab Just some tbl things. (#1699) 2018-07-23 13:19:41 +01:00
Gabriel Scherer dca053d6e7
Merge pull request #1906 from sliquister/doutput-prepare
Minor cleanup around printing in the compiler (warnings, errors, etc)
2018-07-17 11:44:47 +02:00
Thomas Refis 369ea5f432 allow exceptions under or-patterns 2018-07-16 10:41:55 +01:00
Valentin Gatien-Baron 3d0299a185 Create warning 64, for uses of -unsafe with a -pp that returns a marshalled ast
Instead of the current print to stderr. This way it's treated the same
as other warnings: it has a position, colors, can be made an error,
disabled, goes in the expected formatter, is documented.
2018-07-15 15:08:38 -04:00
whitequark 1ebc9f5a4c Remove the Sort module. (PR7812)
It has been deprecated since 2000, shown a deprecation warning
since 4.02, and Sort.merge is documented to have undefined behavior
when the lists being merged are not sorted in the first place.
2018-07-13 16:04:49 +02:00
David Allsopp e41dec72e4 Finally use the correct commit range for check-typo 2018-07-11 20:00:57 +01:00
David Allsopp 0c9c50b134 Restore check-typo... 2018-07-11 19:38:14 +01:00
David Allsopp 60481d0d4b (Hopefully) restore Travis trunk tests 2018-07-11 19:34:48 +01:00
David Allsopp 30763b5754 Correct commit deepening test on Travis. 2018-07-11 15:23:37 +01:00
David Allsopp 1931276ab7 Work-around stale TRAVIS_COMMIT variable
There seem to be occasions when rebuilding PRs where the TRAVIS_COMMIT
variable (which should be the SHA of the merge commit) is out-of-date.
When this happens, and the commit referred to does not exist, update
TRAVIS_COMMIT to be FETCH_HEAD as retrieved from GitHub instead.
2018-07-11 11:42:38 +01:00
David Allsopp 0c5719347d Deepen the Git clone on Travis for old PRs
If a PR is based on an older commit, the Travis default clone of 50
commits for the target branch may not be sufficient to compute the
merge-base.
2018-07-11 11:20:50 +01:00
David Allsopp 968a41f6fb More debugging info in Travis 2018-07-11 10:34:36 +01:00
David Allsopp 6f3ae41e29 Fix error in githook when no files in index
For example, when amending a commit message.
2018-07-04 11:51:34 +02:00
David Allsopp 4f6e89527e Use version number in the Git pre-commit hook
Otherwise it'll get irritating when working with older-based branches.
2018-07-04 11:51:34 +02:00
David Allsopp 8ac6fab4a8 Tweak Travis script invocation
Display TRAVIS_COMMIT information and move the set -x into the script
(after the echoing of status variables).
2018-07-04 09:54:04 +01:00
David Allsopp 9b44db6997 Wrong range used for Travis check-typo test
Travis was incorrectly reading the files to run through check-typo from
just the tip commit of the PR branch, instead of the entire commit
range (wrong parameter number).
2018-07-03 13:07:06 +01:00
David Allsopp 0250de3cce Simplify f395dfc
No need for a third parameter - all the reads should take place from the
merge commit on a PR.
2018-07-03 13:07:06 +01:00
David Allsopp f395dfc96b Run check-typo over merge commit
When checking an entire branch, check-typo was reading files from the
tip of the pull request branch, which is only correct if the branch is
based on trunk - it should read from the merge commit instead.

This affects branches based on older trunk before check-typo compliance
was enforced, since it can cause now-corrected check-typo violations to
re-appear.
2018-07-02 11:32:49 +02:00
Nicolás Ojeda Bär 396ede46f8 check-typo: escape slash in awk character range for greater compatibility 2018-07-01 17:19:25 +02:00
David Allsopp bc3deddbb2 Ensure check-typo exits with an error
Not just with the exit status of the last file.
2018-07-01 08:20:10 +01:00
David Allsopp 38caf1cc97 Prefix calls to check-typo with ./
This ensures that check-typo's default rules are picked up!
2018-06-30 17:41:48 +01:00
David Allsopp 3f8c68b9d4 Allow for ocaml-typo=prune 2018-06-30 16:54:47 +01:00
David Allsopp 5af8d6d946 Don't test deleted files 2018-06-30 16:46:59 +01:00
David Allsopp 225d57883d Run check-typo in Inria extra-checks 2018-06-30 16:43:34 +01:00
David Allsopp f1815fe487 Upgrade warning for githook 2018-06-30 16:43:34 +01:00
David Allsopp c48645626a Don't check individual GPR commits 2018-06-30 16:43:34 +01:00
David Allsopp 7e2331da1e Travis sanity checks should use PR commits
TRAVIS_COMMIT_RANGE is not correct unless a PR is based on the tip of
the target branch - it will include commits being merged from the target
branch as well.

The check-typo, changes and tests builds now use
$TRAVIS_BRANCH..$TRAVIS_PULL_REQUEST_SHA which gives the precise range
of commits included in the pull request (i.e. the author's) only.
2018-06-30 16:43:34 +01:00
David Allsopp 54402920b7 Run tools/check-typo in Travis CI 2018-06-30 16:43:34 +01:00
David Allsopp 772b052312 Allow tools/check-typo to work with Ubuntu 12.4.5 2018-06-30 16:43:34 +01:00
David Allsopp db4e919878 Allow tools/check-typo to analyse non-HEAD commits
Three alterations to tools/check-typo:

1. Binary check may be on any commit where the default is HEAD
2. .gitattributes may be read from any commit, rather than just the
   working tree
3. Detection of files under version control may be relative to a
   specific commit, rather than relying on git ls-files
2018-06-30 16:43:34 +01:00
David Allsopp 546dd121cb Supply a Git pre-commit hook for tools/check-typo
Automatically runs tools/check-typo and rejects the commit if they don't
pass.
2018-06-30 16:43:32 +01:00
Sébastien Hinderer d3e73595e5 Merge the asmrun and byterun directories into the runtime directory 2018-06-28 17:50:33 +02:00
Xavier Clerc 9c182f7e24 Add -dcamlprimc + pass -fdebug-prefix-map when available (#1845)
- Introduce `-dcamlprimc`, to keep the generated C file containing the primitive list
- Use `-fdebug-prefix-map` for compiling temporary C files when this option is supported
2018-06-27 14:56:29 +01:00
Gabriel Scherer f3aca2376f
Merge pull request #1821 from gasche/makefiles-consistent-opt-targets
Makefiles: consistently offer `allopt` and `opt.opt` targets
2018-06-24 00:46:50 +02:00
Sébastien Hinderer 85fa27f7e9 Rename C compiler related build variables
This commit renames a few C compiler related build variables so that
they are reserved for the build system. They will then be re-introduced,
but this time as user varialbes whose value can be freely customized
when compiling the package, without risking to conflict with those
command-line flags that are required by the build system itself.

Here are the variables this commit renames:

- CFLAGS -> OC_CFLAGS
- CPPFLAGS -> OC_CPPFLAGS
- LDFLAGS -> OC_LDFLAGS

Note: before this commit the compilation of scheduler.c in
otherlibs/threads was relying on make's implicit rule to compile C files.

Since this commit stops using the standard variables for flags,
it is necessary to introduce an explicit rule to compile C files
and that makes use of the newly introduced variables.
2018-06-20 14:01:42 +02:00
poechsel 71d0d57d8d ocamloptp: fix wrong name for -inline-max-unroll option (#1843)
When using ocamlopt with the argument -inline-max-unroll, ocamloptp would pass it as -unroll to ocamlopt, thus leading to an error.
2018-06-20 12:03:10 +02:00
David Allsopp b5d1929e87 Whitespace and overlong line fixes. 2018-06-14 15:15:34 +01:00
David Allsopp 4c3c7fda25 Break long lines in Inria CI scripts
It's tricky to do this elegantly in sh, sadly...
2018-06-13 09:37:49 +01:00
David Allsopp 6885aeeedb Validate the encoding of files marked UTF-8
tools/check-typo validates the encoding of any file with ocaml-typo=utf8
and will not proceed if the test fails.
2018-06-11 22:53:47 +01:00
David Allsopp 7a7c156d3f Add utf8 rule to tools/check-typo
The utf8 rule allows UTF-8 sequences anywhere in a file and line-length
calculations take this into account.
2018-06-11 22:53:47 +01:00
David Allsopp 91a91aea2d Build check_all_arches on AppVeyor too 2018-06-11 22:52:00 +01:00
David Allsopp fb5c3683ad Build and test debug runtime on AppVeyor 2018-06-09 10:01:58 +01:00
Sébastien Hinderer 4de595e373 Inria CI extra-checks: remove left-over from commit 12aa0caf5a 2018-06-08 15:08:53 +02:00
Gabriel Scherer a1bc562d8a makefiles: consistently offer *both* 'allopt' and 'opt.opt' targets
Some makefiles (lex, stdlib, otherlibs) would only offer allopt, while
others (ocamldoc, tools) only offered opt.opt. It is inconvenient to
have to remember which target name to use while going through various
repositories.
2018-06-07 09:54:13 +02:00
Sébastien Hinderer 3e085186a7 Add script to test the bootstrap on Inria's CI 2018-06-06 11:59:54 +02:00
Sébastien Hinderer 69944e9e73 Remove CI scrippts from tools
Now that the CI scripts have been moved also on the 4.07 branch and that the
Jenkins jobs have been updated to call the scripts from their new locations,
get rid of the legacy ones.
2018-06-05 16:42:14 +02:00
Dwight Guth 6a06a1123a add advanced option to tune performance of pattern matching compiler in case of exponential blowup 2018-06-01 23:51:56 +02:00
Sébastien Hinderer b2240b9878 Make sure the make_opcode tool is run using byterun/ocamlrun
This tool is used to compile ocamlc. Given that make_opcodes is itself
recompiled as part of the bootstrap process, it needs to be run on the new
(rather than old) runtime. In other words, make_opcodes needs to be run
using byterun/ocamlrun rather than boot/ocamlrun.

This commit fixes this.
2018-05-31 14:35:57 +02:00
Sébastien Hinderer 12aa0caf5a Inria CI: extra-checks job improvement
Use the new SKIP_TESTS mechanism to skip the stackoverflow test
rather than modifying the header files.
2018-05-29 09:59:17 +02:00
Sébastien Hinderer a6fd97312e Inria CI: skip a few tests in the extra-checks job 2018-05-28 22:01:00 +02:00
Xavier Leroy 16b01bd98f Make CI script inria/extra-checks executable 2018-05-27 10:37:12 +02:00
Xavier Leroy a9aa1d2983 CI testing with "sanitizers" applied to the C code
This CI script builds and tests the system using Clang and GCC
"sanitizers" to perform additional run-time checks on the C code,
e.g. out-of-bound memory accesses.

Currently, we use the Address, Undefined Behavior and Thread sanitizers.
The Memory sanitizer (reads from uninitialized memory) doesn't quite
work and is commented out in the script.
2018-05-27 09:36:44 +02:00
Sébastien Hinderer a9186772fe Inria CI main job fix
This commit stops enabling the instrumented and debug runtime at
configure time. Given that they are now enabled by default this is
no longer necessary.
2018-05-25 14:55:15 +02:00
Sébastien Hinderer a2586680a0 Remove the Makefile.nt files 2018-05-25 00:36:56 +02:00
Sébastien Hinderer e3f792a14b Fix CI script filenames
This is a follow-up to GPR#1796
2018-05-24 09:40:10 +02:00
Sébastien Hinderer 8ab50ec1e3 Move the CI-related scripts to dedicated directories 2018-05-24 09:18:56 +02:00
Xavier Leroy 4adae1b9bd Add parallelism and "runtime cleanup" configuration
* Test memory-cleanup-at-exit runtime mode (OCAMLRUNPARAM="c=1")
* Run with -j8 because we have plenty of cores on the test machine
2018-05-23 20:40:06 +02:00
Mark Shinwell 8054e4f819 Add configure option to not install ".byte" executables (#1776)
In environments where the executables compiled to native code,
such as ocamlopt.opt, are always used in preference to the bytecode
versions then space can be saved by not installing the latter.
This patch provides a configure option to do such. It is relatively lightly
engineered; in particular, it won't complain if the native code executables
aren't themselves being built; but given this is an option for knowledgeable
users we think that it is reasonable.
2018-05-14 10:44:01 +02:00
Mark Shinwell ea2d6a1e31
Add configure options to control installation of source artifacts (#1777) 2018-05-14 08:15:44 +01:00
Gabriel Scherer 559206b4e0 ocamlc -config: new -config-var option to print specific configuration variables
The proposed behavior of `-config-var s` is as follows:
- if `s` is an existing configuration variable, print its value as
  a string and exit with a success return value (0)
- if `s` is not an existing configuration variable, print nothing
  and exit with a failure return value (non-0)

Note that we do not print a newline after the value of the
configuration variable. In particular, if the value is an empty
string, the output is undistinguishable from the output for
non-existing variables, the return value has to be considered instead.

The following alternative behaviors were considered:

- We could print a newline after the configuration value, which
  would let users distinguish empty values from non-existing variables
  by counting the lines of output, and would also be more pleasant for
  users invoking the option from the command-line. However, the way
  bash works on Windows means that $(ocamlc -config-var foo) would keep
  a trailing \r in its output, and portable scripts would have to use
  $(ocamlc -config-var foo | tr -d '\r') instead, which is a pain.
  (This issue was pointed out by David Allsopp)

- We could print a message on the error output if the configuration
  variable does not exist. This is clearer to a human user, but it is
  annoying for scripts if they forget to silence the error output and
  get their output mixed with our error messages. The main use of this
  new feature is for scripting purposes.
2018-04-27 19:54:08 +02:00
Nicolás Ojeda Bär 5f38a63b2a tools/make-version-header.sh: fix minor version extraction
bash considers sequences of integers starting with zero to be octal, so e.g. a
$minor value of "08" will be taken as an (illegal) octal number, causing an
error.

To fix this, we drop any leading zero when extracting the minor version.
2018-04-11 10:07:34 +02:00
Leo White bc9f032e2a Reduce cmx sizes by sharing variable names (#1627) 2018-04-09 08:43:47 +01:00
Damien Doligez d42422a0cf Revert "Continuation of GPR#1580 (022051e7bd): bootstrap to remove Lambda.Const_pointer"
This reverts commit b4fa820b78.
2018-04-06 16:09:53 +02:00
Pierre Chambart 0a42259060 Turn flambda invariants checks off by default (#1686) 2018-04-06 09:49:57 +01:00
Sébastien Hinderer e84965c839 ocamlobjinfo: make sure -null-crc is taken into account everywhere 2018-04-05 23:05:12 +02:00
Sébastien Hinderer c20b26178d Rename and slightly modify ocamlobjinfo's -no-crc command-line option
Instead of printing no CRC at all, this option should rather preserve the
distinction between no CRC at all (represented by a dummy CRC
consisting of 32 '-' characters) and a real CRC represented by a
null CRC consisting of 32 '0' characters.

This commit thus renames the option from -no-crc to -null-crc.
2018-04-05 19:17:18 +02:00
Sébastien Hinderer 4a26e8047d ocamlobjinfo: add the -no-crc command-line option
When this option is used, the CRCs of ipmported interfaces are not
displayed. This is useful e.g. in the testsuite.
2018-04-05 14:24:12 +02:00
Gabriel Scherer 3702f53692 factorize common makefile definitions in Makefile.common 2018-03-29 17:04:05 +02:00
Gabriel Scherer afcd29eb0c makefiles: turn the 'install' command into a variable
(Suggestion made by Sébastien Hinderer during review.)
2018-03-29 14:40:23 +02:00
Gabriel Scherer ecfd39f127 makefiles: use 'install' instead of 'cp' in 'make install' targets
I can observe weird performance bottlenecks on my machine caused by
the use of 'cp' in the 'install' scripts of OCaml. When installing
into a directory that is already populated by an existing
installation, 'make install' can routinely take 10s on my machine¹. After this
change it reliably takes 1.5s, independently of whether the
destination is already populated or not.

¹: a brtfs filesystem on an old-ish SSD

Why I care
----------

An extra 10s delay due to 'make install' can be noticeable in tight
change-build-install-test feedback loops for a compiler change where
we change the compiler, have a fast 'make world.opt' due to
incremental builds, install the change and test it -- possibly after
installing a couple opam packages, which can be fairly quick.

Partial diagnosis
-----------------

The performance issue seems to be caused by the fact that 'cp' (at
least the GNU coreutils version), when the file already exists,
replaces it by opening it in writeonly+truncate mode and writing the
file content ('strace' shows that the delay is caused within an
'openat' call). In particular, using the --remove-destination option
(which changes 'cp' to just remove the destination file before
copying) removes the performance issue, but this option seems missing
from the BSD/OSX 'cp' so it could cause portability issue.

Change
------

The present commit rewrites the 'install' targets of all Makefiles to
use the 'install' command instead. 'install' by default gives
executable-like permission to the destination file, instead of reusing
the source file's permissions, so we specify manually the permission
modes, depending on whether the installed file is an executable (or
dynamically-linked library) or just data (including other compiled
object files).

Testing
-------

I checked manually that the permissions of the installed files are
identical to the ones of the current 'cp'-using targets, except for
some '.mli' file in middle_end which currently have +x bits enabled
for no good reason.

Remark: To test this, playing with the DESTDIR variable is very useful
(this lets you install to a new directory (or the same as before)
without having to re-run the configure script). I used the following,
fairly slow shell script to collect permissions:

    for f in $(find $DESTDIR); do \
      echo $(basename $f) $(ls -l $f | cut -d' ' -f1); \
    done | sort

Remark: it is important to run `sync` in-between 'make install' runs
to avoid timing effects due to filesystem or disk caching
strategies. I believe that this corresponds to the natural time delay
(and unrelated disk activity) that would occur in realistic
change-install-test feedback loops.
2018-03-29 14:40:22 +02:00
Sébastien Hinderer 94fbfe2e79 Fix name of ocamltest program in tools/ci-build 2018-03-16 07:40:58 +01:00
Hugo Heuzard ad6304d7ec Rename instructions GET/SETSTRINGCHAR -> GET/SETBYTESCHAR 2018-03-15 18:25:31 +01:00
Hugo Heuzard 1c233b6b69 Add bytecode instruction to access string, different from the bytes one. 2018-03-15 18:25:31 +01:00
Mark Shinwell b4fa820b78 Continuation of GPR#1580 (022051e7bd): bootstrap to remove Lambda.Const_pointer 2018-03-15 10:12:13 +00:00
Sébastien Hinderer ef96890adb ci-build improvements
This commit contains two improvements to the cleanup done by ci-build on
Windows machines:

1. When a task is killed, also kill its subtasks (taskkill's /t option).

2. Add ocamltest.byte and ocamltest.opt to the list of tasks to kill.
2018-03-08 16:11:31 +01:00
Gabriel Scherer 0489cfaf9e build_path_prefix_map: update .depend and Makefiles 2018-03-01 17:41:28 +01:00
Sébastien Hinderer fa7019437c Add the -dunique-ids and -dno-unique-ids options to the compilers
These options allow to control whether identifiers are made unique by
appending a stamp to them when dumping intermediate representations or not.

The default is to print the stamp, as is done currently.

The "-dno-unique-ids" option is useful e.g. to simplify the comparison
between a produced intermediate reprsentation (-dlambda, say) and the
expected one, in the context of the testsuite, for instance.
2018-02-20 18:02:35 +01:00
Gabriel Scherer cc5b7ef6be make alldepend 2018-02-05 19:30:48 +01:00
David Allsopp cd86b6fb88 Add reference to Cygwin64 rebase issue in flexlink 2018-01-11 14:05:08 +00:00
Sébastien Hinderer b41a4c3090 Also test -no-flat-float-array on Inria's CI
The test is done by the other-configs job
2017-12-13 15:15:55 +01:00
Sébastien Hinderer 7ab1656e0f tools/ci-build-other-configs should stop on errors 2017-12-13 15:10:55 +01:00
Gabriel Scherer 3882302fa6
Merge pull request #1434 from damiendoligez/makefile-cleanup
Makefile cleanup
2017-12-10 17:14:12 +01:00
Gabriel Scherer cfac8525ab fix minor bug in tools/check-symbol-names
(cherry picked from commit d609dc57f8c863d613250e506f39fefe6674100a)
2017-11-10 17:21:56 +01:00
David Allsopp bfff8f9251 Warn if a file contains UTF-8 and Latin-1
Add a new warning non-ascii-utf8 displayed only if the non-ascii
attribute is specified and UTF-8 characters were ignored in the
copyright or authors lines in the header.
2017-10-25 23:54:39 +01:00
David Allsopp 49723e5fd4 Ignore very long URLs in tools/check-typo
This is only to allow for a few specific instances, so for the time
being implemented for long-long and not very-long-line.
2017-10-25 23:54:39 +01:00
David Allsopp 29f80504ad Add missing copyright header 2017-10-25 23:54:39 +01:00
David Allsopp 965a9d6f6f Correct copyright header 2017-10-25 23:54:39 +01:00
David Allsopp 3ab069cedf Correct licence for tools/make_opcodes.mll
Incorrectly copied from an old QPL header.
2017-10-25 23:54:39 +01:00
David Allsopp 96bc6522ce Permit UTF-8 characters in copyright and authors
Allows names to include accented characters, but only in a comment.
2017-10-25 23:54:39 +01:00
Damien Doligez af78f02368 take some reviewers' remarks into account 2017-10-19 17:15:52 +02:00
Damien Doligez 41ee22b842 ci-build: remove now-redundant `make coldstart` 2017-10-18 17:32:09 +02:00
Sébastien Hinderer 715fbc49c6 Introduce tools/ci-build-other-configs
Inria's CI uses an "other-configs" job to test various, less
widespread configurations of the OCaml compiler.

Before this commit, the list of configurations to test was part of the
configuration of the Jenkins job itself, making it impossible to
have branch-specific configurations.
This commit introduces the tools/ci-build-other-configs script, which
can vary from branch to branch.

The job's configuration has been updated to execute the script when
it exists and to fallback to the former, built-in list of
configurations on the branches where this script is not present.
2017-10-03 14:24:43 +02:00
Xavier Leroy 5741d2fda3 Use the new "make parallel" mode for the test suite if -j option given 2017-09-23 11:38:58 +02:00
Damien Doligez f086eda9c0 add -no-flat-float-array configure option 2017-09-15 18:24:36 +02:00
Mark Shinwell b65096678b Register availability analysis (#856) 2017-09-15 11:08:14 +01:00
Xavier Leroy 5701b299d0 ci-build: add support for parallel make
OCAML_JOBS environment variable and "-j" command-line option.

Also: document the interesting environment variables.
2017-09-10 11:19:45 +02:00
Xavier Leroy 0eb129e276 ci-build: be nice to other users and run at lower priority 2017-09-10 11:12:27 +02:00
Xavier Leroy 76f5f62dda ci-build: silence the make distclean
This saves several hundred lines of noise in the build logs and make them easier to analyze.
2017-09-10 11:07:24 +02:00
Damien Doligez 19f435dc54 cygwin CI: rebase to avoid fork problems 2017-09-05 01:08:35 +02:00
Alain Frisch 7eba1178ea Remove spurious semicolons after non-unit expressions (#1305) 2017-08-29 15:14:50 +01:00
David Allsopp a0325185b7 Allow -l option to ocamlmklib on MSVC ports (#1189) 2017-08-14 07:10:31 +01:00
Alain Frisch fd47ba9649 Support 'let open' in class and class type expressions (#1249)
* Support 'let open' in class and class type expressions.

* Adapt ocamlprof.

* Adapt ocamldoc.

* Add tests.

* Changelog.

* Manual.
2017-07-20 08:17:30 +02:00
sliquister 3f76c0525b generalize -dtimings to show allocation, top heap size (#1152) 2017-06-09 12:29:21 +01:00
Fabrice Le Fessant 8daa184d95 New -depend option for ocamlc/ocamlopt 2017-06-01 15:56:30 +02:00
Fabrice Le Fessant fb2a4421a6 Fix tools/read_cmt (#1036)
Install tools/read_cmt as ocamlcmt
* Add option -save-cmt-info to add more info in .annot files
* Provide more annotations
* Add option -I <dir> to find .cmi files
2017-05-11 13:56:19 +02:00
Sébastien Hinderer a9f31f0f0c On CI, check that 'make alldepend' works only if native compiler si built 2017-04-28 15:56:08 +02:00
Sébastien Hinderer 1a30ec8cc0 Fix tools/ci-build
No spaces allowed in varialbe assignments.
2017-04-28 10:58:15 +02:00
Sébastien Hinderer 255720556f Simplify installation of OCaml header (.h) files
The tools/cleanup-header script has no effect any more, so stop
calling it during make install and remove it from the repository.
2017-04-26 19:28:17 +02:00
Sébastien Hinderer 40fcbb5f0a Move configuration header files from the config to the byterun/caml directory
This commit moves:
  - config/m.h to byterun/caml/m.h
  - config/s.h to byterun/caml/s.h

Consequently, m.h and s.h now get installed alongside other
OCaml header files.

This commit also updates the .depend files, introducing updates in the
dependencies which are not consequences of this commit itself.
2017-04-26 19:28:17 +02:00
Sébastien Hinderer c8103128c1 Let CI check that 'make alldepend' still works.
This is done on a few slaves only.
2017-04-26 18:37:35 +02:00
Sébastien Hinderer 67276a09af tools/ci-build: install to a different directory for each build
This commit ensures the install directory will be distinct for each build,
with the two following motivations:

1. If required, it will make it possible to have several builds running
concurrently on the same slave without conflicts between their make install

2. So far, if for any reason make install fails, then the build script
gets stopped and the install directory will not be removed.
Thus if a future build tries to install to the same directory, its
installation could in principle fail, not because it is broken but because
the previous build has left the install directory in a corrupted state.

So this commit ensures that make install will be done in an empty
directory.
2017-04-26 11:49:33 +02:00
Sébastien Hinderer 023f3e3fa2 tools/ci-build: honor instdir on non-configure builds
The instdir environment variable is used by ci-build to define where
make install should install the compiler. Before this commit, a value was
assigned to instdir for the Windows builds that do not use configure,
but then this value was not taken into account, making the assignments useless
for those builds that do not use configure.

This commit fixes this by using instdir to override the value of PREFIX
in config/Makefile.
2017-04-26 11:41:36 +02:00
Sébastien Hinderer 1918a6fed2 Fix Windows installation directory in tools/ci-build
This commit sets the installation directory for the Windows build to the
same value as in the config/Makefile.m* files.

So, in itself this commit is a no-op. It however introduces the next one
which will ensure ci-build's instdir setting is honored even for
the builds that do not use configure.
2017-04-26 10:29:09 +02:00
Sébastien Hinderer 7d6a661471 Replace legacy CI build script by new one
Since there are no jobs left on Inria's CI that use the legacy
ci-build script, replace it by the new one.
2017-04-18 16:23:44 +02:00
Sébastien Hinderer 24b028c1fc Add support for building and testing with flambda to the new CI script
If the flambda environment variable is set to true, the feature is
enabled in the build system.
2017-04-14 19:27:03 +02:00
Sébastien Hinderer 878508c6ba On Linux, also build the instrumented runtime during CI 2017-04-14 19:15:28 +02:00
Sébastien Hinderer fdc63806c3 In the new CI script, enable build of runtime with debugging support
This is done by passing the -with-debug-runtime option to the configure
script on the non-Windows systems.

On Windows, a sed invocation is used to set RUNTIMED to true in
config/Makefile.
2017-04-14 18:53:34 +02:00
Sébastien Hinderer d847e077e8 Add a new simpler CI build script
This script is used on Inria's infrastructure

Once all Inria CI jobs will use this script, it will replace the
legacy one.
2017-04-14 15:55:31 +02:00
Sébastien Hinderer d96f81177d Integrate the cleanup of remaining Windows processes to ci-build
So far, the cleanup of processes on the windows nodes of Inria's CI was
done in a .bat file called by the Windows jobs.

This commit integrates this process cleanup into ci-build.
2017-04-13 14:46:20 +02:00
David Allsopp 0301576685 Fix \r problems on recent Cygwins
The Cygwin packages for awk, grep and sed were updated on 20 February
2017 so that they no longer automatically strip \r characters on binary
mounts. This affects the OCaml build system in a few places, requiring
the addition of a few tr calls.

References:
  * https://cygwin.com/ml/cygwin/2017-02/msg00152.html
  * https://cygwin.com/ml/cygwin/2017-02/msg00189.html
  * https://cygwin.com/ml/cygwin/2017-02/msg00188.html
2017-04-13 14:17:28 +02:00
David Allsopp 65fd726329 Install bootstrapped FlexDLL objects to flexdll/
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.
2017-04-09 19:00:06 +02:00
Sébastien Hinderer 3564aade19 Introduce and use the OUTPUTEXE and OUTPUTOBJ build variables 2017-03-29 11:10:06 +02:00
Sébastien Hinderer f2d5d60376 Define new build variables for C compiler and preprocessor flags 2017-03-29 11:10:06 +02:00
Sébastien Hinderer cc7ad5650a Get rid of BYTECC and NATIVECC
Use the same C compiler, CC, in all the build system.
2017-03-29 11:10:06 +02:00
Sébastien Hinderer 1effaeb058 Use only one variable for rpath
Before this commit there was BYTECCRPATH and NATIVECCRPATH, but they
were actually identical to each other.

This commit gets rid of them and uses the RPATH variable.
2017-03-29 11:10:05 +02:00
Damien Doligez f9c6cef483 use `git clean` in ci-build script (see GPR#1067) 2017-03-27 15:54:56 +02:00
Xavier Leroy 17fc532c74 Remove dependencies from objinfo_helper to OCaml runtime (continued)
Removal in commit 2c3a9d3 was too brutal, "config/s.h" must be included so that HAS_BFD is seen.
2017-03-21 15:46:58 +01:00
Sébastien Hinderer 9e81b0fb4b Update .depend files 2017-03-09 17:12:02 +01:00
sliquister 356d8a9c0c Changing the display of fatal warnings (#948) 2017-03-08 09:16:01 +00:00
Stephen Dolan 0c61ce8d5c Fix some globally-visible names, and add a tool for them (#973) 2017-03-07 08:21:41 +00:00
Fabrice Le Fessant b7b0a64d33 ocamldep: add -plugin and use compilerlibs to build (#1015)
* ocamldep: add -plugin argument, and use compilerlibs to build
2017-03-02 16:45:58 +01:00
Xavier Leroy cfb0715075 Remove dependencies from objinfo_helper to OCaml runtime
This is cleaner and should address PR#7407 item 3.
2017-02-23 16:39:01 +01:00
Nicolas Ojeda Bar e75c87dc48 Initial import of linear-scan-register-allocator
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.
2017-02-22 17:09:18 +01:00
Gabriel Scherer 4f46291fa3 Merge pull request #916 from edwintorok/add-missing-since-annots
Add missing @since annotations for 4.00 .. 4.05
2017-02-21 13:27:39 -05:00
Török Edwin d1cd849d3f Documentation tool: add tools/lintapidiff.ml
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.
2017-02-21 17:13:38 +02:00
Damien Doligez 922aafb357 undo 13c8c60f39 on tools/ci-build because this script is still used by CI on 4.04 2017-02-20 15:36:22 +01:00
Xavier Leroy 141ac5408d Merge branch 'trunk' into liberal-cr 2017-02-19 12:27:15 +01:00
octachron f59fb0e640 -shared option for ocamldep 2017-02-17 11:54:06 +01:00
David Allsopp fffde17d52 Make ocamlyacc and make_opcodes ignore \r on Unix
ocamlyacc doesn't correctly handle \r on Unix meaning that long strings
with escaped newlines cause unterminated string warnings.

Similarly, the make_opcodes script in the build system cannot cope with
a CRLF checkout of the header files.
2017-02-15 13:02:11 +00:00
Sébastien Hinderer 13c8c60f39 Update documentation and scripts to use Makefile even on Windows 2017-02-15 11:19:07 +01:00
David Allsopp 080992e951 Ensure tools/make_opcodes is cleaned 2017-01-27 15:58:57 +01:00
Nicolas Ojeda Bar 77dba7758e Add make_opcodes 2016-12-29 08:22:37 +05:30
Damien Doligez afbd5a389a ci golf, second shot 2016-12-19 17:42:48 +01:00
Damien Doligez 4b76b3b8a6 A variant of CI golf: ci-build-script golf. Try to make the CI build work in the directory checked out by Jenkins, even for Windows (with CRLF line endings).
Also adapt to the new unified Makefiles (where Makefile.nt is gone).
2016-12-19 17:02:06 +01:00
Stephane Glondu 7c6c1f3624 objinfo: dump globals defined in bytecode executables 2016-12-14 08:44:55 -05:00
David Allsopp d168db2c78 make alldepend 2016-12-14 13:14:21 +00:00
David Allsopp 3ca5838d58 Clean stray .manifest file
Removing tools/ocamlobjinfo_helper.exe.manifest got lost in GPR#812.
2016-12-14 13:14:21 +00:00
Pierre Chambart 8703a360d5 Fix lack of link error when missing modules providing externals (#837, PR#7371)
* Check that all the required modules are provided
   Also remove provided cmo from the required globals
* Remove required globals from packs when provided
* Remove provided globals after adding required ones
   Pack modules can require globals they provide.
* Dumpobj tool can print relocation information
2016-12-14 13:14:21 +00:00
aalekseyev cf19debb3e Make "-open" command line flag accept a module path (#960)
* Make "-open" command line flag accept a module path
2016-12-09 08:27:06 -05:00
Damien Doligez 17ac0906c7 fix syntax error in a447ffc 2016-12-07 16:09:07 +01:00
Damien Doligez a447ffcf5f add -no-native option to ci-build script 2016-12-07 16:03:38 +01:00
Stephen Dolan a35c6117e6 Instrumentation for american fuzzy lop (afl-fuzz) (#504) 2016-12-06 17:18:04 +01:00
hendriktews 0bb16e0934 improve installation of additional material (#827)
- install missing mli and cmti files for compiler-libs and otherlibs
- new make target install-compiler-sources to install compiler-libs ml files
2016-10-21 16:40:14 +02:00
Mark Shinwell 2da2fcdb66 Annotate Texp_function with an Ident.t for the parameter (#831) 2016-10-14 09:34:50 +01:00
Bernhard Schommer 3396620162
Added responsefile support for various tools.
Now also the tools dumpobj, objinfo, ocamlprof, primreq and
read_cmt accept response files.
2016-10-12 13:47:27 +02:00
Bernhard Schommer 62335624a9
Added simple parse_expand and support ocamldep
The parse_expand function does the same as parse and parse_dynamic
but allows Expand. However it does not update current to avoid
the problem that the array is modified.

This function is used for the ocamlopt, ocamlc, ocamlcp,
ocamloptp and ocamldep.
2016-10-12 09:30:54 +02:00
Bernhard Schommer bfd7e12dff
Trim CR, remove inw parameter and updated docu.
The read_aux function trims the cr character for the new-line
based method and the write functions are simplified without an
additional sep function.

The argument names are changed to match the default naming format
and the documentation is updated to match the implementation
behavior.

Also two new tests for reading and writing empty command lines as
well as a command lines containing empty arguments are added.
2016-10-11 18:50:01 +02:00
Bernhard Schommer 94715ddc87
Added -arg/-args0 to compiler cmd arguments
The -arg/-args0 switch allow it to pass additional command line
arguments in files newline/NUL separated.
2016-10-10 13:09:21 +02:00
Pierre Chambart facfb6426d Fix ocamlobjinfo for flambda (#809)
* Fix printing of export_info MPR#7294

The printing function now requires a list of root symbols

* Add an option to hide some information in objinfo
2016-09-28 12:33:52 +02:00
Sébastien Hinderer f642ba7b22 Merge build systems in the tools subdirectory (#812) (#812)
In essence, this commit does three things:

1. Move the content of Makefile.shared to the main Makefile

2. Modify the include directive in Makefile.nt accordingly

3. Move the Windows-specific definition of CAMLOPT from Makefile.nt
to Makefile and make sure it is evaluated only under Windows.
2016-09-16 09:35:29 +02:00
Andreas Hauptmann 7bc893a564 fix quoting inside ocamlmktop (win32) (#771) 2016-08-19 17:32:24 +01:00
Damien Doligez 5c92adac93 tweak ci-build script to prevent bootstrapped files from causing trouble on "git pull" 2016-08-09 12:17:03 +02:00
Damien Doligez 02aece1030 fix CI build for Windows 2016-08-03 17:40:03 +02:00
Damien Doligez 732538af0d add a bootstrap cycle to the CI build 2016-08-03 15:24:18 +02:00
Mark Shinwell 3fbd265e8a Reinstate objinfo_helper installation (required for ocamlobjinfo) 2016-08-02 10:34:50 +01:00
Damien Doligez 0b4fbc2b30 fix whitespace, long lines, headers 2016-08-01 16:06:59 +02:00
Damien Doligez d5a6e50ebe GPR#606: add unboxed types 2016-07-21 13:51:46 +02:00
Fabrice Le Fessant f26c0ff8b6 Add plugins in the compiler 2016-07-18 17:43:05 +02:00
alainfrisch ae8e0dc352 One more use for String.split_on_char. 2016-07-11 15:23:31 +02:00
Pierre Chambart 25d24e38c2 Also remove linking hack for bytecode
Adds the required_globals information to bytecode compilation units.

This patch also bootstrap ocamlc. The cmo format is changed by this
commit, there is no way around bootstraping here. Note that ocamldep and
ocamllex does not rely on the cmo format, so they are not present in
this commit.

Changes in tests:

* Update test/transprim/comparison_table.ml.reference:
    The (opaque (global List!)) expression is not present anymore

* Update tests/no-alias-deps/aliases.cmo.reference
    The output of objinfo changed
2016-07-08 16:02:26 +02:00
Gabriel Scherer 5f1bc3ef6f Make Pparse functions type-safe
In order to remove some redundancy, the Pparse modules used a dirty
Obj.magic trick to manipulate either structure or signature values
(ASTs parsed from source files). This unsafe approach means that
programming mistakes may result in broken type soudness, and indeed
I myself had to track a very puzzling Segfault during the development
of my Menhir backend (due to a copy-paste error I was passing
Parse.implementation instead of Parse.interface somewhere). Wondering
why your parser generator seems to generate segfaulting parsers is
Not Fun.

This change means that the external interface of Pparse has changed
a bit. There is no way to fulfill the type of Pparse.file in
a type-safe way

    val file : formatter -> tool_name:string -> string ->
      (Lexing.lexbuf -> 'a) -> string -> 'a

as it promises to be able to process any ast type 'a depending on the
magic number (the last string argument). The knew type-safe interface is

    val file : formatter -> tool_name:string -> string ->
      (Lexing.lexbuf -> 'a) -> 'a ast_kind -> 'a

where ['a ast_kind] is a GADT type:

    type 'a ast_kind =
    | Structure : Parsetree.structure ast_kind
    | Signature : Parsetree.signature ast_kind
2016-06-29 21:23:28 -04:00
Sébastien Hinderer 822826b2a5 cmpbyt: return 1 rather than 2 to report file difference.
cmpbyt was returning 2 to report both an error in the way it is
called (wrong number of command-line arguments) and the fact that
its two arguments are different programs. This patch fixes this and makes
cmpbyt's behaviour similar to the one of the cmp Unix command, i.e.
returning 0 to report file similarity, 1 to report file difference
and 2 for real errors.
2016-06-20 11:01:42 +02:00
Demi Obenour d89af40f64 Install native versions of tools by default.
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.
2016-06-06 14:44:10 -04:00
Sébastien Hinderer 50147913ac Call the '#' sign hash rather than sharp. 2016-05-09 16:34:40 +02:00
Gabriel Scherer cc69cbf31c MPR#7248: have ocamldep interpret -open arguments in left-to-right order
Compilers and tools consistently assume that (_ list ref) in Cflags
are prepended to, and reverse them before usage. This one was
forgotten.
2016-05-06 12:05:16 -04:00
Demi Obenour 8c274f5106 tools/primreq: Fix build bustage due to string vs bytes (Demi Obenour) 2016-05-02 22:19:52 -04:00
Damien Doligez 520fb2df50 Merge tag 4.03.0 into trunk. 2016-04-28 16:13:21 +02:00
Alain Frisch 2c7c9b419f Merge pull request #541 from alainfrisch/ocamldep_in_core
Move depend.ml into compilerlibs (ocamlcommon).
2016-04-28 15:02:50 +02:00
David Allsopp 0f3b843ba6 tools/msvs-promote-path script
Script intended to make the compilation instructions for the Microsoft
Visual C++ Compiler ports a little simpler.

This script allows the user to start Cygwin from the appropriate Visual
Studio Command Prompt (e.g. by issuing `C:\cygwin\bin\mintty -`) and then,
from the OCaml sources directory, issue

```bash
eval `tools/msvs-promote-path`
```

This script emits an error if the Microsoft Linker cannot be found in any
of the directories in `PATH` or if the `link` command already refers to the
Microsoft Linker. If, as will usually be the default, `link` refers to the
coreutils `link` command, `PATH` is altered to move the first entry
containing the Microsoft Linker to the start of `PATH`. This has the
effect of overriding the Unix interpretation of the `link` command, but
this will never affect OCaml's build process.

This script is taken from msvs-tools
(https://github.com/metastack/msvs-tools) and re-licensed by the copyright
holder.
2016-04-26 06:59:17 -04:00
Demi Obenour fe05f8fc29 Add `-alias-deps` and `-app-funct`
This was meant for GPR #514, but I forgot to include it.
2016-04-19 12:21:09 -04:00
Demi Obenour 795a4d532d Add explicit command-line flags for currently-default settings
-no-keep-docs
    -no-keep-locs
    -no-principal
    -no-rectypes
    -no-strict-formats
2016-04-18 10:53:51 -04:00
alainfrisch c1ead896a2 Pass -slash to ocamldep so that dependencies generated from a Windows system are closer to those generated from a Unix system. 2016-04-13 17:04:15 +02:00
alainfrisch 8d9dd27cd4 Move depend.ml into compilerlibs (ocamlcommon).
This allows external tools to rely on the features provided by this module.  An example
is ocamldoc itself, which could now be implemented as an external tool.

Note that LexiFi variants of OCaml has been embedding depend.ml in the compiler for a long
time in order to support a stricter dependency mode where the compiler is only allowed to load .cmi
files corresponding to dependencies as inferred by ocamldep (hereby ensuring that ocamldep is
sound by construction).
2016-04-13 16:46:32 +02:00
David Allsopp cd729b2510 Fix faults arising from merging Makefile{,.nt}
Bootstrapping FlexDLL broken for lex and tools.
2016-04-06 19:30:56 +01:00
whitequark 5f968b00ff ocamlmktop.ml: call ocamlc adjacent to itself.
This was the behavior of the ocamlmktop shell script.
2016-03-17 23:36:48 +01:00
whitequark f1adf551d4 tools/Makefile{,.nt,.shared}: merge. 2016-03-17 23:36:42 +01:00
whitequark b08a1a2ed8 tools/ocamlmktop.tpl: remove in favor of ocamlmktop.ml. 2016-03-17 23:36:40 +01:00
Damien Doligez 15e5229fbe fix ci-build script 2016-03-16 14:06:42 +01:00
Damien Doligez a73c5d794a fix ci-build option parsing for -newmakefiles option 2016-03-16 11:58:54 +01:00
Damien Doligez 5832036716 add -newmakefiles option to ci-build script 2016-03-16 11:44:50 +01:00
Alain Frisch 803c36da12 Enable warnings and strict-formats in tools (no fix required). 2016-03-15 22:47:29 +01:00
Alain Frisch f4a29c6ca2 Merge branch '4.03_merged_in_trunk' of https://github.com/bobot/ocaml into bobot-4.03_merged_in_trunk 2016-03-15 22:09:24 +01:00
alainfrisch 43f90e9f58 Local let exceptions. 2016-03-15 22:02:55 +01:00
Alain Frisch 8a4837ef82 Update dependencies in tools/.depend (deps were missing for e.g. stripdebug). 2016-03-15 15:56:30 +01:00
François Bobot 2aec849922 Merge remote-tracking branch 'origin/4.03' into trunk
travis.yml is kept from trunk

Conflicts:
  	.depend
	Changes
	Makefile
	VERSION
	boot/ocamlc
	boot/ocamldep
	boot/ocamllex
	parsing/parser.mly
	parsing/pprintast.ml
	stdlib/hashtbl.ml
	testsuite/tests/unwind/Makefile
	tools/check-typo
2016-03-11 18:44:32 +01:00
alainfrisch c4e8117c2b Cleanup. 2016-03-10 15:34:48 +01:00
alainfrisch 3730cab2d1 Sort the list of input files alphabetically. 2016-03-10 15:33:36 +01:00
alainfrisch 1ef3f35c02 Print dependencies at the end.
This introduces a tiny change of behavior since command line options which affect the
printing of dependencies (-modules, -all, -ml-synonym, -mlfi-synonym) are taken into
account even for files mentioned before on the command-line.  This is probably not going to break
anything.

Note: this commit also reverse the ordering of the output, but we will normalize it in the next
commit anyway.
2016-03-10 15:33:35 +01:00
alainfrisch 2261e4413d Single entry point to print deps. 2016-03-10 15:33:34 +01:00
alainfrisch 4aea2c1903 Move dependency printing code to their own function. 2016-03-10 15:33:33 +01:00
alainfrisch a00a193e35 Cleanup. 2016-03-10 15:33:32 +01:00
alainfrisch de857d6fb9 GPR#324: Make boot/ocamlc read directly byterun/primitives (patch by Francois Bobot). 2016-03-10 10:46:19 +01:00
Damien Doligez d01d3b5113 check-typo: check LICENCE cited without a path 2016-03-03 15:02:23 +01:00
Damien Doligez 9166e7003e update .depend and bootstrap compilers before release 2016-02-29 14:07:07 +01:00
Mark Shinwell 5dced42768 Merge pull request #480 from mshinwell/flambda_unbox-closures
GPR#480: Flambda fix: try to make Unbox_closures behave more reasonably
2016-02-26 16:18:04 +00:00
Mark Shinwell 0453c74baa Fix Unbox_closures to lessen runtime performance penalty 2016-02-24 09:03:15 +00:00
Damien Doligez abaae1fb12 tweak tools/ci-build 2016-02-19 17:13:59 +01:00
Damien Doligez 69a906872f tweak tools/check-typo and break more overlong lines 2016-02-19 17:13:53 +01:00
Damien Doligez 7cfb9a59f7 tweak tools/ci-build 2016-02-19 17:10:14 +01:00
Damien Doligez d5f61a4e54 tweak tools/check-typo and break more overlong lines 2016-02-19 12:28:36 +01:00
Damien Doligez 57882471ad fix syntax error in Makefile.nt 2016-02-19 12:28:35 +01:00
Damien Doligez eefe8b8241 fix syntax error in Makefile.nt 2016-02-18 17:41:57 +01:00
Damien Doligez 5401ce8473 Update headers for the new license.
Remains to be done: remove all headers in testsuite/tests.
2016-02-18 16:59:16 +01:00
Damien Doligez 6e794aee72 tools/check-typo: switch to new header format 2016-02-17 13:36:37 +01:00
Damien Doligez ee8f71101b clean up whitespace and cut long lines 2016-02-17 13:36:27 +01:00
Damien Doligez 10158fe5e0 check-typo: no header needed for files shorter than 10 lines 2016-02-16 13:20:17 +01:00
Leo White 4253ed1530 Tidy up new command-line parameters 2016-02-11 16:02:02 +00:00
Leo White d79380ff63 Enable opaque option in ocamlc 2016-02-11 11:39:14 +00:00
Mark Shinwell 4f3b8bf872 Fix ocamlobjinfo for Flambda (includes work from Runhang Li) 2016-02-10 15:56:13 +01:00
Christophe Troestler 7f6a8ae2f0 Protect install paths against spaces (on Windows) 2016-02-10 14:46:39 +01:00
Mark Shinwell f95fb8bbb0 Bug fixes etc for Flambda 2016-02-09 18:38:16 +01:00
Mark Shinwell a397511031 Import latest Flambda changes 2016-02-09 09:59:26 +01:00
Pierre Chambart b0b0f6609c Enable flambda 2016-01-28 15:04:47 +01:00
Nicolas Ojeda Bar 92d679f791 Use Ast_iterator for Ast_invariants 2016-01-27 23:02:23 +01:00
Jeremie Dimino d8704f6ba8 Add module Ast_invariants
This module checks all the AST invariants. This is to ensure that all
invariants are written down in one place and are consistently checked
between the various clients of the AST (typer, pprintast, ...).

The invariants are checked in Pparsee, after applying the ppx
rewriters.
2016-01-27 18:41:12 +00:00
Damien Doligez 6e6cabfe1b Merge pull request #370 from dra27/normalise-warnings
PR#7106: Warnings emitted by the compiler may contain \r\r\n on Windows
2016-01-27 15:28:20 +01:00
Mark Shinwell 026572c2ec Merge pull request #366 from dra27/testsuite-windows
GPR#366: Various test-suite fixes for Windows
2016-01-26 14:21:00 +00:00
Pierre Chambart 2555c4e773 Update main and ocamldep 2016-01-25 18:50:29 +01:00
David Allsopp 81604e76f6 Minor corrections to clean targets 2016-01-25 15:08:03 +00:00
David Allsopp 9e547e67dd Normalise \r\n to \n for warnings
The formatters used for printing warnings have text mode translation
enabled which means that any Windows endings which creep into warning
texts (e.g. from attributes) result in \r\r\n in the output.

The effect is largely innocuous, except that it causes the
deprecated_module_use test to fail on Windows.
2016-01-18 16:19:08 +00:00
alainfrisch 129df0ae09 Fix Changes file. 2016-01-18 11:11:39 +01:00
David Allsopp bcbee6896c Fix missing Windows change in #423 2016-01-15 17:43:34 +00:00
David Allsopp ae49015d8e Share compiler config with ocamlmklib
Remove duplication between tools/ocamlmklibconfig.ml and
utils/config.ml and link ocamlmklib with config.cmo from compiler-libs.
2016-01-15 17:07:13 +00:00
David Allsopp b46843fb69 Allow compilation using bootstrapped FlexDLL
Extend the previous patch allowing make -f Makefile.nt flexdll
install-flexdll not to require the install-flexdll stage.

OCAML_FLEXLINK is utilised as required to allow compilation of the entire
system using an in-tree compiled flexlink. The build process simply
required the flexdll target to appear before world.

opt.opt compiles a native code version of flexlink.exe as flexlink.opt.

install always installs flexlink.exe if it was compiled along with any
required .manifest files. It also installs the appropriate .o/.obj files
to $(INSTALL_LIBDIR).

At present, the bootstrapping is not extended to the Cygwin ports.
2016-01-15 17:07:12 +00:00
David Allsopp fe4b643c4e Support OCAML_FLEXLINK environment variable
OCAML_FLEXLINK is inspected by ocamlopt, ocamlc and ocamlmklib and allows
the flexlink command to be overriden. This is primarily intended as a
solution for bootstrapping OCaml with FlexDLL, thus allowing a bytecode
image of flexlink launched with ocamlrun to be executed, instead of
requiring flexlink to be in PATH.
2016-01-15 17:07:11 +00:00
Mark Shinwell fb4d06a3aa Clflags stuff and Arg_helper 2016-01-14 11:27:30 +00:00
Pierre Chambart 38ce618089 Make the Ident module identifiable 2016-01-12 18:01:25 +01:00
Mark Shinwell f9a3d0d9c1 merge with trunk 2016-01-12 13:48:39 +01:00
Mark Shinwell 852efd270e Merge with trunk; remake dependencies 2015-12-22 16:28:35 +00:00
Damien Doligez c9003ac48f fix huge pages vs renaming of caml_stat_heap_size 2015-12-21 14:27:46 +01:00
Damien Doligez 0225ca01e3 GC latency improvements 2015-12-21 14:27:46 +01:00
Mark Shinwell a972d4df72 Fix Makefiles 2015-12-18 17:00:46 +00:00
Pierre Chambart 233e1b1791 Record compiler runtime 2015-12-18 13:33:10 +00:00
Xavier Leroy 5b62da1835 Merge pull request #340 from ocaml/stripped-bootstrap
Reduce size of bootstrap compilers by stripping debug info
2015-12-18 11:13:37 +01:00
Jeremie Dimino b95a642bdc PR#6795, PR#6996: make ocamldep interpret [%ocaml.error] 2015-12-17 10:42:47 +00:00
David Allsopp 1a797e9817 Handle binary files correctly in tools/check-typo
I'm not familiar enough with Subversion to know how properties work
there, but the translation for detecting binary files to git using
attributes is incorrect. Checking for the binary attribute with
check-attr only detects if the file has been *specified* as binary.

Script altered to use a "well-known" plumbing command to detect whether
git regards a particular file as binary. This takes into account
.gitattributes, but also works if the file has been automatically
detected as binary by git.
2015-12-14 15:29:04 +00:00
Gabriel Scherer d071da2880 Revert GPR#305 (exception patterns under or-patterns) from trunk
This week we merged several changes from Thomas Refis, to allow the
use of exception patterns under or-patterns, to write code such as

  match foo x with
    | None | exception Not_found -> ...
    | Some -> ...

Unfortunately, I failed to properly assess the impact of this change,
and in particular to make sure that Luc Maranget had properly reviewed
this code -- any change to the pattern-matching machinery should be
reviewed by Luc.

The problem that I had not foreseen and that he would have immediately
realized is that, while adapting the pattern-matching *compiler* is
relatively easy (Thomas inserted a transformation at the right place
to separate exception patterns from the others and handle them
separately, using the staticraise construct used by the
pattern-matching compiler to avoid duplicating the
right-hand-side branch), adapting the pattern-matching warnings
machinery is both more subtle and easier to overlook (it may fail
silently and nobody notices, unlike wrong code production). This part
of the compiler is subtle and best understood by Luc, but he does not
have the time to do a proper review of those changes in the timeframe
for the 4.03 feature freeze (mid-December).

I believe the right move in this case, implemented in the present
commit, is to revert the change from trunk (this is not a feature that
we must *imperatively* have in 4.03), do a proper job of understanding
the changes, and integrate the change when we are confident it is
ready. I hope to do this in 2016, together with Luc Maranget and
Thomas Refis -- hopefully this would allow Thomas and I to be more
confident when changing the pattern-matching machinery in the future.

Revert "Merge pull request #343 from trefis/pr7083"
This reverts commit 22681b8d2a, reversing
changes made to a24e4edf0a.

Revert "Merge pull request #341 from trefis/or-exception"
This reverts commit f8f68bd329, reversing
changes made to 1534fe8082.

Revert "Merge pull request #305 from trefis/or-exception"
This reverts commit cfeda89396, reversing
changes made to 77cf36cf82.
2015-12-12 11:20:21 +01:00
Thomas Refis 4b28c6ca99 PR#6422: Allow exceptions under or-patterns in match statements. 2015-12-09 11:19:59 +00:00
Xavier Leroy be4381dddf When copying the new compilers to boot/, also strip the #! header. It is not needed and can cause spurious merge conflicts. 2015-12-09 11:14:23 +01:00
Xavier Leroy 2810763764 Strip debugging information off the bootstrap compilers, to reduce their size
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.
2015-12-09 10:45:31 +01:00
Jeremie Dimino f3ba667fcb fix typo in ocamldep 2015-12-01 10:54:15 +00:00
Jacques Garrigue 381328e92e add module alias support to ocamldep 2015-12-01 00:07:36 +09:00
Jeremie Dimino c1c4c426ca Update ocamldep for [%extension_constructor]
Make ocamldep inspect the payload of [%extension_constructor]
2015-11-27 18:24:27 +00:00
pierreweis 97cfe7d882 Merge branch 'trunk' of ssh://github.com/ocaml/ocaml into trunk 2015-11-12 14:38:00 +01:00
Damien Doligez 7cb9a80744 simplify .gitignore; remove .ignore files and tools/setignore; adjust tools/check-typo 2015-11-06 16:25:05 +01:00
Damien Doligez 15796e716c update tools/check-typo to work with git attributes instead of svn properties 2015-11-03 17:32:50 +01:00
Pierre Weis fbcec250c3 Do not use fscanf that will be deprecated ASAP. 2015-10-29 18:09:09 +01:00
Some Name bf56ce3c0a update CI build script to switch to git 2015-10-29 15:30:11 +01:00
Jacques Garrigue a335b18a45 merge branches/gadt-warnings
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16532 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-23 08:33:44 +00:00
Jacques Garrigue e34f40ad87 switch to 'pat -> .' and add P/Texp_unreachable
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadt-warnings@16507 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-16 00:13:40 +00:00
Jacques Garrigue a09fb037ac add refuted cases, syntax is 'pat -> _'
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadt-warnings@16500 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-15 01:55:52 +00:00
Alain Frisch 0e4f031c5d #6195: use compilerlibs for read_cmt tool.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16417 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-11 14:48:12 +00:00
Damien Doligez b860d63145 whitespace cleanup, cut long lines, add some missing headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16415 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-11 11:58:31 +00:00
Gabriel Scherer a01ff57130 Added .dylib and .so as extensions for ocamlmklib
(Edgar Aroutiounian, Peter Zotov)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16373 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-22 21:54:14 +00:00
Damien Doligez 08d7a9d403 ci-build: allow special characters in conf options
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16361 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-18 15:16:16 +00:00
Damien Doligez 2b809f3d7d fix universal CI build script for Unix
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16360 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-18 13:27:38 +00:00
Gabriel Scherer 9a533a50cd make alldepend
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16352 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 15:57:59 +00:00
Gabriel Scherer 02abd6c244 ocamldep: make printing of cyclic dependencies deterministic
Hashtbl.iter used to be deterministic, but it's now an observable
source of randomness.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16351 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 15:57:57 +00:00
Gabriel Scherer cb3bb152ab add option handling for colors in compiler, OCAMLPARAM and ocamlbuild
(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
2015-08-15 15:57:51 +00:00
Gabriel Scherer 1957021b27 make alldepend
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16318 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 18:34:09 +00:00
Damien Doligez 1326b12f74 merge branch 4.02 from rev 16205 to rev 16238
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16296 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-29 22:19:24 +00:00
Damien Doligez 6a693425d5 tell GCC to use only ASCII in its warnings and errors
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16233 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-22 13:22:33 +00:00
Damien Doligez 4b83d53fbc update .depend and bootstrap compilers after 4.02 merge
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16218 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 18:34:07 +00:00
Damien Doligez 860c670848 merge branch 4.02 from 4.02.1 (rev 15540) to a few fixes after 4.02.2 (rev 16205)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16214 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 14:31:05 +00:00
Damien Doligez e23fa906bd PR#6747: ocamlobjinfo: missing symbol caml_plugin_header due to underscore
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16212 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-15 14:53:49 +00:00
Leo White 5c55e4cc08 Attach documentation comments to Parsetree
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16189 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-28 13:11:50 +00:00
Damien Doligez dc555cf572 small improvements to tools/gdb-macros
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16157 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-04 20:09:31 +00:00
Damien Doligez 0477bab3bf deduplicate some startup code and fix PR#6808: the parsing of OCAMLRUNPARAM is too lax
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16074 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-04 15:44:40 +00:00
Damien Doligez e4ec61f7fb gdb-macros: more useful macros
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16058 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-01 15:42:18 +00:00
Gabriel Scherer feab60e168 fix minor mistake in tools/eqparsetree.ml
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16041 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-26 20:00:53 +00:00
Alain Frisch 918f584b64 #6845: -no-check-prims to tell ocamlc not to check primitives in runtime.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16031 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-22 10:53:47 +00:00
Damien Doligez 66faf96246 add `camlfield` command; improve `camlchunks`
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16020 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-15 19:21:31 +00:00
Damien Doligez ad504946a4 add commands `camlnext` and `camlchunks`
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16018 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-14 21:47:45 +00:00
Gabriel Scherer 4530ee379c GPR#118 ocamldep -allow-approx: fallback to a lexer-based approximation
(Frédéric Bour)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16009 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-12 17:43:04 +00:00
Damien Doligez 86f0bd52e4 gdb-macros: make `caml` work on any argument type
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15989 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-10 14:51:43 +00:00
Damien Doligez 823be1d693 use the official name of Jane Street in headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15986 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-07 18:48:35 +00:00
Damien Doligez 32f63afa58 dumpobj: remove spurious whitespace and add missing opcodes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15980 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-02 02:55:20 +00:00
Jérémie Dimino bcc9e6adfa Update ocamldoc and other utilities to support "type
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15923 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-13 11:09:08 +00:00
Damien Doligez c51df1aecf relax ocamldep test to allow for non-ASCII module identifiers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15915 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-12 17:55:28 +00:00
Gabriel Scherer 06a78807fb Update Makefile and .depend for untypeast.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15887 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-08 10:22:34 +00:00
Gabriel Scherer 786e69e846 move tools/untypeast.ml to typing/untypeast.ml
This makes them available in compiler-libs, enabling various uses
outside the compiler.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15886 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-08 10:22:32 +00:00
Damien Doligez 2a0e91960e misc fixes to gdb-macros
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15875 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-04 19:57:51 +00:00
Damien Doligez 85f479822e tools: add a file of GDB macros useful for debugging the runtime
debugger: add two low-level commands for debugging in tandem with gdb


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15838 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-12 21:31:20 +00:00
Jacques Garrigue 64ee2135de Resolve PR#6742: remove duplicate virtual_flag information from Tstr_class
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15776 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-16 09:20:13 +00:00
Gabriel Scherer 7ca29ef3f7 PR#5887: move the byterun/*.h headers to byterun/caml/*.h to avoid header name clashes
(Jérôme Vouillon and Adrien Nader and Peter Zotov)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15757 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-27 14:41:49 +00:00
Gabriel Scherer c550f4b858 PR#6641: add -g, -ocamlcflags, -ocamloptflags options to ocamlmklib
(Peter Zotov)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15750 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-27 08:44:46 +00:00
Alain Frisch f804ae6481 Rewrite cmt2annot using tast_mapper instead of tast_iter. Remove tast_iter.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15740 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-22 09:55:17 +00:00
Alain Frisch 9d450a05e0 Replace TypedtreeMap with a more standard open-recursion iterator Tast_mapper. Keep TypedtreeMap/Iter for now, for external projects.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15739 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-22 09:36:41 +00:00
Jacques Garrigue 158480371a exhauce PR#6367: introduce Asttypes.arg_label to encode labelled arguments
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15737 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-22 08:45:55 +00:00
Gabriel Scherer f15f4f3ed8 PR6695: Make sure the compiler only uses ASCII string functions.
This should cover all places involving filenames in the compiler.
There are a few more paths still using Latin-1 in other ways,
e.g. in ocamldoc.

From: Peter Zotov <whitequark@whitequark.org>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15727 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-21 11:46:14 +00:00
Damien Doligez 031cffd155 merge branch 4.02 from release 4.02.0 to release 4.02.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15558 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-15 13:34:58 +00:00
Alain Frisch e3ad818fb5 Reintegrate-merge constructors_with_record5 branch.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15556 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-14 15:51:30 +00:00
Gabriel Scherer 97cff22e45 ocamldep support for -open
Adding an `open_module` function to the Depend interface instead of
directly mutating `free_structure_names` makes the approach robust to
eventual improvement to ocamldep's handling of `open` (for example, in
presence of .cmi for the opened units it could add their submodules
to the set of bound vars). This only goes so far, however, as the
overall imperative style would not nicely support proper local
handling of `let open M in e`.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15468 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 20:31:34 +00:00
Gabriel Scherer dfcccc7999 minor refactoring in ocamldep.ml
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15467 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-03 20:31:32 +00:00
Alain Frisch 378a967cb7 Sync with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15190 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-04 16:11:12 +00:00
Damien Doligez a18bc7950b merge changes of version/4.02 from r15121 to r15155
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15168 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-29 17:14:00 +00:00
Damien Doligez cbfe627f92 merge changes from branch 4.02 from branching (rev 14852) to 4.02.0+rc1 (rev 15121)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15125 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-22 13:45:02 +00:00
Gabriel Scherer d02c8fbc55 new -opaque flag: ocamlopt creates .cmx without cross-module info
(Patch by Pierre Chambart and Gabriel Scherer)
(Ack'ed by Damien Doligez)

This enables a form of incremental compilation for ocamlopt: if
A depends on B, and B is compiled with `ocamlopt -opaque`, then minor
implementation changes in B that do not affect the module interface
will not require recompilation of A.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15105 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-18 13:28:34 +00:00
Gabriel Scherer 1a87dee8e3 tools/objinfo: workaround change in binutils' <bfd.h>
(Report and fix by Christopher Zimmerman)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15089 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-15 13:19:23 +00:00
Alain Frisch 50f47df33a Sync with trunk. Rebinding of inlined extension constructors with free variables is not yet supported.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15069 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-07 16:07:55 +00:00
Alain Frisch 047e09748c Cherry-pick 15062,15063,15064 from 4.02 (#6497).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15068 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-07 09:46:34 +00:00
Damien Doligez cf6714ead2 PR#6142: add cmt file support to ocamlobjinfo
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15028 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-24 18:08:40 +00:00
Damien Doligez 6ba26a91f2 allow long lines up to 132 chars in ocamldoc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15018 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-21 20:41:52 +00:00
Damien Doligez 9ac64ba6a4 PR#6406: Expose OCaml version in C headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15017 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-21 20:39:38 +00:00
Damien Doligez d1b1fbee66 still debugging the ci-build script (take 3)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14962 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-05 09:57:20 +00:00
Damien Doligez 499092e0ba still debugging the ci-build script
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14961 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-05 09:37:57 +00:00
Damien Doligez 837ed62b9e debugging the ci-build script
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14960 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-05 09:19:17 +00:00
Damien Doligez 43701240df ci-build: go to the right directory before parsing command-line options
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14945 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-02 20:52:44 +00:00
Damien Doligez 2c67f4f755 tools/ci-build: add possibility of changing directory on unix-like architectures
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14940 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-02 11:30:11 +00:00
Damien Doligez 45473851e8 add option -patch1 to ci-build script
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14939 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-02 11:27:24 +00:00
Damien Doligez c82c004286 ci-build: fix wrong variable name
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14851 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 18:56:14 +00:00
Damien Doligez 5d7864a8d4 ci-build: do not change directory for Unix slaves
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14803 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 14:46:59 +00:00
Damien Doligez 6d688eadc1 add missing instructions to ci-build for msvc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14802 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 14:26:25 +00:00
Damien Doligez d0368bc2c5 update distclean target
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14801 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 14:03:04 +00:00
Damien Doligez aebb9e144d fix missing archs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14798 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 13:46:19 +00:00
Damien Doligez 4736382a39 add universal CI build script
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14796 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 12:19:20 +00:00
Alain Frisch 68ae2cc74b Enable warning 27 in tools/ and fix occurrences. It's good to mark in depend and untypeast parts which are explicitly ignored.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14794 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 10:41:21 +00:00
Jacques Garrigue ccce272966 commit o_and_opens.diff
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14787 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-11 00:17:05 +00:00
Jacques Garrigue 1ce29d9bfc re-commit Leo's weak-dependencies pull request
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14755 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-07 00:34:20 +00:00
Fabrice Le Fessant b1943e1ac7 Remove FIRST_UNIMPLEMENTED_OP from interp.c
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14748 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-05 13:59:25 +00:00
Alain Frisch 0f1fb19cbe #6318: Extend match...with with exception cases. (Patch by Jeremy Yallop, backend part by A. Frisch).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14743 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-05 11:49:37 +00:00
Alain Frisch 0b3423ef2c #6387: also allow attributes on methods in object types (< m [@foo] : int; ..>).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14741 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-05 11:21:45 +00:00
Jacques Garrigue fc24112e25 change -trans-mod to -no-alias-deps, and update message
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14738 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-05 02:05:30 +00:00
Jacques Garrigue b56dc4b3df PR#5584: merge open extensible types, extension-patch-4.0.2
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14737 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-04 23:08:45 +00:00
Alain Frisch 0f1bb864df Add support for floating attributes in class structures and class signatures. (Patch by Leo White.)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14736 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-04 20:42:34 +00:00
Jacques Garrigue 95104b3924 revert commit 14719
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14723 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-02 06:19:55 +00:00
Mark Shinwell 521ac0213a weak dependencies with -trans-mod (github/ocamllabs/weak-depends 45e980a,21856a7,merge)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14719 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-01 12:50:20 +00:00
Alain Frisch b791d666d8 #6387: allow attributes on variants in polymorphic variant types.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14712 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-30 08:19:55 +00:00
Damien Doligez 5b8df637d2 merge branch "safe-string"
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14705 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29 11:56:17 +00:00
Xavier Leroy 558f40e344 New back-end optimization pass: common subexpression elimination (CSE).
(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
2014-04-26 10:40:22 +00:00
Xavier Leroy 29b34438e0 - Constant ropagation for float and int32/int64/nativeint arithmetic.
Constant propagation for floats can be turned off with option
  -no-float-const-prop, for codes that change FP rounding modes at
  run-time.
- Clambda / C-- / Mach: represent float constants as FP numbers of type 
  float rather than literals of type string.
- Tested for AMD64; other archs need testing.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14673 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-25 08:41:13 +00:00
Alain Frisch dfce13de92 Sync with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14661 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 15:40:51 +00:00
Alain Frisch 3b6c0c88a5 Make Parsetree more uniform by keeping locations in all records which have attributes.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14659 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 15:28:20 +00:00
Alain Frisch eb617b5fe7 Synchronize with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14657 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 14:33:41 +00:00
Alain Frisch 6fe5dd7cf4 Turn more sig/str items into records. Patch from Leo White.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14597 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-15 11:26:00 +00:00
Alain Frisch 6346154d4b Synchronize with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14587 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-14 11:52:29 +00:00