Skip to main content

generateassembly

Controls whether assembly output is generated for source files (in addition to normal compilation).

generateassembly ("value")

Parameters

value specifies the desired behavior:

ValueDescription
DefaultUse the toolset or action's default behavior for this file.
OnGenerate assembly output while continuing to produce the normal object.
VerboseGenerate assembly output with source code or explanatory comments.
OffDisable assembly output.

Notes:

  • GCC and Clang use -save-temps=obj when generateassembly is On. Verbose additionally uses -fverbose-asm.
  • MSVC uses /FA for On and /FAs for Verbose.
  • Assembly files are written to the object directory.

Applies To

Project configurations and files.

Availability

Premake 5.0.0 or later.

Examples

Generate assembly for a configuration, with verbose output for one file:

filter "configurations:Debug"
generateassembly "On"

filter { "configurations:Debug", "files:main.cpp" }
generateassembly "Verbose"