S2scompile: Difference between revisions

From STRIDE Wiki
Jump to navigation Jump to search
No edit summary
Line 117: Line 117:
=== Examples ===
=== Examples ===
Refer to the [[Build_Tools#Compiling_multiple_files|Compiling]] section of the Build Tools Examples.
Refer to the [[Build_Tools#Compiling_multiple_files|Compiling]] section of the Build Tools Examples.
[[Category:Build_Tools]]

Revision as of 21:31, 21 August 2008

The SCL Compiler Utility

The s2sCompile.exe executable will compile a set of scl files (C/C++ source files with SCL pragmas) and produce a meta file for each (assuming that compilation is successful). All warnings and errors that occur during the compilation are written to the standard output device. The compilation for a particular file is considered successful if no errors occur. Otherwise it is unsuccessful. Unsuccessful compilations do not yield .meta files. Options are validated and any incorrect options diagnosed will result in compilation process failure.

Syntax

s2scompile [options] scl_file1 [scl_fileN]

Options

Option Description
--preprocess Do preprocessing only. Write preprocessed text file to the output. The output file suffix is automatically changed to ".i".
--dependencies Do preprocessing only. Instead of the normal preprocessing output, generate in the preprocessing output file a list of dependency lines suitable for input to the UNIX make program.
--no_line_commands Same as –-preprocess except that line number information is removed from the preprocessed output files.
--c++ Enable compilation of c++.
--c Enable compilation of C (specifically C89). This is the default.
--include_directory=<dir>

--sys_include=<dir>
-I<dir>

Add dir to the end of the list of directories searched for #includes.
--define_macro=<name>[(parameter-list)][=def]

-D<name>[(parameter-list)][=def]

Define macro <name> as def. if "=def" is omitted, define <name> as 1.
--accept_zero_length_array Accept zero length arrays declared in structs
--no_warning Suppress all warnings in the compilation phase.
--compatibility=<string> Vendor compatibility mode. String can be "microsoft", "generic" or "gnu". Default is "generic". When "Microsoft" is set, the compiler supports a number of extensions to the C or C++ language that are compatible with the Microsoft family of compilers. "gnu" - instructs the compiler to support language extensions compatible with the Gnu family of compilers.
--output=<path>

-o<path>

Output file or directory. The default is the current directory.
--targ_big_endian Target uses a big endian by representation. The default is little endian.
--targ_plain_char_is_unsigned Target uses unsigned chars to represent “plain” char. The default is signed.
--targ_adaptive_enum Target has adaptive enums. The default is no adaptive enums.
--targ_pack_alignment=<align> Target struct pack alignment. The default is 16. Possible values are 1, 2, 4, 8 or 16.
--targ_sizeof_char=<size> Target platform size of char. Default is 1. Possible values are 1, 2, 4, 8, or 16.
--targ_alignof_char=<align> Target platform alignment of char. Default is 1. Possible values are 1, 2, 4, 8 or 16.
--targ_sizeof_short=<size> Default is 2.
--targ_alignof_short=<align> Default is 2.
--targ_sizeof_int=<size> Default is 4.
--targ_alignof_int=<align> Default is 4.
--targ_sizeof_long=<size> Default is 4.
--targ_alignof_long=<align> Default is 4.
--targ_sizeof_long_long=<size> Default is 8.
--targ_alignof_long_long=<align> Default is 8.
--targ_sizeof_float=<size> Default is 4.
--targ_alignof_float=<align> Default is 4.
--targ_sizeof_double=<size> Default is 8.
--targ_alignof_double=<align> Default is 8.
--targ_sizeof_long_double=<size> Default is 8
--targ_alignof_long_double=<align> Default is 8.
--options_file=<file> A file that contains command line options. The format is the same as the command line with the only addition that it could be split on multiple lines. A line starting with "#" symbol is ignored.

This option is necessary if the length of the command line string exceeds system limits. Otherwise it is provided only as a convenience.

Examples

Refer to the Compiling section of the Build Tools Examples.