$ which fsharpc
/usr/local/bin/fsharpc
$ cat /usr/local/bin/fsharpc
#!/bin/sh
EXEC="exec "
if test x"$1" = x--debug; then
DEBUG=--debug
shift
fi
if test x"$1" = x--gdb; then
shift
EXEC="gdb --eval-command=run --args "
fi
if test x"$1" = x--valgrind; then
shift
EXEC="valgrind $VALGRIND_OPTIONS"
fi
# Beware this line must match the regular expression " (\/.*)\/fsi\.exe" when fsc.exe is fsi.exe.
# That's because the FSharp MonoDevelop addin looks inside the text of this script to determine the installation
# location of the default FSharp install in order to find the FSharp compiler binaries (see
# fsharpbinding/MonoDevelop.FSharpBinding/Services/CompilerLocationUtils.fs). That's a pretty unfortunate
# way of finding those binaries. And really should be changed.
$EXEC /usr/bin/mono $DEBUG $MONO_OPTIONS /usr/local/lib/mono/4.5/fsc.exe --exename:$(basename "$0") "$@"
$ file /usr/local/lib/mono/4.5/fsc.exe
/usr/local/lib/mono/4.5/fsc.exe: PE32 executable (console) Intel 80386 Mono/.Net assembly, for MS Windows
$ mono /usr/local/lib/mono/4.5/fsc.exe --help
F# Compiler for F# 4.0 (Open Source Edition)
Freely distributed under the Apache 2.0 Open Source License
- OUTPUT FILES -
--out: Name of the output file (Short form: -o)
--target:exe Build a console executable
--target:winexe Build a Windows executable
--target:library Build a library (Short form: -a)
--target:module Build a module that can be added to another assembly
--delaysign[+|-] Delay-sign the assembly using only the public portion of the strong name key
--publicsign[+|-] Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed
--doc: Write the xmldoc of the assembly to the given file
--keyfile: Specify a strong name key file
--keycontainer: Specify a strong name key container
--platform: Limit which platforms this code can run on: x86, Itanium, x64, anycpu32bitpreferred, or anycpu. The default is
anycpu.
--nooptimizationdata Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining
but improves binary compatibility.
--nointerfacedata Don't add a resource to the generated assembly containing F#-specific metadata
--sig: Print the inferred interface of the assembly to a file
--nocopyfsharpcore Don't copy FSharp.Core.dll along the produced binaries
- INPUT FILES -
--reference: Reference an assembly (Short form: -r)
- RESOURCES -
--win32res: Specify a Win32 resource file (.res)
--win32manifest: Specify a Win32 manifest file
--nowin32manifest Do not include the default Win32 manifest
--resource: Embed the specified managed resource
--linkresource: Link the specified resource to this assembly where the resinfo format is [,[,public|private]]
- CODE GENERATION -
--debug[+|-] Emit debug information (Short form: -g)
--debug:{full|pdbonly|portable} Specify debugging type: full, portable, pdbonly. ('full' is the default and enables attaching a debugger to a
running program. 'portable' is a cross-platform format).
--optimize[+|-] Enable optimizations (Short form: -O)
--tailcalls[+|-] Enable or disable tailcalls
--crossoptimize[+|-] Enable or disable cross-module optimizations
- ERRORS AND WARNINGS -
--warnaserror[+|-] Report all warnings as errors
--warnaserror[+|-]: Report specific warnings as errors
--warn: Set a warning level (0-5)
--nowarn: Disable specific warning messages
--warnon: Enable specific warnings that may be off by default
--consolecolors[+|-] Output warning and error messages in color
- LANGUAGE -
--checked[+|-] Generate overflow checks
--define: Define conditional compilation symbols (Short form: -d)
--mlcompatibility Ignore ML compatibility warnings
- MISCELLANEOUS -
--nologo Suppress compiler copyright message
--help Display this usage message (Short form: -?)
--@ Read response file for more options
- ADVANCED -
--codepage: Specify the codepage used to read source files
--utf8output Output messages in UTF-8 encoding
--fullpaths Output messages with fully qualified paths
--lib: Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I)
--baseaddress: Base address for the library to be built
--noframework Do not reference the default CLI assemblies by default
--standalone Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated
--staticlink: Statically link the given assembly and all referenced DLLs that depend on this assembly. Use an assembly name e.g.
mylib, not a DLL name.
--resident Use a resident background compilation service to improve compiler startup times.
--pdb: Name the output debug file
--simpleresolution Resolve assembly references using directory-based rules rather than MSBuild resolution
--highentropyva[+|-] Enable high-entropy ASLR
--subsystemversion: Specify subsystem version of this assembly
--targetprofile: Specify target framework profile of this assembly. Valid values are mscorlib or netcore. Default - mscorlib
--quotations-debug[+|-] Emit debug information in quotations