Skip to content

Enable whole-program optimization when compiling eSpeak-NG #17623

@gexgd0419

Description

@gexgd0419

Is your feature request related to a problem? Please describe.

As for now, whole-program optimization for eSpeak-NG is intentionally turned off.

# Whole-program optimization causes eSpeak to distort and warble with its Klatt4 voice
# Therefore specifically force it off
"/GL-",

I tried the klatt4 variant, but couldn't notice the difference between enabling and disabling the whole-program optimization. In fact, the waveforms generated are exactly the same.

If enabling whole-program optimization produces a different result, it should be a bug in the compiler/linker.

Maybe newer versions of eSpeak or newer versions of the MSVC compiler have fixed the bug. Or maybe I tested in a wrong way.

Describe the solution you'd like

Enable whole-program optimization by removing the /GL- option.

This can make the eSpeak DLL more efficient and smaller, from 637 KiB to 624 KiB.

It can also solve the problem of using a dynamically linked version of Sonic without __declspec(dllimport) in the header, because the optimization will be performed by the linker, if whole-program optimization is enabled.

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/speechp5https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#prioritytriagedHas been triaged, issue is waiting for implementation.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions