Main Content

Custom compiler optimization flags

Compiler optimization flags

Model Configuration Pane: Code Generation


The Custom compiler optimization flags parameter specifies compiler optimization flags to apply when building the generated code for your model.


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


This parameter is enabled by selecting the value Custom for the parameter Compiler optimization level.


'' (default)

Specify compiler optimization flags without quotes, for example, -O2.

Recommended Settings

See Compiler optimization level.

Programmatic Use

Parameter: RTWCustomCompilerOptimizations
Type: character vector
Value: '' | user-specified flags
Default: ''

Version History

Introduced in R2007b