Developer Guide and Reference

ID 767253
Date 10/31/2024
Public
Document Table of Contents

sox

Tells the compiler to save the compilation options in the executable file.

Syntax

Linux:

-sox[=keyword[,keyword]]

-no-sox

Windows:

None

Arguments

keyword

Is the routine information to include. Possible values are:

inline

Includes a list of the functions that were inlined in each object.

profile

Includes data when profile was used for functions that were compiled with Clang options that enable profile-guided optimization (PGO) such as -fprofile-use and -fprofile-instr-use.

secure

Strips out directory names and the options that use them.

Default

-no-sox

The compiler does not save these informational strings in the object file.

Description

This option tells the compiler to save the compilation options in the executable file. The information is embedded as a string in each object file or assembly output.

If you specify option sox with no keyword, the compiler saves the compiler options and version number used in the compilation of the objects that make up the executable.

When you specify this option, the size of the executable on disk is increased slightly. When you link the object files into an executable file, the linker places each of the information strings into the header of the executable. It is then possible to use a tool, such as a strings utility, to determine what options were used to build the executable file.

NOTE:

This option only applies to host compilation. When offloading is enabled, it does not impact device-specific compilation.

IDE Equivalent

None

Alternate Options

None

Examples

The following shows examples of using this option:

icpx -sox file.cpp
icpx -sox=inline,profile file.cpp
icpx -sox=inline -sox=profile file.cpp          // same as -sox=inline,profile
icpx -sox=inline -no-sox -sox=profile file.cpp  // same as -sox=profile