This commit adds errors for bad uses of @untagged and
@unboxed attributes in external declarations.
There are three possible new errors:
- One when the external does not contain a native version of
the primitive,
- One when the attribute occurs deeply into the type,
- One when the attribute is applied to the whole function type.
The formatters used for printing warnings have text mode translation
enabled which means that any Windows endings which creep into warning
texts from deprecated 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.
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.
1. Update FlexDLL so that ocamlc -custom no longer displays the
intermediate C file
2. Ensure that, for example, ocamlc -c foo/bar.c doesn't display bar.c
This enables correct stack unwinding, and helps prevent random crashes on OS X
due to Cocoa or other Objective-C (or C++) external functions walking
our stack.
ocamlc and ocamlopt both provide convenient mechanisms to invoke the C
compiler for .c files. Given the filtering out of the .c line for MSVC
now performed by ocamlc and ocamlopt, changing the testsuite to invoke
the C compiler via ocamlc reduces noise from the testsuite _log file.
Microsoft's C Compiler displays several lines on every invocation - most
of this is removed by specifying the /nologo command line option, but
the compiler still displays the name of every C file it compiles. The
Microsoft Macro Assembler (MASM) does the same thing, but ocamlopt by
default is able to pipe the output of that command directly to NUL, as
the assembler code should never produce errors.
The same cannot be done for invocations of the C compiler, as obviously
syntax errors must be displayed. This relative small cosmetic change
pipes the output of cl to a temporary file and filters out the first
line if it is exactly as expected. The most elegant solution would
require pipes and process handling to be merged from the Unix module
into the compilers.
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.
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.
`install-flexdll` target added to Makefile.nt which installs flexlink.exe
and the correct objects, manifests and flexdll.h to `$(INSTALL_BINDIR)`.
When this target has been used, the behaviour of opt.opt is altered to
compile a native-code version of flexlink.exe. This is subsequently
installed by the install target.
This means that Windows can be fully built by issuing:
make -f Makefile.nt flexdll install-flexdll world opt.opt install
Allows the four native Windows ports to compile FlexDLL and flexlink
"in-tree" by placing the sources in directory `flexdll` and issuing
`make -f Makefile.nt flexdll`
FlexDLL must still be installed somewhere in PATH before OCaml itself
can be compiled. The `flexdll` target leaves the OCaml build tree in a
sufficiently clean state to allow `world` to be run after installation
of FlexDLL.