[MonoDevelop] CSharpCompilerParameters and CSharpProjectParameters
Michael Hutchinson
m.j.hutchinson at gmail.com
Fri Apr 9 12:20:53 EDT 2010
On Thu, Apr 8, 2010 at 11:09 PM, Vasili I. Galchin <vigalchin at gmail.com> wrote:
> To put my question another way, of all "fsc --help" CLI parms which
> make sense to support in MonoDevelop F# support:
>
> - OUTPUT FILES -
> --out:<file> 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
> --doc:<file> Write the xmldoc of the assembly to the given
> file
> --keyfile:<file> Specify a strong name key file
> --keycontainer:<string> Specify a strong name key container
> --platform:<string> Limit which platforms this code can run on: x86,
> Itanium, x64 or anycpu. The default is anycpu.
The C# binding has all of these. Most of them are generic .NET project
settings, not language-specific.
> --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
These might be useful. However, you don't need to add GUI for all
"advanced" settings like this immediately - you can do like the C#
binding does and have an entry for "additional compiler arguments" so
the user can input any arguments that are not supported directly.
> --sig:<file> Print the inferred interface of the assembly to
> a file
I don't think these are useful when using it as a compiler from MD.
> - INPUT FILES -
> --reference:<file> Reference an assembly (Short form: -r)
This comes from the references list, not the settings :)
> - RESOURCES -
> --win32res:<file> Specify a Win32 resource file (.res)
> --win32manifest:<file> Specify a Win32 manifest file
> --nowin32manifest Do not include the default Win32 manifest
> --resource:<resinfo> Embed the specified managed resource
> --linkresource:<resinfo> Link the specified resource to this assembly
> where the resinfo format is <file>[,<string
> name>[,public|private]]
All generic .NET settings or from the resources list, I think.
> - CODE GENERATION -
> --debug[+|-] Emit debug information (Short form: -g)
> --debug:{full|pdbonly} Specify debugging type: full, pdbonly. ('full'
> is the default and enables attaching a debugger
> to a running program).
> --optimize[+|-] Enable optimizations (Short form: -O)
C# has these.
> --tailcalls[+|-] Enable or disable tailcalls
> --crossoptimize[+|-] Enable or disable cross-module optimizations
F#-only AFAIK.
> - ERRORS AND WARNINGS -
> --warnaserror[+|-] Report all warnings as errors
> --warnaserror[+|-]:<warn;...> Report specific warnings as errors
> --warn:<n> Set a warning level (0-4)
> --nowarn:<warn;...> Disable specific warning messages
C# has these.
> - LANGUAGE -
> --checked[+|-] Generate overflow checks
> --define:<string> Define conditional compilation symbols (Short
> form: -d)
C# has these.
> --mlcompatibility Ignore ML compatibility warnings
F# only.
> - MISCELLANEOUS -
> --nologo Suppress compiler copyright message
> --help Display this usage message (Short form: -?)
Not useful from MD.
> - ADVANCED -
> --codepage:<n> Specify the codepage used to read source files
> --utf8output Output messages in UTF-8 encoding
C# has these.
> --fullpaths Output messages with fully qualified paths
Probably useful to enable by default, no need for a setting.
> --lib:<dir;...> Specify a directory for the include path which
> is used to resolve source files and assemblies
> (Short form: -I)
I think these maybe useful for MSBuild hint paths? Or for using
(shorter) relative paths when specifying source files.
> --baseaddress:<address> Base address for the library to be built
Not sure what this is used for.
> --noframework Do not reference the default CLI assemblies by
> default
C# uses something similar (noresponse) to ensure that only the
referenced assemblies are linked.
> --standalone Statically link the F# library and all
> referenced DLLs that depend on it into the
> assembly being generated
> --staticlink:<file> 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.
F#-only settings, pretty advanced.
> --resident Use a resident background compilation service to
> improve compiler startup times.
Probably useful.
> --pdb:<string> Name the output debug file
Probably don't need this.
> --simpleresolution Resolve assembly references using
> directory-based mono rules rather than MSBuild
> resolution (Default=false except when running
> fsc.exe under mono)
Don't need this, you can pass full paths.
However, really, you should look at fsproj files from Visual Studio
and use the same settings elements that VS does, so that the projects
are compatible. If you look at a csproj file, you can see how the
serializable field/properties in CSharpCompilerParameters and
CSharpProjectParameters and DotNetConfiguration and DotNetProject all
map to MSBuild elements.
--
Michael Hutchinson
http://mjhutchinson.com
More information about the Monodevelop-list
mailing list