cscm Module¶
The compiler model adapter module is named cscm. File cscm.py is located in $CSONAR/csurf/src/compmodels.
Functions¶
read_response_file() |
Read a response file and return its contents. |
register_compiler_model() |
Add a model to the set of available compiler models. |
-
cscm.read_response_file(filepath, can_have_comment=False, fallback_to_acp=False, command_line_format=True)¶ -
Read a response file and return its contents.
Parameters: - filepath (str) –
- can_have_comment (bool) –
- fallback_to_acp (bool) –
- command_line_format (bool) –
Return type: [ str ]
cscm.register_compiler_model(model)¶-
Add a model to the set of available compiler models.
Parameters: model ( CompilerModel) – An object of a concreteCompilerModelsubclass. The subclass must define all required methods.
Classes¶
ArmFrontEnd
|
ARM front end |
CSharpFrontEnd
|
A helper class with useful methods for any compiler model that uses the dotnet front end. |
CSharp_CompilerModel
|
A subclass of CompilerModel that provides
implementations of
get_prepend_flags() and
get_append_flags() with
some default arguments used in all C# compiler
models. |
C_CompilerModel
|
A subclass of CompilerModel that provides
implementations of
get_prepend_flags() and
get_append_flags() with
some default arguments used in all C and C++
compiler models. |
CmdArgument
|
Encapsulates a command argument object generated by a compiler model. |
CmdArgumentConf
|
A configuration file. |
CmdArgumentEnvVarPrefix
|
The path to a file, where the path prefix is an environment variable. |
CmdArgumentFile
|
The contents of a file. |
CmdArgumentGTHomeFile
|
The path to a file, prefixed by the path to the CodeSonar installation. |
CmdArgumentHubParams
|
[CodeSonar only] Hub parameters. |
CmdArgumentPrjFilesDirectory
|
The path to the .prj_files directory for the CodeSonar project. |
CmdArgumentString
|
A string. |
CmdArgumentTagUID
|
Tag UID, which is 567_1234567. |
CmdArgumentUID
|
UID, provided with -uid flag. |
CmdArgumentVector
|
Stores an iterable of CmdArgument so that the
same set of arguments can be shared across multiple
FrontEndCommand
objects. |
CmdArgumentWarningFile
|
The cmd_line.tmp.<uid> file. |
CompilerModel
|
Represents a compiler. |
CompilerModelResult
|
Represents the full list of compilation units that make up this portion of the build/analysis. |
EDGFrontEnd
|
Used by compiler model classes to add in command line arguments for executing cprocess. |
FrontEndBase
|
Base class for front end classes. |
FrontEndCommand
|
Represents a single front end command invocation. |
JavaFrontEnd
|
A helper class with useful methods for any compiler model that uses the java_fe front end. |
Java_CompilerModel
|
A subclass of CompilerModel that provides
implementations of
get_prepend_flags() and
get_append_flags() with
some default arguments used in all Java compiler
models. |
ParseConfiguration
|
Instances of this class are read-only objects
passed to the __call__() method of your
compiler model
object. |
SWYXFrontEnd
|
A helper class with useful methods for any compiler model that uses the machine code front ends. |
X64FrontEnd
|
x64 front end. |
X86FrontEnd
|
x86 front end. |
X86_CompilerModel
|
A subclass of CompilerModel that provides
implementations of
get_prepend_flags() and
get_append_flags() with
some default arguments used in all x86 compiler
models. |
Attributes¶
Languages¶
csl_swyx_armARM machine code. csl_edgcp_cC csl_edgcp_cppC++. csl_dotnetfe_csharpC#. csl_jfe_javaJava. csl_swyx_ppc32PPC32 machine code. csl_syntheticThe language associated with the synthesized compilation unit that contains #System_Initialization and all undefined functions. csl_wildcardMatches lists of languages csl_swyx_x64x64 machine code. csl_swyx_x86x86 machine code.
Command Argument Types¶
CMD_CONF_FILEThe type member in the CmdArgumentobject is aCmdArgumentConf.CMD_ENV_PREFIXThe type member in the CmdArgumentobject is aCmdArgumentEnvVarPrefix.CMD_FILEThe type member in the CmdArgumentobject is aCmdArgumentFile.CMD_GTHOME_PREFIXThe type member in the CmdArgumentobject is aCmdArgumentGTHomeFile.CMD_HUB_PARAMSThe type member in the CmdArgumentobject is aCmdArgumentHubParams.CMD_NULLThere is no type member set in the CmdArgumentobjectCMD_PRJ_DIRThe type member in the CmdArgumentobject is aCmdArgumentPrjFilesDirectory.CMD_STRINGThe type member in the CmdArgumentobject is aCmdArgumentString.CMD_TAG_UIDThe type member in the CmdArgumentobject is aCmdArgumentTagUID.CMD_UIDThe type member in the CmdArgumentobject is aCmdArgumentUID.CMD_VECTORThe type member in the CmdArgumentobject is aCmdArgumentVector.CMD_WARNING_FILEThe type member in the CmdArgumentobject is aCmdArgumentWarningFile.
Front End Types¶
FET_CSHARPC# Front End FET_EDGCPC/C++ Front End FET_JAVAJava Front End FET_SWYXMachine Code Front End
“Yes Or No”¶
For options that are either enabled or disabled.
YON_NOOption is disbled. YON_UNSETEnabling/disabling is not specified. YON_YESOption is enabled.