Skip to content

--linker lld|mold not reliably applied at link time #154

@GaspardKirira

Description

@GaspardKirira

Description

When using --linker lld or --linker mold, the selected linker was not always
used during the final link step. Linker flags were incorrectly propagated via
CMAKE_C_FLAGS / CMAKE_CXX_FLAGS, leading to unreliable behavior and CMake
warnings about unused variables.

Impact

  • Fast linkers (lld, mold) sometimes ignored
  • Inconsistent build results
  • Noisy CMake warnings

Resolution

  • Fast linker flags are now applied via:
    • CMAKE_EXE_LINKER_FLAGS
    • CMAKE_SHARED_LINKER_FLAGS
    • CMAKE_MODULE_LINKER_FLAGS
  • Removed incorrect propagation through compile flags

Result

Linker selection is now deterministic, correct, and warning-free.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbuildBuild system, CMake, compiler, linker, CI/CD issuescliVix CLI (vix new, build, run, dev)fixedIssue resolved and verified in a released version.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions