Using SoftBench

Building Projects and Targets

Table 2-5

Compile Mode Settings

 

 

 

 

 

 

 

 

Compile Mode

 

Default Compiler Flag

 

 

 

 

 

 

 

Debug

 

Select to prepare an object file for

 

 

 

 

 

debugging; "-g" is the default for all

 

 

 

 

 

compilers except aCC; "-g0" is the default for

 

 

 

 

 

the aCC compiler.

 

 

 

 

 

 

 

Static

 

Select to prepare for static analysis; "-y" is

 

 

 

 

 

the default.

 

 

 

 

 

 

 

Optimized

 

Select to tell the compiler to optimize the

 

 

 

 

 

executable (to maximize the execution speed

 

 

 

 

 

and minimize space usage); "-O" is the

 

 

 

 

 

default.

 

 

 

 

 

 

For project build projects, you can override the default compiler flags

 

sent to the compiler for a compile mode by changing the build

 

configuration:

 

 

 

1. To change the compile mode settings for all targets using a build

 

 

configuration, choose "Builder: Manage Build Configurations…".

 

 

To change the compile mode settings for a single target, select the

 

 

target, then choose "Target: Modify Properties…". In the "Modify

 

 

Target Properties" dialog box, select Customize Build Configuration… .

 

2. Expand the "Specify Include and Compile Options" section of the

 

 

dialog box.

 

 

 

3.

Select the compiler in the "Set Information for Compiler"

 

 

drop-down list. This setting controls what compiler is affected when

 

 

you enter information such as additional compiler flags, defines,

 

 

undefines, and compile modes.

 

4.

Select Set Compile Modes… to display the "Set Compile Modes" dialog

 

 

box.

 

 

 

5.

In the "Set Compile Modes" dialog box, enter the compiler flags. For

 

 

example, to override the "-g0" compile mode setting for debugging

 

 

aC++ code, enter another value, such as "-g" in the "DEBUG Compiler

 

 

Flags" input box.

 

 

6. Save your changes and close the dialog boxes.

Chapter 2

71

Page 71
Image 71
HP UX SoftBench Software manual Compile Mode Settings Default Compiler Flag