Skip to content

Conversation

@hufman
Copy link

@hufman hufman commented Dec 15, 2023

Description

Expand generator exps in libobs pkgconfig

Non-x86 platforms use a generator expression to add a -fopenmp flag so make sure to render this expression while writing out any pkgconfig file

Motivation and Context

Should fix #7972 and #7990 where the generator expression gets inserted into libobs.pc

How Has This Been Tested?

I've added this patch into the Nix build on my ARM64 Linux machine, and tried to compile some plugins against the libobs.pc output.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@WizardCM WizardCM added the Bug Fix Non-breaking change which fixes an issue label Dec 15, 2023
Non-x86 platforms use a generator expression to add the -fopenmp flag
so render this expression before writing out any pkgconfig file

Should fix obsproject#7972 and obsproject#7990
@hufman hufman force-pushed the generate-libobs-pkgconfig branch from 045fdc1 to 2ad4758 Compare December 15, 2023 03:32
@RytoEX RytoEX requested a review from PatTheMav December 15, 2023 17:10
@PatTheMav
Copy link
Member

openmp-simd can actually be enabled by default for clang and gcc, so there is no reason to guard it behind a generator expression at all (see https://github.com/PatTheMav/obs-studio/blob/73ec829a0c95081dae396456801d966d7e96fe8c/cmake/linux/compilerconfig.cmake#L16).

Linux' build system is slated to be put into "legacy" mode anyway with #9787 waiting for #9769 to be merged.

#9787 will ship a handcrafted pkg-config file instead because it is not possible to properly resolve all generator expressions (it's a feature not possible with pkg-config) but even then it's only a workaround for environments where CMake is not available.

@hufman
Copy link
Author

hufman commented Dec 16, 2023

Looking forward to it! But it seemed like the existing pkgconfig issues hadn't received any updates in a year, so I threw in my contribution to help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Fix Non-breaking change which fixes an issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

libobs pkgconfig (and possibly cmake) configs are broken on non-x86_64 (particularly AArch64)

3 participants