Main Content

target.PairedDirective Class

Namespace: target

Describe pair of command-line flags

Since R2023a

Description

Use a target.PairedDirective object to describe a pair of command-line flags that you use together. For example, --start-group and --end-group, which enables multi-pass linking of a group of libraries.

To create a target.PairedDirective object, use the setDirective method of the target.BuildTool object.

Properties

expand all

Name of directive pair.

Attributes:

GetAccess
public
SetAccess
public

Value of start directive.

Attributes:

GetAccess
public
SetAccess
public

Value of end directive.

Attributes:

GetAccess
public
SetAccess
public

Examples

collapse all

This code snippet shows how you can specify a C linker that groups libraries that have circular dependencies.

cLinker = target.create('BuildTool', 'Linker', 'gcc', ...
    'Name', 'MinGW Linker', ...
    'HostOperatingSystemSupport', target.HostOperatingSystemSupport.WindowsOnly);
cLinker.setDirective('LibraryGroup', '-Wl,--start-group', '-Wl,--end-group');

Version History

Introduced in R2023a