Opened 8 months ago

Closed 8 months ago

#5460 closed enhancement (fixed)

meson-1.4.0

Reported by: Bruce Dubbs Owned by: lfs-book
Priority: normal Milestone: 12.2
Component: Book Version: git
Severity: normal Keywords:
Cc:

Description

New minor version.

Change History (3)

comment:1 by Xi Ruoyao, 8 months ago

Meson now reads the project version of cmake subprojects

  • CMake subprojects configured by meson will now have their project version set to the project version in their CMakeLists.txt. This allows version constraints to be properly checked when falling back to a cmake subproject.

ndebug setting now controls C++ stdlib assertions

  • The ndebug setting, if disabled, now passes preprocessor defines to enable debugging assertions within the C++ standard library.
  • For GCC, -D_GLIBCXX_ASSERTIONS=1 is set.
  • For Clang, -D_GLIBCXX_ASSERTIONS=1 is set to cover libstdc++ usage, and -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE or -D_LIBCPP_ENABLE_ASSERTIONS=1 is used depending on the Clang version.

stldebug gains Clang support

  • For Clang, we now pass -D_GLIBCXX_DEBUG=1 if debugstl is enabled, and we also pass -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG.

New unset() method on environment objects

  • env now has an env.unset() method to ensure an existing environment is not defined.

File object now has full_path() method

  • Returns a full path pointing to the file. This is useful for printing the path with e.g message() function for debugging purpose.
  • NOTE: In most cases using the object itself will do the same job as this and will also allow Meson to setup dependencies correctly.

New numpy custom dependency

  • Support for dependency('numpy') was added, via supporting the numpy-config tool and pkg-config support, both of which are available since NumPy 2.0.0.
  • Config-tool support is useful because it will work out of the box when numpy is installed, while the pkg-config file is located inside python's site-packages, which makes it impossible to use in an out of the box manner without setting PKG_CONFIG_PATH.

depends kwarg now supported by compiler.preprocess()

  • It is now possible to specify the dependent targets with depends: for compiler.preprocess(). These targets should be built before the preprocessing starts.

Added preserve_paths keyword argument to qt module functions.

  • In qt4, qt5, and qt6 modules, compile_ui, compile_moc, and preprocess functions now have a preserve_paths keyword argument.
  • If 'true, it specifies that the output files need to maintain their directory structure inside the target temporary directory. For instance, when a file called subdir/one.input is processed it generates a file {target private directory}/subdir/one.out when true, and {target private directory}/one.out when false (default).

Bindgen will now use Meson's heuristic for what is a C++ header

  • Bindgen natively assumes that a file with the extension .hpp is a C++ header, but that everything else is a C header. Meson has a whole list of extensions it considers to be C++, and now will automatically look for those extensions and set bindgen to treat those as C++

Overriding bindgen language setting

  • Even though Meson will now tell bindgen to do the right thing in most cases, there may still be cases where Meson does not have the intended behavior, specifically with headers with a .h suffix, but are C++ headers.

Bindgen now uses the same C/C++ std as the project as a whole

  • Which is very important for C++ bindings.

Tests now abort on errors by default under more sanitizers

  • Sanitizers like MemorySanitizer do not abort by default on detected violations. Meson now exports MSAN_OPTIONS (in addition to ASAN_OPTIONS and UBSAN_OPTIONS from a previous release) when unset in the environment to provide sensible abort-by-default behavior.

Use custom_target as test executable

  • The test() function now accepts custom_tgt and custom_idx for the command to execute.

Support for Texas Instruments C6000 C/C++ compiler

  • Meson now supports the TI C6000 C/C++ compiler use for the C6000 cpu family. The example cross file is available in cross/ti-c6000.txt.

in reply to:  1 comment:2 by Xi Ruoyao, 8 months ago

Replying to Xi Ruoyao:

ndebug setting now controls C++ stdlib assertions

  • The ndebug setting, if disabled, now passes preprocessor defines to enable debugging assertions within the C++ standard library.
  • For GCC, -D_GLIBCXX_ASSERTIONS=1 is set.
  • For Clang, -D_GLIBCXX_ASSERTIONS=1 is set to cover libstdc++ usage, and -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE or -D_LIBCPP_ENABLE_ASSERTIONS=1 is used depending on the Clang version.

Note that this might be a hammer for some projects. If we find a project becomes stupidly slow with -D_GLIBCXX_ASSERTIONS=1 we need to pass -Db_ndebug=true for it. This is unlikely to happen though as _GLIBCXX_ASSERTIONS is designed to be cheap (as we've discussed in "Notes on Building Software").

comment:3 by Bruce Dubbs, 8 months ago

Resolution: fixed
Status: newclosed

Fixed at commit dcf5543233a7.

    Update to wheel-0.43.0.
    Update to setuptools-69.2.0 (Python module).
    Update to meson-1.4.0.
    Update to expat-2.6.2 (Security fix).
    Update to iana-etc-20240305.
    Update to vim-9.1.0161.
    Update to xz-5.6.1.
    Update to shadow-4.15.0.
    Update to psmisc-23.7.
    Update to kmod-32.
    Update to elfutils-0.191.
Note: See TracTickets for help on using tickets.