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.
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
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.