Skip to content

Commit

Permalink
Merge commit '672965bfda6220c690d26ff6a0b7a9a59519d9af' into 5.00
Browse files Browse the repository at this point in the history
  • Loading branch information
ctk21 committed Oct 4, 2021
2 parents cc4e5f5 + 672965b commit d8d3a1f
Show file tree
Hide file tree
Showing 52 changed files with 493 additions and 331 deletions.
39 changes: 39 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Working version
*blit_* function during Mark phase
(François Bobot, reported by Stephen Dolan, reviewed by Damien Doligez)

- #10549: Stack overflow detection and naked pointers checking for ARM64
(Xavier Leroy, review by Stephen Dolan)


### Code generation and optimizations:

### Standard library:
Expand All @@ -33,6 +37,10 @@ Working version
to emulate Unix.socketpair (only available on Windows 1803+)
(Antonin Décimo, review by David Allsopp)

- #10469: Add Thread.set_uncaught_exception_handler and
Thread.default_uncaught_exception_handler.
(Enguerrand Decorne, review by David Allsopp)

### Tools:

- #3959, #7202, #10476: ocaml, in script mode, directive errors
Expand All @@ -42,6 +50,11 @@ Working version
- #10524: Directive argument type error now shows expected and received type.
(Wiktor Kuchta, review by Gabriel Scherer)

- #10560: Disable colors if the env variable `NO_COLOR` is set. If
`OCAML_COLOR` is set, its setting takes precedence over `NO_COLOR`.
(Nicolás Ojeda Bär, report by Gabriel Scherer, review by Daniel Bünzli,
Gabriel Scherer and David Allsopp)

### Manual and documentation:

- #7812, #10475: reworded the description of the behaviors of
Expand All @@ -62,6 +75,10 @@ Working version
when module inclusion fails.
(Antal Spector-Zabusky, review by Florian Angeletti)

- #10531: add naked_pointers to ocamlc -config exporting NAKED_POINTERS from
Makefile.config.
(Damien Doligez, review by Mark Shinwell and Gabriel Scherer)

### Internal/compiler-libs changes:

- #1599: add unset directive to ocamltest to clear environment variables before
Expand Down Expand Up @@ -186,6 +203,10 @@ OCaml 4.13.0
platforms without AFL support.
(David Allsopp, review by Xavier Leroy)

- #10195: Speed up GC by prefetching during marking
(Stephen Dolan, review by Xavier Leroy, Guillaume Munch-Maccagnoni,
Jacques-Henri Jourdan and Damien Doligez)

* #10098: Improve command-line parsing in ocamlrun: strictly recognise options,
be more informative for `ocamlrun -I` and support `--` for terminating options
parsing.
Expand Down Expand Up @@ -416,6 +437,9 @@ OCaml 4.13.0
- #9632: Document incremental build solutions with opam
(Vincent Laviron, review by Daniel Bünzli and Gabriel Scherer)

- #10497: Styling changes in the post-processed HTML manual (webman)
(Wiktor Kuchta, review by Florian Angeletti)

### Compiler user-interface and warnings:

- #1737, #2092, #7852, #7859, #10405, #10417: Update locations during
Expand Down Expand Up @@ -699,10 +723,18 @@ OCaml 4.13.0
- #10376: Link runtime libraries correctly on msvc64 in -output-complete-obj
(David Allsopp, review by Gabriel Scherer)

- #10380: Correct handling of UTF-8 paths in configure on Windows
(David Allsopp, review by Sébastien Hinderer)

- #10449: Fix major GC work accounting (the GC was running too fast).
(Damien Doligez, report by Stephen Dolan, review by Nicolás Ojeda Bär
and Sadiq Jaffer)

- #10450, #10558: keep %apply and %revapply primitives working with abstract
types. This breach of backward compatibility was only present in the alpha
releases of OCaml 4.13.0 .
(Florian Angeletti, review by Thomas Refis and Leo White)

- #10454: Check row_more in nondep_type_rec.
(Leo White, review by Thomas Refis)

Expand All @@ -718,6 +750,13 @@ OCaml 4.12, maintenance version

### Bug fixes:

- #10442, #10446: Fix regression in the toplevel to #directory caused by
corrections and improvements to the Load_path in #9611. #directory now
adds the path to the start of the load path again (so files in the newly
added directory take priority).
(David Allsopp, report by Vasile Rotaru, review by Florian Angeletti
and Nicolás Ojeda Bär)

- #10478: Fix segfault under Windows due to a mistaken initialization of thread
ID when a thread starts.
(David Allsopp, Nicolás Ojeda Bär, review by Xavier Leroy)
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1145,6 +1145,7 @@ distclean: clean
rm -f tools/eventlog_metadata
rm -f tools/*.bak
rm -f testsuite/_log*
$(MAKE) -C stdlib distclean

include .depend

Expand Down
19 changes: 0 additions & 19 deletions Makefile.config.in
Original file line number Diff line number Diff line change
Expand Up @@ -263,25 +263,6 @@ else
$(OUTPUTEXE)$(1) $(2)
endif # ifeq "$(TOOLCHAIN)" "msvc"

# The following variables were defined only in the Windows-specific makefiles.
# They were not defined by the configure script used on Unix systems,
# so we also make sure to provide them only under Windows
# User code should absolutely not rely on their presence because
# in the future their definition may be moved to a more private part of
# the compiler's build system
ifeq "$(UNIX_OR_WIN32)" "win32"
CYGPATH=cygpath -m
DIFF=/usr/bin/diff -q --strip-trailing-cr
FIND=/usr/bin/find
SORT=/usr/bin/sort
SET_LD_PATH=PATH="$(PATH):$(LD_PATH)"
else # ifeq "$(UNIX_OR_WIN32)" "win32"
# On Unix, make sure FLEXLINK is defined but empty
SORT=sort
CYGPATH=echo
SET_LD_PATH=CAML_LD_LIBRARY_PATH="$(LD_PATH)"
endif # ifeq "$(UNIX_OR_WIN32)" "win32"

FLEXLINK_FLAGS=@flexlink_flags@
FLEXLINK_CMD=flexlink
FLEXLINK=$(FLEXLINK_CMD) $(FLEXLINK_FLAGS)
Expand Down
2 changes: 1 addition & 1 deletion README.stock.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ community. These can be accessed at

https://ocaml.org/community/

In particular, the IRC channel `#ocaml` on https://freenode.net/[Freenode] has a
In particular, the IRC channel `#ocaml` on https://libera.chat/[Libera] has a
long history and welcomes questions.

== Bug Reports and User Feedback
Expand Down
4 changes: 2 additions & 2 deletions README.win32.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ Now run:

for 32-bit, or:

./configure --build=x86_64-unknown-cygwin --host=x86_64-pc-windows
./configure --build=x86_64-pc-cygwin --host=x86_64-pc-windows

for 64-bit.

Expand Down Expand Up @@ -266,7 +266,7 @@ Now run:

for 32-bit, or:

./configure --build=x86_64-unknown-cygwin --host=x86_64-w64-mingw32
./configure --build=x86_64-pc-cygwin --host=x86_64-w64-mingw32

for 64-bit.

Expand Down
10 changes: 7 additions & 3 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ AC_SUBST([force_instrumented_runtime])

AC_CONFIG_FILES([Makefile.build_config])
AC_CONFIG_FILES([Makefile.config])
AC_CONFIG_FILES([stdlib/sys.ml])
AC_CONFIG_FILES([tools/eventlog_metadata])
AC_CONFIG_HEADERS([runtime/caml/m.h])
AC_CONFIG_HEADERS([runtime/caml/s.h])
Expand Down Expand Up @@ -1784,7 +1785,7 @@ AC_MSG_CHECKING([whether stack overflows can be detected])

AS_CASE([$arch,$system],
[i386,linux_elf|amd64,linux|amd64,macosx \
|amd64,openbsd|i386,bsd_elf],
|amd64,openbsd|i386,bsd_elf|arm64,linux|arm64,macosx],
[AC_DEFINE([HAS_STACK_OVERFLOW_DETECTION])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
Expand Down Expand Up @@ -1847,7 +1848,8 @@ AS_IF([test x"$enable_naked_pointers_checker" = "xyes" ],
AS_CASE(["$arch","$system"],
[amd64,linux|amd64,macosx \
|amd64,openbsd|amd64,win64 \
|amd64,freebsd|amd64,solaris],
|amd64,freebsd|amd64,solaris \
|arm64,linux|arm64,macosx],
[naked_pointers_checker=true
AC_DEFINE([NAKED_POINTERS_CHECKER])],
[*],
Expand Down Expand Up @@ -1998,7 +2000,7 @@ AS_IF([test x"$prefix" = "xNONE"],
[AS_IF([test x"$unix_or_win32" = "xwin32" \
&& test "$host_vendor-$host_os" != "$build_vendor-$build_os" ],
[AS_CASE([$build],
[*-pc-cygwin], [prefix=`cygpath -m "$prefix"`])])])
[*-pc-cygwin], [prefix="$(LC_ALL=C.UTF-8 cygpath -m "$prefix")"])])])

# Define a few macros that were defined in config/m-nt.h
# but whose value is not guessed properly by configure
Expand Down
5 changes: 5 additions & 0 deletions driver/compmisc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ let set_from_env flag Clflags.{ parse; usage; env_var } =

let read_clflags_from_env () =
set_from_env Clflags.color Clflags.color_reader;
if
Option.is_none !Clflags.color &&
Option.is_some (Sys.getenv_opt "NO_COLOR")
then
Clflags.color := Some Misc.Color.Never;
set_from_env Clflags.error_style Clflags.error_style_reader;
()

Expand Down
10 changes: 6 additions & 4 deletions man/ocaml.m
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,17 @@ use heuristics to enable colors only if the output supports them (an
.B never
disable color output.

The default setting is
The environment variable "OCAML_COLOR" is considered if \-color is not
provided. Its values are auto/always/never as above.

If \-color is not provided, "OCAML_COLOR" is not set and the environment
variable "NO_COLOR" is set, then color output is disabled. Otherwise,
the default setting is
.B auto,
and the current heuristic
checks that the "TERM" environment variable exists and is
not empty or "dumb", and that isatty(stderr) holds.

The environment variable "OCAML_COLOR" is considered if \-color is not
provided. Its values are auto/always/never as above.

.TP
.BI \-error\-style \ mode
Control the way error messages and warnings are printed.
Expand Down
10 changes: 6 additions & 4 deletions man/ocamlc.m
Original file line number Diff line number Diff line change
Expand Up @@ -268,15 +268,17 @@ use heuristics to enable colors only if the output supports them (an
.B never
disable color output.

The default setting is
The environment variable "OCAML_COLOR" is considered if \-color is not
provided. Its values are auto/always/never as above.

If \-color is not provided, "OCAML_COLOR" is not set and the environment
variable "NO_COLOR" is set, then color output is disabled. Otherwise,
the default setting is
.B auto,
and the current heuristic
checks that the "TERM" environment variable exists and is
not empty or "dumb", and that isatty(stderr) holds.

The environment variable "OCAML_COLOR" is considered if \-color is not
provided. Its values are auto/always/never as above.

.TP
.BI \-error\-style \ mode
Control the way error messages and warnings are printed.
Expand Down
10 changes: 6 additions & 4 deletions man/ocamlopt.m
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,17 @@ use heuristics to enable colors only if the output supports them (an
.B never
disable color output.

The default setting is
The environment variable "OCAML_COLOR" is considered if \-color is not
provided. Its values are auto/always/never as above.

If \-color is not provided, "OCAML_COLOR" is not set and the environment
variable "NO_COLOR" is set, then color output is disabled. Otherwise,
the default setting is
.B auto,
and the current heuristic
checks that the "TERM" environment variable exists and is
not empty or "dumb", and that isatty(stderr) holds.

The environment variable "OCAML_COLOR" is considered if \-color is not
provided. Its values are auto/always/never as above.

.TP
.BI \-error\-style \ mode
Control the way error messages and warnings are printed.
Expand Down
3 changes: 1 addition & 2 deletions manual/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ SRC = $(abspath ../..)

export LD_LIBRARY_PATH ?= "$(SRC)/otherlibs/unix/:$(SRC)/otherlibs/str/"
export DYLD_LIBRARY_PATH ?= "$(SRC)/otherlibs/unix/:$(SRC)/otherlibs/str/"
SET_LD_PATH = CAML_LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)

TEXQUOTE = $(SRC)/runtime/ocamlrun ../tools/texquote2

Expand Down Expand Up @@ -136,7 +135,7 @@ cmds/warnings-help.etex: $(SRC)/utils/warnings.ml $(SRC)/ocamlc
echo "% are inserted through the Makefile, which should be updated";\
echo "% when a new warning is documented.";\
echo "%";\
$(SET_LD_PATH) $(SRC)/boot/ocamlrun $(SRC)/ocamlc -warn-help \
$(SRC)/boot/ocamlrun $(SRC)/ocamlc -warn-help \
| LC_ALL=C sed -e 's/^ *\([0-9][0-9]*\) *\[\([a-z][a-z-]*\)\]\(.*\)/\\item[\1 "\2"] \3/' \
-e 's/^ *\([0-9A-Z][0-9]*\) *\([^]].*\)/\\item[\1] \2/'\
| sed -e 's/@/\\@/g' \
Expand Down
9 changes: 4 additions & 5 deletions manual/src/cmds/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
ROOTDIR = ../../..
include $(ROOTDIR)/Makefile.common

LD_PATH = "$(ROOTDIR)/otherlibs/str:$(ROOTDIR)/otherlibs/unix"
LD_PATH = $(ROOTDIR)/otherlibs/str $(ROOTDIR)/otherlibs/unix

TOOLS = ../../tools
CAMLLATEX = $(SET_LD_PATH) \
$(OCAMLRUN) $(ROOTDIR)/tools/caml-tex \
-repo-root $(ROOTDIR) -n 80 -v false
CAMLLATEX = $(OCAMLRUN) $(addprefix -I ,$(LD_PATH)) \
$(ROOTDIR)/tools/caml-tex -repo-root $(ROOTDIR) -n 80 -v false
TEXQUOTE = $(OCAMLRUN) $(TOOLS)/texquote2
TRANSF = $(SET_LD_PATH) $(OCAMLRUN) $(TOOLS)/transf
TRANSF = $(OCAMLRUN) $(TOOLS)/transf

FILES = comp.tex top.tex runtime.tex native.tex lexyacc.tex intf-c.tex \
ocamldep.tex profil.tex debugger.tex ocamldoc.tex \
Expand Down
9 changes: 6 additions & 3 deletions manual/src/cmds/unified-options.etex
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,15 @@ The following modes are supported:
\item["always"] enable colors unconditionally;
\item["never"] disable color output.
\end{description}
The default setting is 'auto', and the current heuristic
checks that the "TERM" environment variable exists and is
not empty or "dumb", and that 'isatty(stderr)' holds.

The environment variable "OCAML_COLOR" is considered if "-color" is not
provided. Its values are auto/always/never as above.

If "-color" is not provided, "OCAML_COLOR" is not set and the environment
variable "NO_COLOR" is set, then color output is disabled. Otherwise,
the default setting is 'auto', and the current heuristic
checks that the "TERM" environment variable exists and is
not empty or "dumb", and that 'isatty(stderr)' holds.
}%notop

\notop{%
Expand Down
Loading

0 comments on commit d8d3a1f

Please sign in to comment.