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,101
    • Issues 4,101
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • 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
  • Merge requests
  • !6418

Ninja: Revert accidental LINK_WHAT_YOU_USE impl for static libraries

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Đoàn Trần Công Danh requested to merge sgn/cmake:ninja-lwyu-ar into master Jul 31, 2021
  • Overview 11
  • Commits 2
  • Pipelines 5
  • Changes 4

In !6263 (merged), we fixed usage of -Wl,--no-as-needed to override -Wl,--as-needed from LDFLAGS. However, that change also passes -Wl,--no-as-needed to ar, which is incorrect flag for ar.

Let's check the target type before passing down the flags.

Fixes: #22487 (closed)
Backport: release:HEAD^2

Edited Aug 03, 2021 by Brad King
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: ninja-lwyu-ar