PowerAda Build Options Dialog

From OC Systems Wiki!
Jump to: navigation, search

Clicking the Options button in any of the Powerada Build Windows brings up the Build Options Dialog for that window.

The options may be changed at any time the Options button is sensitive. Changes affect the options for the current Build Window only unless the "Save these options" toggle is set.

Clicking Cancel on the Build Options Dialog cancels any changes made, even if you clicked "Save" on one or more of the pages.

The build operations are implemented by invoking the command-line tool aprojbuild, which does its job by invoking the ada compiler to compile source files and compilation units, and then bind them into main programs.

There are three corresponding tabs which may be selected to set the Build Options (for aprojbuild), Compile Options (when compiling files or units) and Bind Options (when producing a main program). The Bind options tab only appears if the job was initiated by Bind Main or Update Executable.

Build Options

The "page" corresponding to the Build Options tab presents the following options:

Continue even if error occurs (-F)

Displays error to Output window and moves on to subsequent file. Note: this option overrides Edit Errors if both are specified.

Inherit existing compile/bind options (-O)

Applies options from compile options page only to new files. Files which are already loaded or compiled are recompiled with the same options.

Operate on all files, not just new (-a)

By default, an compile or bind operation is only performed if it is determined to be necessary. By specifying this, the specified files or units are always compiled, or the specified program is always linked, regardless of whether it has changed. Files or units which are not explicitly specified are still only compiled if necessary.

Edit Errors (-e)

If this box is unchecked, build jobs halt upon compilation errors, rather than pausing for the errors to be fixed. This is ignored if Continue even if error occurs is selected.

See CHAPTER 4, "Using XEmacs to Fix Compilation Errors" for more information.

Prompt Before Editing Errors (-e)

If this box and Edit Errors are checked, a confirmation dialog appears before the file containing compilation errors is opened in the text editor. Otherwise, the file is opened immediately.

Load changed files (-l)

When performing an Update operation, searches the files comprising the updated entity to see if any have changed since they were last compiled, and updates these automatically. If Preview is selected, this may result in a prompt for loading these files so the true impact of the recompilation may be determined.

Fail (don't Wait) for write-lock (-w)

Only one build operations may proceed in a given working project at anytime. When one is running, subsequent ones wait by default. A waiting build can be interrupted. Enable this option if you don't want a build to wait, but fail immediately when another is already in progress.

Compile Options

The Compile Options page contains toggles for the following ada options:

  • Produce assembly listing (-a)
  • Generate source listing (-l)
  • Suppress runtime exception checks (-S)
  • Generate optimized code (-O)
  • Emit verbose compiler output (-v)
  • Specify target architecture (-qarch={com|ppc|pwr|pwr2})
  • Defer generics to subunits (-qinstances=defer|inline)

See the man page for the ada compiler for a more detailed description of these options.

Compile options apply only to files on a Load or Compile operation: an Update operation will always inherit compile options.

The Compile Options chosen apply to all files listed at the top of the Output window. The only way to specify different options for a subset of those files is to cancel the build operation and invoke LOAD on the files which are to have a given set of options.

Specifying Compile Options forces the selected files to be LOADed unless "Inherit existing compile options" is checked in the Build Options.

To see what options files will be loaded or compiled with, use Preview. The compilation options follow the sublibrary name in each build command written to the Output Window.

Bind Options

The Bind Options page allows specifying a subset of the ada Options for Linking and Options for Other Compiler Features:

Program name (-o)

Designate where the target executable will go. This is set on a per-operation basis and is not saved for subsequent Build windows.

Linker (ld) options (-i)

Specify options to the linker command. Options are included in the order specified.

Non-Ada Archive, Object Files (-i)

A blank- or comma-separated list of names. These should be absolute pathnames, or else relative to the directory containing the root sublibrary against which the program in being built.

Don't bind, just make main linkable (-d)

May be specified on a Bind Main or Update Executable operation to indicate that all required units for the program should be compiled, but no attempt should be made to link a new executable. This may be done in the case where the bind is to be done by hand, from a different processor, with special options, etc.

Dont link against previous binary (-X)

By default, the Update Executable operation uses the previous executable as the starting point for changes. This is not desirable if it is known that many units have been changed since the last executable, or that non-Ada source has been changed in the project sublibraries. In such cases, enable this option to force the link to reference the original object code rather than the previous executable.

On each of the options pages there is a toggle where you indicate whether you wish to save the settings there as the initial settings for subsequent Build operations in new Powerada Build Windows. By default, the Build Options are always saved, and Compile and Bind options are not.

Note that you may not want to save Bind Options, since they are not specific to the program you are binding, and will be applied to every subsequent Bind Main or Update Executable operation.

On each of the options pages there is a typein where additional command-line options may be entered. On the Build Options page these are aprojbuild options; on the Compile and Bind pages they are ada options. Compilation options may be specified with "--" in the Build Options typein are ignored.

The aprojbuild command and any error messages that result are echoed to the Output Window. If the command fails you can change the options and try again.