Difference between revisions of "S2scompile"

From STRIDE Wiki
Jump to: navigation, search
Line 33: Line 33:
 
| Add dir to the end of the list of directories searched for #includes.
 
| Add dir to the end of the list of directories searched for #includes.
 
|-
 
|-
| --define_macro=<i><name></i>[(<i>parameter-list</i>)][=<i>def</i>]<br>
+
| '''--define_macro='''<i><name></i>['''('''<i>parameter-list</i>''')''']['''='''<i>def</i>]<br>
-D<i><name></i>[(<i>parameter-list</i>)][=<i>def</i>]
+
'''-D'''<i><name></i>['''('''<i>parameter-list</i>''')''']['''='''<i>def</i>]
 
| Define macro <i><name></i> as <i>def</i>. if "=<i>def</i>" is omitted, define <i><name></i> as 1.
 
| Define macro <i><name></i> as <i>def</i>. if "=<i>def</i>" is omitted, define <i><name></i> as 1.
 
|-
 
|-
| --accept_zero_length_array
+
| '''--accept_zero_length_array'''
 
| Accept zero length arrays declared in structs
 
| Accept zero length arrays declared in structs
 
|-
 
|-
| --no_warning
+
| '''--no_warning'''
 
| Suppress all warnings in the compilation phase.
 
| Suppress all warnings in the compilation phase.
 
|-
 
|-
| --compatibility=<i><string></i>
+
| '''--compatibility='''<i><string></i>
 
| 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.
 
| 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=<i><path></i><br>
+
| '''--output='''<i><path></i><br>
 
-o<path>
 
-o<path>
 
| Output file or directory. The default is the current directory.
 
| Output file or directory. The default is the current directory.
 
|-
 
|-
| --targ_big_endian
+
| '''--targ_big_endian'''
 
| Target uses a big endian by representation. The default is little endian.
 
| Target uses a big endian by representation. The default is little endian.
 
|-
 
|-
| --targ_plain_char_is_unsigned
+
| '''--targ_plain_char_is_unsigned'''
 
| Target uses unsigned chars to represent “plain” char. The default is signed.
 
| Target uses unsigned chars to represent “plain” char. The default is signed.
 
|-
 
|-
| --targ_adaptive_enum
+
| '''--targ_adaptive_enum'''
 
| Target has adaptive enums. The default is no adaptive enums.
 
| Target has adaptive enums. The default is no adaptive enums.
 
|-
 
|-
| --targ_pack_alignment=<i><align></i>
+
| '''--targ_pack_alignment='''<i><align></i>
 
| Target struct pack alignment. The default is 16. Possible values are 1, 2, 4, 8 or 16.
 
| Target struct pack alignment. The default is 16. Possible values are 1, 2, 4, 8 or 16.
 
|-
 
|-
| --targ_sizeof_char=<i><size></i>
+
| '''--targ_sizeof_char='''<i><size></i>
 
| Target platform size of char. Default is 1. Possible values are 1, 2, 4, 8, or 16.
 
| Target platform size of char. Default is 1. Possible values are 1, 2, 4, 8, or 16.
 
|-
 
|-
| --targ_alignof_char=<i><align></i>
+
| '''--targ_alignof_char='''<i><align></i>
 
| Target platform alignment of char. Default is 1. Possible values are 1, 2, 4, 8 or 16.
 
| Target platform alignment of char. Default is 1. Possible values are 1, 2, 4, 8 or 16.
 
|-
 
|-
| --targ_sizeof_short=<i><size></i>
+
| '''--targ_sizeof_short='''<i><size></i>
 
| Default is 2.
 
| Default is 2.
 
|-
 
|-
| --targ_alignof_short=<i><align></i>
+
| '''--targ_alignof_short='''<i><align></i>
 
| Default is 2.
 
| Default is 2.
 
|-
 
|-
| --targ_sizeof_int=<i><size></i>
+
| '''--targ_sizeof_int='''<i><size></i>
 
| Default is 4.
 
| Default is 4.
 
|-
 
|-
| --targ_alignof_int=<i><align></i>
+
| '''--targ_alignof_int='''<i><align></i>
 
| Default is 4.
 
| Default is 4.
 
|-
 
|-
| --targ_sizeof_long=<i><size></i>
+
| '''--targ_sizeof_long='''<i><size></i>
 
| Default is 4.
 
| Default is 4.
 
|-
 
|-
| --targ_alignof_long=<i><align></i>
+
| '''--targ_alignof_long='''<i><align></i>
 
| Default is 4.
 
| Default is 4.
 
|-
 
|-
| --targ_sizeof_long_long=<i><size></i>
+
| '''--targ_sizeof_long_long='''<i><size></i>
 
| Default is 8.
 
| Default is 8.
 
|-
 
|-
| --targ_alignof_long_long=<i><align></i>
+
| '''--targ_alignof_long_long='''<i><align></i>
 
| Default is 8.
 
| Default is 8.
 
|-
 
|-
| --targ_sizeof_float=<i><size></i>
+
| '''--targ_sizeof_float='''<i><size></i>
 
| Default is 4.
 
| Default is 4.
 
|-
 
|-
| --targ_alignof_float=<i><align></i>
+
| '''--targ_alignof_float='''<i><align></i>
 
| Default is 4.
 
| Default is 4.
 
|-
 
|-
| --targ_sizeof_double=<i><size></i>
+
| '''--targ_sizeof_double='''<i><size></i>
 
| Default is 8.
 
| Default is 8.
 
|-
 
|-
| --targ_alignof_double=<i><align></i>
+
| '''--targ_alignof_double='''<i><align></i>
 
| Default is 8.
 
| Default is 8.
 
|-
 
|-
| --targ_sizeof_long_double=<i><size></i>
+
| '''--targ_sizeof_long_double='''<i><size></i>
 
| Default is 8
 
| Default is 8
 
|-
 
|-
| --targ_alignof_long_double=<i><align></i>
+
| '''--targ_alignof_long_double='''<i><align></i>
 
| Default is 8.
 
| Default is 8.
 
|-
 
|-
| --options_file=<i><file></i>
+
| '''--options_file='''<i><file></i>
 
| 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.
 
| 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.  
 
This option is necessary if the length of the command line string exceeds system limits. Otherwise it is provided only as a convenience.  

Revision as of 18:04, 29 September 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.