Skip to content

[C++] Add mold linker flags to the CMake linker flags variables #40602

@cryos

Description

@cryos

Describe the bug, including details regarding any error messages, version, and platform.

I noticed the recent support for the mold linker, it currently adds the flags to the CMake compiler flags for C and C++ whereas it would be better to do this using the linker flags. I was going to create a PR to do that and this issue accompanies it.

This leads to less invalidation of cache when switching linkers as only the links would use the flag and is the more correct way to manipulate linker flags.

Component(s)

C++

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions