![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Switches This appendix provides brief descriptions of Apex context switches that affect Ada semantic checking, code generation, linking, and program execution. For information on the mechanics of using these switches, see the Programming with Apex Guide.
The following sections are provided in this appendix. The first sections list the relevant compilation switches grouped by general functionality. The final section provides descriptions of the switches in alphabetical order.
- Switches for Analyzing Ada Units
- Switches for the Rational Ada Code Generator
- Switches for Linking
- Switches for Execution
- Descriptions of Switches
Note: This appendix describes only switches that are delivered as part of standard Rational Apex. Switches that control compilation for layered products, such as the Rational Compilation Integrator, are documented in the manuals for those products
Switches for Analyzing Ada UnitsThe context switches listed below control the semantic analysis of Ada units. These have an effect when you analyze or compile your unit. These switches cannot be specified as command-line options:
- COMPILER_KEY
- FLAG_INEVITABLE_EXCEPTIONS
- IGNORE_INTERFACE_PRAGMAS
- IGNORE_INVALID_REP_SPECS
- IGNORE_REP_SPECS
- IGNORE_UNSUPPORTED_REP_SPECS
- REJECT_BAD_LRM_PRAGMAS
- REJECT_BAD_RATIONAL_PRAGMAS
- REJECT_INEVITABLE_EXCEPTIONS
- REJECT_PROMPTS
- REJECT_UNDEFINED_PRAGMAS
Switches for the Rational Ada Code GeneratorThe context switches listed below affect the generation of Ada code. Except as noted, they can be included as command-line options:
- COMPILER_KEY (cannot be used as a command-line option)
- OPTIMIZATION_LEVEL
- OPTIMIZATION_OBJECTIVE
- PROFILING
Switches for LinkingThe context switches listed below affect the linking of Ada main programs. Except as noted, they can be included as command-line options:
- COMPILER_KEY (cannot be used as a command-line option)
- CONFIGURATION
- ELABORATION_ORDER_LISTING
- INCREMENTAL_LINK (AIX only)
- NON_ADA_LINKAGE
- PROFILING
- RUNTIMES
- RUNTIMES_ARCHIVE
Switches for ExecutionThe session switches (UNIX environment variables) listed below affect the runtime behavior of your program if the options are not already specified with pragma Main. Their behavior is not described in this section. These switches cannot be used as command-line options: For more information about pragma Main, refer to the Ada Compiler Reference Guide.
- APEX_SIGNAL_STACK_SIZE
- APEX_STACK_SIZE
- APEX_NONBLOCKING_IO
- APEX_POSIX_COMPLIANT
- APEX_UNCHECKED_PRIORITIES
- APEX_CONCURRENCY_LEVEL
Descriptions of SwitchesThis section provides an alphabetic listing of Apex context switches that affect semantic checking, code generation, and linking.
COMPILER_KEY
Determines the compiler to use, which provides for platform-specific semantic checking and code generation. The default denotes the Rational Ada compiler running on the current platform. For example, the Compiler_Key pathname ada_rational_rs6k_aix denotes the Rational Ada compiler running AIX on the RISC System/6000.
Warning: Do not change this switch's value manually. It should be changed only by Apex's subsystem mechanisms.
This switch is also used with the Rational Compilation Integrator (RCI).
CONFIGURATION
Specifies the name of a configuration to use when linking main Ada programs. Configurations are implemented as files; they usually have the suffix .cfg. The configuration consists of the full pathnames of views or of the names of other configurations. The correctness of the pathnames is not verified until the configuration is actually used. The default is not to use any configuration file, but rather to use the imports of the view containing the main program.
ELABORATION_ORDER_LISTING
Controls whether a file containing a list of the elaboration order of the units in its closure is created when a main program is coded.
Elaboration-order list can be created only for main programs. An elaboration-order file is stored in the .Rational/Compilation directory; for a main unit named tofu.2.ada the elaboration order file has the name tofu.2.elab_order.
The default is False, which does not produce elaboration-order listings.
FLAG_INEVITABLE_EXCEPTIONS
Controls the handling of any statically determinable situation that is certain to raise an exception when executed, such as an out-of-bounds assignment.
This switch is overridden by the REJECT_INEVITABLE_EXCEPTIONS switch. When REJECT_INEVITABLE_EXCEPTIONS is True, this switch has no effect. If REJECT_INEVITABLE_EXCEPTIONS is False and this switch is:
- True, such situations are reported with warning messages.
- False, such situations are ignored (default).
IGNORE_INTERFACE_PRAGMAS
Causes pragma Interface to be ignored during semantic checking.
Controls whether pragma Interface is ignored. When True, the Rational Ada compiler ignores the pragma completely. When False, the Rational Ada compiler builds an implicit body that raises the Program_Error exception whenever the subprogram is executed. The default is False.
IGNORE_INVALID_REP_SPECS
Controls the handling of invalid or unsupported representation specifications.
Representation specifications are considered invalid if they do not conform to the restrictions specified in the Ada Compiler Reference Guide, LRM Appendix F: Implementation-Dependent Characteristics .
When True, this switch overrides the IGNORE_UNSUPPORTED_REP_SPECS switch. In this case, both invalid and unsupported representation specifications are reported with warning messages in the output window and are otherwise ignored.
When False, the treatment of invalid representation specifications depends on the setting of the IGNORE_UNSUPPORTED_REP_SPECS switch (default).
Note: For most purposes, the IGNORE_INVALID_REP_SPECS switch and the IGNORE_UNSUPPORTED_REP_SPECS switch should have the same value.
IGNORE_REP_SPECS
Causes representation specs to be ignored during semantic analysis.
IGNORE_UNSUPPORTED_REP_SPECS
Controls the handling of unsupported representation specifications.
This switch is overridden by the IGNORE_INVALID_REP_SPECS switch. When IGNORE_INVALID_REP_SPECS is True, this switch has no effect. If IGNORE_INVALID_REP_SPECS is False and this switch is:
- True, unsupported representation specifications are reported with warning messages in the output window and are otherwise ignored.
- False, unsupported representation specifications are treated as errors, causing analysis of the units that contain them to fail (default).
Note: For most purposes, the IGNORE_UNSUPPORTED_REP_SPECS switch and the IGNORE_INVALID_REP_SPECS switch should have the same value.
INCREMENTAL_LINK
Note: This switch applies only to AIX.
Specifies whether to attempt incremental linking when a link is requested.
When True, a link request results in an attempt to update the existing executable by relinking using only those .o files that differ from those used the last time the executable was linked. If it is not possible to do the incremental link, the normal batch link occurs instead.
When False, a request to link results in a batch link of all .o files needed to make a new executable (default).
NON_ADA_LINKAGE
Specifies arguments to pass to the target linker. This can be used to specify object files and archive libraries for non-Ada program units that will be included when an Ada main program is linked. For example, to include compiled C routines named c_routine1 and c_routine2, to include the c_lib.a library, and to produce a linker trace listing:
NON_ADA_LINKAGE: c_routine1.o c_routine2.o c_lib.a -t
The default argument list is empty. For more information about linking, refer to the Ada Compiler Reference Guide.
OPTIMIZATION_LEVEL
Controls optimization performed during code generation. Valid values are the integer values 0 through 2, where 0 is the least optimization and best compilation performance and 2 is the most optimization and best execution performance. The default is 0. Setting the optimization level is discussed in the Ada Compiler Reference Guide.
OPTIMIZATION_OBJECTIVE
Specifies the optimization objective, either Time or Space, to be used for any compilation unit that does not contain a pragma Optimize. Setting the optimization objective is discussed in the Ada Compiler Reference Guide.
PROFILING
Setting this switch to prof or gprof causes the code generator to generate calls to the UNIX system routine .mcount in the prologue of each routine to serve as the runtime recording mechanism specified by the UNIX cc command. When linking, prof causes the -p option to be used, and gprof causes the -pg option to be used. By default, neither value is used.
REJECT_BAD_LRM_PRAGMAS
Controls the handling of illegal Ada pragmas.
When True, illegal Ada pragmas are treated as errors, thus causing analysis of the units that contain them to fail.
When False, illegal Ada pragmas are reported with warning messages in the output window and are otherwise ignored. The default is False.
REJECT_BAD_RATIONAL_PRAGMAS
Controls the handling of illegal Rational-defined pragmas.
When True, illegal Rational pragmas are treated as errors, thus causing analysis of the units that contain them to fail.
When False, illegal Rational pragmas are reported with warning messages in the output window and are otherwise ignored. The default is False.
REJECT_INEVITABLE_EXCEPTIONS
Controls the handling of any statically determinable situation that is certain to raise an exception when executed, such as an out-of-bounds assignment.
When True, overrides the FLAG_INEVITABLE_EXCEPTIONS switch and inevitable exceptions are treated as errors, thus causing analysis of the units that contain them to fail.
When False, the treatment of inevitable exceptions depends on the setting of the FLAG_INEVITABLE_EXCEPTIONS switch. The default is False.
REJECT_PROMPTS
Controls whether the compiler will allow you to code Ada units that contain [statement], [declaration] or other prompts.
When True, units that contain prompts cannot be installed.
When False, units that contain prompts can be installed and coded; the exception Program_Error is raised if a statement prompt is executed. Elaboration of a declaration prompt has no effect.
REJECT_UNDEFINED_PRAGMAS
Controls the handling of any pragmas not defined in the LRM or in this manual.
When True, undefined pragmas are treated as errors, thus causing analysis of the units that contain them to fail.
When False, undefined pragmas are reported with warning messages in the output window and are otherwise ignored. The default is False.
RUNTIMES
Specifies the pathname for the Rational Ada runtimes to use at link time if the default version is not appropriate. In most cases, the default switch value (empty) is the correct one to use. This switch is for use only at the direction of Rational technical support.
RUNTIMES_ARCHIVE
Specifies the name of the runtime archive to be used. Normally, the compiler chooses one of four runtime archives based on the contents of the user's program. This switch allows the user to override the choice made by the compiler.
By contrast, the RUNTIMES switch (which already exists), simply specifies the directory in which to look for the runtime archives. There are actually several archives, but only the principal one can be overridden using the RUNTIMES_ARCHIVE switch.
Rational Software Corporation http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2002, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |