Shell Control Options
SC100 C Compiler
3-15
3.3.1 Controlling the Behavior of the Shell
The options described in this section enable you to control the overall actions of the shell. You can specify
the stage at which the shell program will stop processing, define files containing command line options,
and display the invocation commands.
3.3.1.1 Controlling where the shell stops processing
By default, the shell will complete the entire processing cycle, from the input of source files through all the
intermediate stages to the output of the final executable. If you want to stop the processing at a specific
stage, you can use one of the options
-E
,
-cfe
,
-S
, or
-c
. In this way, you can process and check
individual files or groups of files through different stages, until they are finally ready to be compiled and
linked together.
Select one of the following options:
Following processing with any of the above options, the output files are written to the current directory, or
if the
-r
option has been included, to the specified directory. The output files are assigned the same names
as the input files, with the extension for the selected option, as shown above. Any existing files in the
directory with the same name and extension are overwritten.
The starting point for the processing of each input file is determined by its file extension. Refer to
Table 3-1 on page 3-7 for an explanation of file extensions, and to
Section 3.3.3,
“
Overriding Input File
Extensions,
”
for a description of the options you can use to override these extensions.
-E
The shell stops after preprocessing the C source files. Output files are assigned the extension .
i
.
Comments are not preserved in the preprocessing output, unless the option
-C
is specified. See
Section 3.3.2.1,
“
Changing preprocessed output,
”
for details of
-C
and other options that add
specific features to the preprocessing output.
-cfe
The shell stops after processing the input source files through the Front End. You can use this
option to check that the files are valid source files, which meet the essential requirements for
processing by the shell, for example, they contain no syntax errors. This is primarily useful when
preparing files for global optimization. Output files are IR files, assigned the extension .
-obj
.
The
-cfe
option enables you to create libraries of object files for use later when compiling in
global optimization mode.
-S
The shell stops after compiling the source files to assembly files, and does not invoke the
assembler. Output files are assigned the extension .
sl
by default.
-c
The shell stops after compiling C and assembly source files to object code, and does not invoke
the linker. The object code output files are assigned the extension .
eln
.