compile_executable

Function

Compiles code and returns an executable object.

Function Prototype

executable = compile_executable(build_script, src_file)

Parameters

Parameter

Input/Output

Description

build_script

Input

Path of the script file used to compile the application to be tuned.

Data type: str.

This parameter is required.

src_file

Input

Code file path

Data type: str.

This parameter is required.

output_bin_path

Input

Path of the executable file generated after compilation.

Data type: str.

This parameter is optional. The default value is _gen_executable.

use_cache

Input

After this parameter is enabled, no compilation is performed but the file specified by output_bin_path is loaded.

Data type: bool.

This parameter is optional. The default value is False.

NOTE:

When the msDebug tool is used to start the compile API, set use_cache to True.

profiling_cmd

Input

Reserved.

Return Value

Executable program object. The type is CompiledExecutable. It can be called in the following mode: executable (arg1, arg2, ...), where arg1, arg2, ... are user-defined input parameters.

Example

executable = compile_executable(build_script, src_file)
executable(a, b, c)