CL /Fa



The optional argument consists of whatever follows immediately within the same command-line token.

For the parsing:

If there are two or more compilable input files, it is an error (D2036) to provide an argument except in the syntax that ends with a backslash. Refer to the note on the error for some subtlety about what counts as a compilable input file in this context.


The /Fa option overrides /Fc and /Fl and earlier instances of itself. Only the last instance has its argument checked.

This option passes to the back-end C/C++ compiler (C2), though possibly modified. In particular, name and ext are resolved from defaults if they are not given. The default name is that of the source file. The default ext is “asm” ordinarily, but “cod” if a /FA option is given and its argument contains c.

Additionally, if no /FA is given (before or after), the /Fa option generates a /FAa for the back-end C/C++ compiler (C2).


The /Fa option asks that an assembly-language listing be created for each source file. The /Fa option may specify how to name the listing files. The style of listing is left to the /FA option. In default of a /FA option, the listings have just the a style.

The following table shows on the left a /Fa option in its various syntactic cases and on the right the corresponding pathname that CL generates for C2 to use for the listing file that is to be produced from compiling a source file whose file name (disregarding any file extension) is source

option as given pathname for listing file
/Fa[[path]\][name].[ext] [[path]\][name].[ext]
/Fa[[path]\]name [[path]\]name.lst
/Fa[[path]\] [[path]\]source.lst

The lst placeholder stands for “asm” in general, but “cod” if a /FA option is given with a styles argument and c is among the styles.