Skip to content

GitLab

  • Menu
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 3,807
    • Issues 3,807
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 8
    • Merge requests 8
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & 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
  • CMake
  • CMakeCMake
  • Issues
  • #23136

Closed
Open
Created Jan 21, 2022 by Eyal Rozenberg@eyalrozContributor

Don't force choice of "thin" IPO

At the moment, when one enables IPO, CMake silently opts for "thin" objects, i.e. ones which have the minimum required information for performing IPO - which assumes the rest of the build toolchain has maximal support for IPO (e.g. re-invoking a compiler). For GCC, this is -fno-fat-lto-objects, and for clang it's -flto=thin.

It is not reasonable to enforce this. One of the following needs to happen:

  1. The INTERPROCEDURAL_OPTIMIZATION target property should have additional options, e.g. NONE, THIN, FAT/FULL.
  2. There should be an additional target property for IPO "fatness"
  3. INTERPROCEDURAL_OPTIMIZATION will not tell the compiler anything abut "fatness" and leave it up to the user.

I like option (1.), though option (2.) would maximize compatibility with previous CMake versions. Although... one could have options OFF, ON and THIN - different option type, but subsumes the previous range of options.

Edited Jan 21, 2022 by Eyal Rozenberg
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking