OCAML_ARCH is now cygwin on the Cygwin32 worker and cygwin64 on the
Cygwin64 worker. The rebase "trick" is now only used on the Cygwin64
worker, where it is required.
Currently our CI machine on FreeBSD fails to build with the following
error message:
```
bytecomp/generate_runtimedef.sh runtime/caml/fail.h runtime/primitives > bytecomp/runtimedef.ml
/bin/sh: bytecomp/generate_runtimedef.sh: not found
```
This PR converts all the files with a `/bin/bash` shebang to
`/usr/bin/env bash`. Some files use `/bin/sh` instead, and they are
unchanged. It may be the case that some 'bash' files could in fact run
using 'sh', but checking this requires more work and I decided to
follow the original author's intent.
(Personally I like using bash explicitly as it gives a consistent
programming environment that I can easily test on my machine; but this
should not be at the expense of portability.)
In order to prepare the transition to autoconf, this commit moves the
configuration Makefile out of the config directory which will disappear
and gives it the name it will have once intstalled, namely Makefile.config.
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.
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).
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.
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.
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.
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.
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.