Extra flags for linking
Specify linker flags required for building project
Since R2023b
Description
Specify linker flags required for building project. These flags are not used during static analysis.
You might be using linker specific flags to build your C++ code. Typical flags can be
specified in a Polyspace® Platform project by using options such as Include
Paths, Libraries, Preprocessor definitions (-D). If
you cannot specify your linker flags using existing options, then enter the flags directly in
this field. These linker flags are then passed to the compilation tool chain when it build
your source code and tests. These flags are not relevant for static analysis.
Set Option
In your Polyspace Platform project configuration, on the Build tab, enter linker flags for this option on the Target & Compiler node.
Why Use This Option
If you use a linker specific flag to correctly build your C/C++ code, then Polyspace Test™ must use the same flags to invoke the linker. If none of the options in the Target & Compiler node can accurately represent the required flag, then specify the linker flags directly as input to this option.
Settings
Specify the extra flags in the text box. The flags you specify are appended to the build command that Polyspace Test uses to build the project.
The Polyspace Test build command is not identical to the build command that you use to build your project. The extra flags that you add might conflict with flags implicitly added to the build command and produce unexpected results. If you see unexpected build errors, check the Logs pane to review the full build command that Polyspace Test uses to build the project.
Command-Line Information
The command-line workflow for setting this option depends on your workflow.
If you build your source and tests using a Polyspace Platform Project — Once you set this option in the project using the Polyspace Platform user interface, you cannot override or modify this option using the
polyspace-testcommand.If you build your sources and xUnit tests using your own toolchain — You can provide the extra linking flags directly to your compiler as part of your build command.
Tips
If you have a build command that you use to build your source code, create your project
(.psprjx) directly by using this build command. See Create Project and Add Source Files in Polyspace Platform User Interface
Version History
Introduced in R2023b