Skip to content

Conversation

@meisZWFLZ
Copy link
Contributor

@meisZWFLZ meisZWFLZ commented Feb 27, 2025

Overview

Makefile bad. Meson good.

Motivation

  • way easier to maintain than the nightmare fuel we currently have
  • generates compile_commands.json automatically
  • EXTREMELY fast
  • dependency management via "wraps"

References (optional)

Implementation Details (optional)

  • cross-compile information is in scripts/v5.ini
  • build script is build.meson
  • libv5rt is now a separate repo with its own build file. It's treated as a dependency, using meson's "wraps"
  • python scripts are used to overcome some limitations of meson (like downloading, patching, and stripping libv5rt)

Test Plan:

  • Get kernel to successfully compile
  • Test that the kernel and a basic main.cpp works on robot

Notes

  • The python scripts DO NOT force a dependency on python
    • meson executes them with its bundled interpreter
    • scripts only use the basic python library, no 3rd party libraries needed
  • meson needs to be reconfigured every time source files are added, but at least you don't have to type out all the sources yourself

@SizzinSeal SizzinSeal requested review from ion098 and jmakif March 13, 2025 22:00
Copy link
Member

@jmakif jmakif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SizzinSeal SizzinSeal requested a review from tropicaaal March 14, 2025 00:56
Copy link
Contributor

@ion098 ion098 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@tropicaaal tropicaaal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (Let's Go To Meson)

@jmakif jmakif merged commit 329575a into main Mar 14, 2025
@jmakif jmakif deleted the build/meson-init branch March 14, 2025 01:01
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.

🐛 __malloc_lock and __malloc_unlock are not resolved properly ✨ CMake

6 participants