Skip to content

Comments

meson: set native flag for find_program()#1740

Open
amezin wants to merge 2 commits intomasterfrom
meson-native-flag
Open

meson: set native flag for find_program()#1740
amezin wants to merge 2 commits intomasterfrom
meson-native-flag

Conversation

@amezin
Copy link
Member

@amezin amezin commented Feb 7, 2026

When searching for the same programs in built-in modules (i18n, gnome), Meson performs the search in native=true mode.

i18n module internally searches for them on "build" machine,
which is `native=true`.
`gnome` module sets `native=true` when searching for it.
@coderabbitai
Copy link

coderabbitai bot commented Feb 7, 2026

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Refactored build configuration to provide improved flexibility with optional build tool dependencies.

Walkthrough

This change reorganizes Meson build tool declarations by moving gettext and glib-compile-schemas tool lookups from the central meson.build file to their respective subdirectories (po/meson.build and schemas/meson.build). These tool declarations are now marked as optional with disabler handling to gracefully handle missing tools rather than failing the build.

Changes

Cohort / File(s) Summary
Main build configuration
meson.build
Removed three tool lookup declarations: glib_compile_schemas_tool, xgettext, and msgmerge. These lookups are now handled in their respective subdirectory build files.
Gettext tooling setup
po/meson.build
Added optional find_program declarations for xgettext and msgmerge with required: false and disabler: true to make the gettext workflow tolerant of missing tools.
Schema compilation tooling
schemas/meson.build
Added glib_compile_schemas_tool variable lookup and integrated it into custom_target commands, dry-run tests, and install scripts.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'meson: set native flag for find_program()' accurately describes the main change: adding the native flag to find_program() calls across multiple build files.
Description check ✅ Passed The description explains the rationale for the changes by referencing how Meson's built-in modules (i18n, gnome) perform searches in native=true mode, which aligns with the actual modifications made.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch meson-native-flag

No actionable comments were generated in the recent review. 🎉

📜 Recent review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b1fe623 and 4d065ac.

📒 Files selected for processing (3)
  • meson.build
  • po/meson.build
  • schemas/meson.build
💤 Files with no reviewable changes (1)
  • meson.build
🔇 Additional comments (2)
schemas/meson.build (1)

7-8: LGTM!

Adding native: true correctly matches the behavior of Meson's gnome module when it searches for glib-compile-schemas. Moving the declaration into this file also improves locality.

po/meson.build (1)

25-37: LGTM!

Adding native: true correctly matches the i18n module's behavior for searching on the build machine. The required: false + disabler: true combination is appropriate here since xgettext and msgmerge are only used by developer workflow targets (potfiles, per-language msgmerge), not the core build.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant