Skip to content

Use stricter flags for native toolchain #3100

@celskeggs

Description

@celskeggs
F´ Version v3.5.1
Affected Component build system

Feature Description

The native toolchain uses lax compiler options defaults. I suggest defaulting to the following options:

    -std=c++14
    -pedantic
    -Wextra
    -Werror
    -Wold-style-cast
    -ggdb3

Rationale

The JPL Institutional C++ Coding Standard mandates the use of C++ 14 with "all compiler warnings enabled at the highest warning level available, with no errors or warnings resulting." The native toolchain currently defaults to -std=c++11 without -Werror, which means that flight projects need to provide their own UT toolchain configuration in order to comply with the standard. It would be sensible for F Prime to provide a default toolchain configuration that is already compliant with institutional standards to make things easier for flight projects, especially since it results in higher-quality code.

I also recommend the use of -ggdb3 to provide higher-quality debugging information than the current -g.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cmakeIssues pertaining to the CMake build system.

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions