Main Content

Toolchain

Toolchain to use when building executable program or library

Model Configuration Pane: Code Generation

Description

The Toolchain parameter specifies the toolchain that CMake or the code generator uses to build an executable program or library.

Note

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

Settings

Automatically locate an installed toolchain (default)

The list of available toolchains depends on your development computer platform. The list can include custom toolchains that you added.

When Toolchain is set to Automatically locate an installed toolchain, the code generator:

  1. Searches your development computer for installed toolchains.

  2. Selects the compiler that you specified last by using the mex -setup command. The build process uses the compiler to compile generated C or C++ code.

  3. Displays the name of the selected toolchain immediately below the Toolchain field.

Tips

Click Validate Toolchain to verify that the registration information for the toolchain is valid. When the validation process is complete, a Validation report window displays the results. The Validation report states whether the toolchain registration passed or failed and provides status for each step and build tool in the validation process. If the tool chain definition omits a build tool, validation skips the unspecified tool. To fix a failure (for example, the build tool definition omits a required build tool, such as the compiler or linker), edit the toolchain definition and repeat the registration process.

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Programmatic Use

Parameter: Toolchain
Type: character vector
Value: 'Automatically locate an installed toolchain' | A valid toolchain name
Default: 'Automatically locate an installed toolchain'

Version History

Introduced in R2013b