Skip to content
This repository was archived by the owner on Apr 25, 2023. It is now read-only.
This repository was archived by the owner on Apr 25, 2023. It is now read-only.

Remove warning about ignored optimization argument. #61

@varungandhi-src

Description

@varungandhi-src

Some software does not plan flags for Clang. Turns out, there are some small divergences between GCC and Clang. For example, here is a warning I got when building postgres with lsif-clang.

[1107/1108] Processing file /workspace/postgres/src/interfaces/libpq/pqexpbuffer.c
warning: optimization flag '-fexcess-precision=standard' is not supported [-Wignored-optimization-argument]

AFAICT, upstream Clang 13 has not added support for this either. According to Zig:

        // Musl adds these args to builds with gcc but clang does not support them.
        //"-fexcess-precision=standard",
        //"-frounding-math",

So it looks like -frounding-math is in the same bucket as well. The problem is that since flags are largely the same across compilation units, you end up with a log with a bunch of gunk per compilation unit, which obscures the actual output. We don't care about this, since we're only generating an index, not build output.

Since we don't care about optimization, we should implicitly append -Wno-ignored-optimization-argument to the end of the command-line. That way, such a spurious warning won't fire.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions