Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2,699
    • Issues 2,699
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 907
    • Merge requests 907
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Mesa
  • mesamesa
  • Merge requests
  • !13720

meson: Try to link all-targets module if Gallium OpenCL is enabled

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Simon McVittie requested to merge smcv/mesa:issue5609 into main Nov 08, 2021
  • Overview 8
  • Commits 1
  • Pipelines 9
  • Changes 1

If we don't do this, and we are statically linking LLVM (-Dshared-llvm=disabled) while using a version of LLVM compiled for a general-purpose distribution, then the link fails with undefined references to the functions called by LLVMInitializeAllTargets().

Using a version of LLVM that was built specifically for Mesa will sometimes mask this: if the only backends built into LLVM are backends that we specifically link anyway, then the link will succeed.

According to commit 80817b6e "meson: Adjust Clover's required LLVM modules", all-targets is not available when using CMake to locate LLVM, so make it optional rather than mandatory.

This partially reverts commit 80817b6e.

Resolves: #3962 (closed)
Resolves: #5609 (closed)
Signed-off-by: Simon McVittie smcv@collabora.com

Edited Nov 08, 2021 by Simon McVittie
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: issue5609