Skip to content

Building gdextensions with lto=full warns about serial compilaton #2002

@marcozee03

Description

@marcozee03

Godot version

4.6

godot-cpp version

3a7edf0

System information

Arch Linux

Issue description

Building GD extensions with the 'lto=full' flag produces the following warning

warning: using serial compilation of 10 LTRANS jobs
lto-wrapper: note: see the '-flto' option documentation for more information

Which slows down compilation times.

After some research the warning appears due to a change in the -flto option introduced in GCC 11.4. The -flto option only uses parallel compilation if explicitly instructed to do so. By default, it uses slow serial compilation. updating "common_compiler_flags.py" to change instances of '-flto' to '-flto=auto' will re-enable parallelization.

Steps to reproduce

Compile any GD Extension with scons lto=full

Minimal reproduction project

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions