diff --git a/doc/guide/src/CompileTimeOptions.adoc b/doc/guide/src/CompileTimeOptions.adoc index f4078da7d..4b3bdb74d 100644 --- a/doc/guide/src/CompileTimeOptions.adoc +++ b/doc/guide/src/CompileTimeOptions.adoc @@ -28,6 +28,12 @@ The default varies depending on architecture. Pass _option_ to `cc` when compiling assembler code. If you wish to pass an option to the assembler, you must use `cc`’s `-Wa,` syntax. +* ``-cc __cc__`` ++ +Specify the executable for the C compiler. The C compiler is also invoked to +compile assembly (`.s` files) to object code (`.o` files) and to link object +code into an executable. + * ``-cc-opt __option__`` + Pass _option_ to `cc` when compiling C code. diff --git a/man/mlton.1 b/man/mlton.1 index 683af2987..f089533c9 100644 --- a/man/mlton.1 +++ b/man/mlton.1 @@ -49,6 +49,12 @@ Pass \fIoption\fP to \fBgcc\fP when compiling assembler code. If you wish to pass an option to the assembler, you must use \fBgcc\fP's \fB\-Wa,\fP syntax. +.TP +\fB\-cc \fIcc\fP\fR +Specify the executable for the C compiler. The C compiler is also invoked to +compile assembly (\fB.s\fP files) to object code (\fB.o\fP files) and to link +object code into an executable. + .TP \fB\-cc\-opt \fIoption\fP\fR Pass \fIoption\fP to \fBgcc\fP when compiling C code. diff --git a/mlton/main/main.fun b/mlton/main/main.fun index d3bcc73f6..6d3d6ebd1 100644 --- a/mlton/main/main.fun +++ b/mlton/main/main.fun @@ -265,7 +265,7 @@ fun makeOptions {usage} = (Expert, "bounce-rssa-usage-cutoff", "", "Maximum variable use count to consider", Int (fn i => bounceRssaUsageCutoff := (if i < 0 then NONE else SOME i))), - (Expert, "cc", " ", "set C compiler", + (Normal, "cc", " ", "executable for C compiler", SpaceString (fn s => cc := String.tokens (s, Char.isSpace))), (Normal, "cc-opt", " ", "pass option to C compiler",