Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 4,104
    • Issues 4,104
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 20
    • Merge requests 20
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMakeCMake
  • CMakeCMake
  • Issues
  • #22487
Closed
Open
Issue created Jul 28, 2021 by ajpenner@ajpenner

LINK_WHAT_YOU_USE adds -Wl,--no-as-needed to static libraries

When I enable the LINK_WHAT_YOU_USE option with cmake version 3.21.* I am finding that this now adds the "-Wl,--no-as-needed" linker option to the archiver used for static libraries. This option is not valid for the archiver and as a result the build fails. If I rollback my cmake version to 3.18.5 everything works as expected. I am operating on production code so I did not pin down the exact version that exposes this bug.

Edited Jul 28, 2021 by ajpenner
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking