Main Content

Build configuration

Build configuration defined by toolchain

Model Configuration Pane: Code Generation


The Build configuration parameter specifies compiler optimization or debug settings for the specified toolchain.


This parameter appears when the model is configured with a system target file that specifies toolchain-based code generation, as described in Configure Toolchain (ToolchainInfo) or Template Makefile Build Process.


Selecting Specify displays a table of tools with editable options. Use this table to customize settings for the current model. See Toolchain details.


Faster Builds (default) | Faster RunsDebug | Specify
Faster Builds

Optimizes for shorter build times.

Faster Runs

Optimizes for executable program that runs faster.


Optimizes for debugging.


Displays a table of tools with editable options. Use the table to customize settings for the current model. See Toolchain details.

This interaction helps synchronize the Toolchain value and Build configuration settings that you specify manually.

Modifying the setting of Build configuration, can change the Toolchain value. The Automatically locate an installed toolchain is the only value for Toolchain that is affected by changing the Build configuration to Specify.

  • Changing the setting of Build configuration to Specify, changes the Toolchain value Automatically locate an installed toolchain (default) to the value of the toolchain that was located (for example, Microsoft Visual C++ 2012 v11.0 |(64-bit Windows)).

  • Changing Build configuration from Specify to another value does not change the Toolchain value.


Click Show settings to display a table of tools with options for the current build configuration. See Toolchain details.

Customize the toolchain options for the Specify build configuration. These options only apply to the current project.

To extract macro definitions (including compiler optimization flags) from the generated makefile for toolchain approach builds on Windows® or UNIX® systems, see the model.bat description in Manage Build Process Files.

Recommended Settings

TraceabilityNo impact
EfficiencyFaster Runs
Safety precautionNo impact

Programmatic Use

Parameter: BuildConfiguration
Type: character vector
Value: 'Faster Builds' | 'Faster Runs' | 'Debug' | 'Specify'
Default: 'Faster Builds'

Version History

Introduced in R2013b