Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge in changes included in Meson 1.5.2 #15

Merged
merged 169 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
77db04f
Fix handling of C standard support for Emscripten.
rgommers May 16, 2024
128f0e8
Pass wrapmode value around as a string. (#13229)
jpakkane May 19, 2024
29a62ff
pylint: fix false positive for missing else branch
eli-schwartz May 16, 2024
e343590
pylint: ignore possibly/used-before-assignment as it is prone to FP
eli-schwartz May 16, 2024
125d334
pylint: fix false positive for variable defined in different copies o…
eli-schwartz May 16, 2024
aa9b7b9
pylint: fix useless-return
eli-schwartz May 17, 2024
8d7ffe6
fix sanity check for d cross-compilation
May 21, 2024
4c6d370
add cross-compile argument for ldc linker guessing
May 21, 2024
4861079
cuda: fix `cuda.find_library()` hardcoded to yield true
SoapGentoo May 22, 2024
7efddcb
cuda: add test for negative `find_library()` result
SoapGentoo May 22, 2024
631b385
unify listing for FSCL to point to all
dreamer-coding May 22, 2024
5365d9a
Refactor option classes to their own file.
jpakkane May 22, 2024
a66cb97
Revert "rust: recursively pull proc-macro dependencies as well"
thesamesam May 24, 2024
d57ca7d
compilers: improve a comment describing why we add a silly clang work…
eli-schwartz May 22, 2024
0c802d2
remove deprecation warning for `configure_file` kwarg 'copy'
mcdurdin May 24, 2024
8d92487
docs: Update GIMP meson adoption
brunvonlope May 26, 2024
7f2c6f6
cuda: disable thin archives when cuda is added through `add_languages…
SoapGentoo May 29, 2024
6f3841e
cuda: add test for late `add_languages('cuda')`
SoapGentoo May 29, 2024
f457791
cuda: avoid test failure without GPU available
SoapGentoo May 30, 2024
d9e3a3f
CI: make cuda tests even run to begin with
eli-schwartz May 30, 2024
8603bb4
Explain how to add preprocessor defines in FAQ.md
emilmelnikov May 29, 2024
e5aed6a
mintro: write humman-readable JSON
FFY00 May 29, 2024
daa058e
Start moving machine files to their own store.
jpakkane Jun 2, 2024
4cc2e21
Create a directory for machine files used in unit tests.
jpakkane Jun 2, 2024
8499e45
xcode: Detect installed version of Xcode
tangalbert919 Sep 8, 2023
da20ea0
xcode: Generate files for highest detected version
tangalbert919 Sep 22, 2023
f70de58
xcode: Skip generating PBXBuildStyle on Xcode 9 and above
tangalbert919 Sep 18, 2023
1da230c
CI: Windows: downgrade rust to 1.77
eli-schwartz May 29, 2024
3efec18
CI: clean up azure triggers
eli-schwartz May 29, 2024
41a445c
Extract native file parser to machinefile source file.
jpakkane Jun 2, 2024
560c032
Merge pull request #13286 from mesonbuild/machinerefactor
jpakkane Jun 4, 2024
dfd22db
Add -export_dynamic flag for AppleDynamicLinker
wolfgangwalther Jun 3, 2024
31d8074
Add help for meson dist to the man page.
jwieleRH May 29, 2024
7622628
Add help for meson install to the man page.
jwieleRH May 29, 2024
80a4b4a
Add help for meson init to the man page.
jwieleRH May 29, 2024
559341b
Add help for meson subprojects to the man page.
jwieleRH May 29, 2024
caa32ab
Add help for meson rewrite to the man page.
jwieleRH May 30, 2024
2e6f5c8
Add help for meson compile to the man page.
jwieleRH May 30, 2024
bce9b44
Add help for meson devenv to the man page.
jwieleRH May 30, 2024
fd6a6e8
Add help for meson env2mfile to the man page.
jwieleRH May 30, 2024
ee479de
wrap: default values for netrc are empty string from python 3.11
rgonzalezfluendo Feb 1, 2024
03f0551
Create helper method for lang opts and use in C compiler classes.
jpakkane Jun 8, 2024
fbb8b09
Use helper method in C++ compiler classes.
jpakkane Jun 8, 2024
53acb50
Use helper method in Fortran compiler classes.
jpakkane Jun 8, 2024
4eb1eb3
Use helper method in Rust compiler class.
jpakkane Jun 8, 2024
374fa7f
Use helper method in remaining compiler classes.
jpakkane Jun 8, 2024
2b1510d
Convert option from a plain dictionary into a named class.
jpakkane Jun 8, 2024
9694f9f
java: use single javac invocation per jar
Mis012 Feb 15, 2024
141100e
Add note about meson-python and installation path
emilmelnikov Jun 10, 2024
1b36bf3
Add help for meson format to the man page.
jwieleRH Jun 11, 2024
1d4c031
Merge pull request #13303 from jwieleRH/man
jpakkane Jun 11, 2024
d1abdce
Python: add load test to limited API test
amcn May 8, 2024
4023bbf
unittests: Add Python unittest for limited API
amcn May 8, 2024
f66a527
Python: move Windows functions to dependency base
amcn May 8, 2024
fea7f94
Python: fix limited API logic under mingw
amcn May 8, 2024
328011f
Python: link correct limited API lib on mingw
amcn May 8, 2024
0352c90
Merge pull request #13171 from amcn/mingw-python-limited-api
jpakkane Jun 11, 2024
c0d8602
Rename option variable to optstore to make it unique.
jpakkane Jun 8, 2024
9a6fcd4
Replace direct indexing with named methods.
jpakkane Jun 8, 2024
181c349
Fix mypy.
jpakkane Jun 11, 2024
ce889d6
Merge pull request #13307 from mesonbuild/optstorerefactor
jpakkane Jun 14, 2024
c0de2e1
wrap: Clarify PackageDefinition API
xclaesse Mar 5, 2024
9b83789
cargo: Load Cargo.lock
xclaesse Mar 7, 2024
2058f63
BUG: Use an F77 snippet for sanity testing Fortran
HaoZeke Jun 15, 2024
c199faf
cargo: Fall back to the checksum in Cargo.lock metadata table
swick Jun 16, 2024
a3d3efd
Add meson test --max-lines
DaanDeMeyer Jun 2, 2024
bcbf068
Improve `nm` usage in symbolextractor script on macOS
rgommers Jun 18, 2024
9f42531
Catch format configuration parse error
bruchar1 May 22, 2024
bef2fbf
Fix crash in meson format
bruchar1 May 22, 2024
8967090
mformat: fix else token not correctly indented
bruchar1 Jun 12, 2024
410bdf8
`configure_file`: update \@ escape logic
Kangie Jun 6, 2024
24cddb6
create_test_serialisation: Dedup deps before joining ld_lib paths
serebit Jun 19, 2024
c21b886
dependencies/boost.py: Allow getting `lib_dir` and `include_dir` via …
Artturin May 30, 2024
5597b67
tests: fix OpenAL test case on case sensitive fs on macOS
lf- Jun 23, 2024
7831832
coverage: Change --html-details to --html-nested (gcovr)
ewalkusx Jun 20, 2024
a6258eb
Fix subproject typo in interpreter.py
tpopela Jun 10, 2024
1951fe5
clang-tidy: use -quiet
marktsuchida Jun 16, 2024
c0ca35c
feat(compilers): cppm extension support
TheHillBright Jun 20, 2024
a111c28
Add support for detecting free-threaded Python on Windows
rgommers May 27, 2024
9be6e65
find_program: add a kwarg to specify custom version argument
Dudemanguy Jun 22, 2024
a28dde4
Recast CMake's IMPORTED_LOCATION into framework flags (#13299)
dg0yt Jun 23, 2024
f5ec07e
Ensure private directory exists for custom targets (#13196)
appden Jun 23, 2024
03ffb5b
Suggest mingw Python URL instead of specific package names
tristan957 Apr 25, 2024
eba5498
compilers: cpp: fix header name and return value use in header check
pobrn Jun 1, 2024
8fe8b1d
minstall: fix symlink handling on python 3.13
eli-schwartz May 10, 2024
8835ad4
msetup: fix regression under py3.13 causing profile.runctx to not wri…
eli-schwartz May 13, 2024
75132a9
Vs2010Backend: Fix REGEN.vcxproj not getting default debug config in …
rlavarec-gpsw May 31, 2024
5d80f77
Update mesonbuild/backend/vs2010backend.py
rlavarec-gpsw Jun 6, 2024
4cebb77
compilers: detect: fix typo in comment
thesamesam Jun 23, 2024
b56a319
compilers: detect: fix comment/error string in _get_gnu_compiler_defines
thesamesam Jun 23, 2024
4ad792e
compilers: detect: fix pre-processor scraping by defining language
thesamesam Jun 3, 2024
2a9f40f
compilers: make lang_map public
thesamesam Jun 23, 2024
1570289
Test case for environment prepend/append acting like set
Jun 5, 2024
aab2533
limit wrapped-due-to-env special case for `env` to only apply for env…
eli-schwartz Jun 23, 2024
7ec1fc5
Bump version numbers for rc1.
jpakkane Jun 24, 2024
5f71595
Merge remote-tracking branch 'upstream/master' into HEAD
rgommers Jun 25, 2024
d2e7250
Update Users.md entry for fossil-lib
dreamer-coding Jun 16, 2024
dbfd3e8
format: fix edge case with empty functions
bruchar1 Jun 26, 2024
8768198
compilers: pass Environment to openmp_flags
dcbaker Apr 25, 2024
d86e5c5
dependencies/openmp: Set compile and link flags before testing
dcbaker Apr 25, 2024
3cd2cee
dependencies/openmp: use mlog.warning instead of open coding
dcbaker Apr 25, 2024
f900b32
compilers|dependencies: Move Clang-CL specific logic out of OpenMP dep
dcbaker Apr 25, 2024
07ef85e
CI/MacOS: Add libomp
dcbaker Apr 25, 2024
d6bddaf
compilers: Add support for OpenMP from homebrew with AppleClang
dcbaker Apr 12, 2024
ef83d94
dependencies/openmp: Simplify error case
dcbaker Apr 25, 2024
7b43a2e
depfixer: fix darwin regression when install rpaths are used
eli-schwartz Jun 27, 2024
dc1b4be
linkers: Fix AppleDynamicLinker not returning any rpaths to remove
thewildtree Jun 28, 2024
ff5865c
Bump version number for rc2.
jpakkane Jul 1, 2024
c1e87af
CI: mark cygwin as skipping frameworks/libgcrypt
eli-schwartz Jul 2, 2024
8b757b1
Python: fix limited API logic under GCC on Windows
amcn Jul 2, 2024
1ca002a
linkers: Loosen the check for GNU interface style in LLD for Windows
mstorsjo Jul 4, 2024
f2112d0
Revert "Clarify mutable objects usage"
eli-schwartz Jul 5, 2024
140c557
configuration_data: add test case for regression when merging a confdata
eli-schwartz Jul 5, 2024
0392722
Revert PR12972 as a regression.
eli-schwartz Jul 5, 2024
5d417ed
Bump version number for rc3.
jpakkane Jul 8, 2024
07777c7
nasm: Add -mms-bitfields to the list of ignored flags
amyspark Jul 9, 2024
183084a
Release 1.5.0 time.
jpakkane Jul 10, 2024
082cf5d
backend/backends: Fix type assertions in backend
Jul 12, 2024
3f340d0
Revert "Support armel/armhf builds on native arm64 hosts."
alyssais Jul 14, 2024
df833b0
Revert various cross compile changes
lazka Jul 11, 2024
c108d5b
Revert logic also in followup commit
lazka Jul 12, 2024
eba9e7e
Make sure machine_info_can_run() isn't called on incomplete MachineInfo
lazka Jul 12, 2024
30f02e6
rust: recursively pull proc-macro deps for rust targets
alyssais Jul 16, 2024
86f1a28
modules/gnome: gnome.compile_resources() must have 'install_dir' if i…
RaviRahar Jul 19, 2024
6565f4c
compilers: fix partial refactor of coredata options
eli-schwartz Jul 21, 2024
19d31ad
mdist: don't fail on readonly source trees
eli-schwartz Jul 22, 2024
22a9504
Ensure override var exists. Closes #13402.
jpakkane Jul 22, 2024
18ef17e
depfixer: deduplicate rpaths on darwin
holymonson Jul 14, 2024
b6c98c1
depfixer: Add missing annotation that breaks mypy check
dcbaker Jul 23, 2024
813f103
backend/ninja: fix off-by-one in cmd length estimate
dcbaker Jul 25, 2024
b1bd200
backend/ninja: use 32k byte limit for command lines on !Windows
dcbaker Jul 25, 2024
3ec1fe2
wrap: Use OSError instead of URLError for exception handling
nirbheek Jul 25, 2024
0ee0780
tests: try to fix ubuntu bionic tests
lazka Jul 13, 2024
d8165a1
test/rust: Replace gcc -m argument with a -f argument
dcbaker Jul 12, 2024
dbc7dee
Remove reference to GPL in test files
bruchar1 Jul 22, 2024
2c9f27b
coverage: improve llvm-cov detection
Jannik2099 Jul 21, 2024
730ccbc
CI: skip LTO tests on cygwin
eli-schwartz Jul 23, 2024
4df1254
Fix failing tests for zlib-ng
tristan957 Jul 11, 2024
808730a
Fix the zlib-ng failing tests, for real
tristan957 Jul 16, 2024
b6b634a
Bump versions to 1.5.1 for release
eli-schwartz Jul 25, 2024
3f0f62d
mdist: correctly detect dirty hg repos with non-English locale
eli-schwartz Jul 29, 2024
38f542d
tests: nasm: make it easier to debug generator() style build
eli-schwartz Jul 30, 2024
2058ad3
mformat: fix formatting of empty build file
bruchar1 Aug 1, 2024
b0b6e54
Fix compiling ObjC/ObjC++ on Windows/MinGW
Midar Aug 4, 2024
0a7e91e
compilers: do not strip '-isystem' from C build arguments
eternalNight Aug 15, 2024
52b6e8a
cargo: Ignore Cargo.lock if toml implementation is missing
xclaesse Aug 15, 2024
7e97381
mformat: correctly handle editorconfig files without the root setting
dcbaker Aug 19, 2024
4da5bc9
format: fix indentation of comments
bruchar1 Aug 6, 2024
1a529a2
linkers: skip -export_dynamic flag before MacOS 10.7
wolfgangwalther Aug 17, 2024
c7031bd
tests/format: Make the compare script more useful
dcbaker Aug 19, 2024
b429aa4
mformat: A triple string with a ' in it cannot be simplified
dcbaker Aug 19, 2024
9805225
mformat: provide nice error message instead of backtrace for invalid …
dcbaker Aug 19, 2024
358fe36
Add support for LLVM 19 in Debian.
jpakkane Sep 4, 2024
f182419
mformat: regenerate long lines even if they're already multiline
bgilbert Aug 20, 2024
7f28d42
tests: handle uncommon architecture format for nm
eli-schwartz Aug 21, 2024
53f5deb
mformat: detect invalid config
bruchar1 Aug 20, 2024
47c44dc
mformat: better handling of continuation lines
bruchar1 Aug 20, 2024
839c5e8
compilers: avoid -Wunused-value compiler warning in CLikeCompiler.has…
thom311 Feb 7, 2024
b252b34
compilers: avoid -Wunused-value compiler warning in CLikeCompiler.has…
thom311 Feb 7, 2024
c726ca4
Prevent raw exception during project()
amcn Sep 7, 2024
f1b7f52
When configuring fails in Github Actions, print folded logs
eli-schwartz Jan 25, 2024
946d52a
CI: mark arch as skipping frameworks/libgcrypt
eli-schwartz Jul 25, 2024
54e35c1
compilers: Pass mode to determine_args, not its string value
amcn Sep 16, 2024
72af62b
mdist: detect pathological git repo cases and show a slightly better …
eli-schwartz Sep 2, 2024
908f2d1
backend/ninja: Generate sysroot in rust-project.json
eternalNight Sep 19, 2024
e409a55
mdist: correctly detect dirty hg repos with non-English locale, redux
eli-schwartz Sep 20, 2024
af9658a
nasm: Use different test sources for x86 and x86_64
qookei Sep 20, 2024
187ef42
Bump versions to 1.5.2 for release
eli-schwartz Sep 20, 2024
11dffde
Merge tag '1.5.2' into merge-150rc1
rgommers Oct 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
find /opt/homebrew/Cellar/python* -name EXTERNALLY-MANAGED -print0 | xargs -0 rm -vf
# use python3 from homebrew because it is a valid framework, unlike the actions one:
# https://github.com/actions/setup-python/issues/58
- run: brew install pkg-config ninja llvm qt@5 boost ldc hdf5 openmpi lapack scalapack sdl2 boost-python3 gtk-doc zstd ncurses objfw
- run: brew install pkg-config ninja llvm qt@5 boost ldc hdf5 openmpi lapack scalapack sdl2 boost-python3 gtk-doc zstd ncurses objfw libomp
- run: |
python3 -m pip install --upgrade setuptools
python3 -m pip install --upgrade pip
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/os_comp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ on:
- ".github/workflows/os_comp.yml"
- "run*tests.py"

# make GHA actions use node16 which still works with bionic
# See https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
# Unclear how long this will work though
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

permissions:
contents: read

Expand Down
3 changes: 3 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ disable=
cell-var-from-loop,
consider-using-f-string,
consider-using-with,
contextmanager-generator-missing-cleanup,
cyclic-import,
deprecated-decorator,
duplicate-code,
Expand Down Expand Up @@ -47,6 +48,7 @@ disable=
not-an-iterable,
not-callable,
pointless-string-statement,
possibly-used-before-assignment,
protected-access,
raise-missing-from,
redeclared-assigned-name,
Expand Down Expand Up @@ -75,6 +77,7 @@ disable=
unsubscriptable-object,
unused-argument,
unused-variable,
used-before-assignment,
useless-super-delegation,
wrong-import-order,
wrong-import-position,
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ trigger:
- 'test cases'
- 'unittests'
- 'azure-pipelines.yml'
- 'ci/azure-steps.yml'
- 'ci/run.ps1'
- 'run_project_tests.py'
- 'run_tests.py'
- 'run_unittests.py'
Expand All @@ -41,7 +41,7 @@ pr:
- 'test cases'
- 'unittests'
- 'azure-pipelines.yml'
- 'ci/azure-steps.yml'
- 'ci/run.ps1'
- 'run_project_tests.py'
- 'run_tests.py'
- 'run_unittests.py'
Expand Down
5 changes: 0 additions & 5 deletions ci/ciimage/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ def gen_bashrc(self) -> None:
fi
'''

if self.data_dir.name == 'gentoo':
out_data += '''
source /etc/profile
'''

out_file.write_text(out_data, encoding='utf-8')

# make it executable
Expand Down
2 changes: 1 addition & 1 deletion ci/ciimage/cuda/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ install_minimal_python_packages
# Manually remove cache to avoid GitHub space restrictions
rm -rf /var/cache/pacman

echo "source /etc/profile.d/cuda.sh" >> /ci/env_vars.sh
echo "source /etc/profile" >> /ci/env_vars.sh
2 changes: 2 additions & 0 deletions ci/ciimage/gentoo/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,5 @@ rm /usr/lib/python/EXTERNALLY-MANAGED
python3 -m ensurepip
install_python_packages
python3 -m pip install "${base_python_pkgs[@]}"

echo "source /etc/profile" >> /ci/env_vars.sh
13 changes: 7 additions & 6 deletions ci/run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,22 @@ if ($LastExitCode -ne 0) {
$env:Path = ($env:Path.Split(';') | Where-Object { $_ -notmatch 'mingw|Strawberry|Chocolatey|PostgreSQL' }) -join ';'

if ($env:arch -eq 'x64') {
rustup default 1.77
# Rust puts its shared stdlib in a secret place, but it is needed to run tests.
$env:Path += ";$HOME/.rustup/toolchains/stable-x86_64-pc-windows-msvc/bin"
$env:Path += ";$HOME/.rustup/toolchains/1.77-x86_64-pc-windows-msvc/bin"
} elseif ($env:arch -eq 'x86') {
# Switch to the x86 Rust toolchain
rustup default stable-i686-pc-windows-msvc

# Also install clippy
rustup component add clippy
rustup default 1.77-i686-pc-windows-msvc

# Rust puts its shared stdlib in a secret place, but it is needed to run tests.
$env:Path += ";$HOME/.rustup/toolchains/stable-i686-pc-windows-msvc/bin"
$env:Path += ";$HOME/.rustup/toolchains/1.77-i686-pc-windows-msvc/bin"
# Need 32-bit Python for tests that need the Python dependency
$env:Path = "C:\hostedtoolcache\windows\Python\3.7.9\x86;C:\hostedtoolcache\windows\Python\3.7.9\x86\Scripts;$env:Path"
}

# Also install clippy
rustup component add clippy

# Set the CI env var for the meson test framework
$env:CI = '1'

Expand Down
1 change: 1 addition & 0 deletions data/shell-completions/bash/meson
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ _meson-test() {
quiet
timeout-multiplier
setup
max-lines
test-args
)

Expand Down
1 change: 1 addition & 0 deletions data/shell-completions/zsh/_meson
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ local -a meson_commands=(
'(--quiet -q)'{'--quiet','-q'}'[produce less output to the terminal]'
'(--timeout-multiplier -t)'{'--timeout-multiplier','-t'}'[a multiplier for test timeouts]:Python floating-point number: '
'--setup[which test setup to use]:test setup: '
'--max-lines[Maximum number of lines to show from a long test log]:Python integer number: '
'--test-args[arguments to pass to the tests]: : '
'*:Meson tests:__meson_test_names'
)
Expand Down
3 changes: 2 additions & 1 deletion docs/markdown/Builtin-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,8 @@ interpreter directly, even if it is a venv. Setting to `venv` will instead use
the paths for the virtualenv the python found installation comes from (or fail
if it is not a virtualenv). Setting to `auto` will check if the found
installation is a virtualenv, and use `venv` or `system` as appropriate (but
never `prefix`). This option is mutually exclusive with the `platlibdir`/`purelibdir`.
never `prefix`). Note that Conda environments are treated as `system`.
This option is mutually exclusive with the `platlibdir`/`purelibdir`.

For backwards compatibility purposes, the default `install_env` is `prefix`.

Expand Down
2 changes: 1 addition & 1 deletion docs/markdown/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use a single `configuration_data` object as many times as you like,
but it becomes immutable after being passed to the `configure_file`
function. That is, after it has been used once to generate output the
`set` function becomes unusable and trying to call it causes an error.
*Since 1.5.0* Copy of immutable `configuration_data` is however mutable.
Copy of immutable `configuration_data` is still immutable.

For more complex configuration file generation Meson provides a second
form. To use it, put a line like this in your configuration file.
Expand Down
13 changes: 13 additions & 0 deletions docs/markdown/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -695,3 +695,16 @@ directory. It glob ignores ```"*"```, since all generated files should not be
checked into git.

Users of older versions of Meson may need to set up ignore files themselves.

## How to add preprocessor defines to a target?

Just add `-DFOO` to `c_args` or `cpp_args`. This works for all known compilers.

```meson
mylib = library('mylib', 'mysource.c', c_args: ['-DFOO'])
```

Even though [MSVC documentation](https://learn.microsoft.com/en-us/cpp/build/reference/d-preprocessor-definitions)
uses `/D` for preprocessor defines, its [command-line syntax](https://learn.microsoft.com/en-us/cpp/build/reference/compiler-command-line-syntax)
accepts `-` instead of `/`.
It's not necessary to treat preprocessor defines specially in Meson ([GH-6269](https://github.com/mesonbuild/meson/issues/6269#issuecomment-560003922)).
9 changes: 9 additions & 0 deletions docs/markdown/Python-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ authors:
This module provides support for finding and building extensions against
python installations, be they python 2 or 3.

If you want to build and package Python extension modules using tools
compatible with [PEP-517](https://peps.python.org/pep-0517/), check out
[meson-python](https://mesonbuild.com/meson-python/index.html).

If you are building Python extension modules against a Python interpreter
located in a venv or Conda environment, you probably want to set
`python.install_venv=auto`;
see [Python module options](Builtin-options.md#python-module) for details.

*Added 0.46.0*

## Functions
Expand Down
214 changes: 214 additions & 0 deletions docs/markdown/Release-notes-for-1.5.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
---
title: Release 1.5.0
short-description: Release notes for 1.5.0
...

# New features

Meson 1.5.0 was released on 10 July 2024
## Support for `bztar` in `meson dist`

The `bztar` format is now supported in `meson dist`. This format is also known
as `bzip2`.

## Cargo dependencies names now include the API version

Cargo dependencies names are now in the format `<package_name>-<version>-rs`:
- `package_name` is defined in `[package] name = ...` section of the `Cargo.toml`.
- `version` is the API version deduced from `[package] version = ...` as follow:
* `x.y.z` -> 'x'
* `0.x.y` -> '0.x'
* `0.0.x` -> '0'
It allows to make different dependencies for uncompatible versions of the same
crate.
- `-rs` suffix is added to distinguish from regular system dependencies, for
example `gstreamer-1.0` is a system pkg-config dependency and `gstreamer-0.22-rs`
is a Cargo dependency.

That means the `.wrap` file should have `dependency_names = foo-1-rs` in their
`[provide]` section when `Cargo.toml` has package name `foo` and version `1.2`.

This is a breaking change (Cargo subprojects are still experimental), previous
versions were using `<package_name>-rs` format.

## Added support `Cargo.lock` file

When a (sub)project has a `Cargo.lock` file at its root, it is loaded to provide
an automatic fallback for dependencies it defines, fetching code from
https://crates.io or git. This is identical as providing `subprojects/*.wrap`,
see [cargo wraps](Wrap-dependency-system-manual.md#cargo-wraps) dependency naming convention.

## Meson now propagates its build type to CMake

When the CMake build type variable, `CMAKE_BUILD_TYPE`, is not set via the
`add_cmake_defines` method of the [`cmake options` object](CMake-module.md#cmake-options-object),
it is inferred from the [Meson build type](Builtin-options.md#details-for-buildtype).
Build types of the two build systems do not match perfectly. The mapping from
Meson build type to CMake build type is as follows:

- `debug` -> `Debug`
- `debugoptimized` -> `RelWithDebInfo`
- `release` -> `Release`
- `minsize` -> `MinSizeRel`

No CMake build type is set for the `plain` Meson build type. The inferred CMake
build type overrides any `CMAKE_BUILD_TYPE` environment variable.

## compiler.run() method is now available for all languages

It used to be only implemented for C-like and D languages, but it is now available
for all languages.

## dependencies created by compiler.find_library implement the `name()` method

Previously, for a [[@dep]] that might be returned by either [[dependency]] or
[[compiler.find_library]], the method might or might not exist with no way
of telling.

## New version_argument kwarg for find_program

When finding an external program with `find_program`, the `version_argument`
can be used to override the default `--version` argument when trying to parse
the version of the program.

For example, if the following is used:
```meson
foo = find_program('foo', version_argument: '-version')
```

meson will internally run `foo -version` when trying to find the version of `foo`.

## Meson configure handles changes to options in more cases

Meson configure now correctly handles updates to the options file without a full
reconfigure. This allows making a change to the `meson.options` or
`meson_options.txt` file without a reconfigure.

For example, this now works:
```sh
meson setup builddir
git pull
meson configure builddir -Doption-added-by-pull=value
```

## New meson format command

This command is similar to `muon fmt` and allows to format a `meson.build`
document.

## Added support for GCC's `null_terminated_string_arg` function attribute

You can now check if a compiler support the `null_terminated_string_arg`
function attribute via the `has_function_attribute()` method on the
[[@compiler]] object.

```meson
cc = meson.get_compiler('c')

if cc.has_function_attribute('null_terminated_string_arg')
# We have it...
endif
```

## A new dependency for ObjFW is now supported

For example, you can create a simple application written using ObjFW like this:

```meson
project('SimpleApp', 'objc')

objfw_dep = dependency('objfw', version: '>= 1.0')

executable('SimpleApp', 'SimpleApp.m',
dependencies: [objfw_dep])
```

Modules are also supported. A test case using ObjFWTest can be created like
this:

```meson
project('Tests', 'objc')

objfwtest_dep = dependency('objfw', version: '>= 1.1', modules: ['ObjFWTest'])

executable('Tests', ['FooTest.m', 'BarTest.m'],
dependencies: [objfwtest_dep])
```

## Support of indexed `@PLAINNAME@` and `@BASENAME@`

In `custom_target()` and `configure_file()` with multiple inputs,
it is now possible to specify index for `@PLAINNAME@` and `@BASENAME@`
macros in `output`:
```
custom_target('target_name',
output: '@[email protected]',
input: [dep1, dep2],
command: cmd)
```

## Required kwarg on more `compiler` methods

The following `compiler` methods now support the `required` keyword argument:

- `compiler.compiles()`
- `compiler.links()`
- `compiler.runs()`

```meson
cc.compiles(valid, name: 'valid', required : true)
cc.links(valid, name: 'valid', required : true)
cc.run(valid, name: 'valid', required : true)

assert(not cc.compiles(valid, name: 'valid', required : opt))
assert(not cc.links(valid, name: 'valid', required : opt))
res = cc.run(valid, name: 'valid', required : opt)
assert(res.compiled())
assert(res.returncode() == 0)
assert(res.stdout() == '')
assert(res.stderr() == '')
```

## The Meson test program supports a new "--interactive" argument

`meson test --interactive` invokes tests with stdout, stdin and stderr
connected directly to the calling terminal. This can be useful when running
integration tests that run in containers or virtual machines which can spawn a
debug shell if a test fails.

## meson test now sets the `MESON_TEST_ITERATION` environment variable

`meson test` will now set the `MESON_TEST_ITERATION` environment variable to the
current iteration of the test. This will always be `1` unless `--repeat` is used
to run the same test multiple times.

## The Meson test program supports a new "--max-lines" argument

By default `meson test` only shows the last 100 lines of test output from tests
that produce large amounts of output. This default can now be changed with the
new `--max-lines` option. For example, `--max-lines=1000` will increase the
maximum number of log output lines from 100 to 1000.

## Basic support for TI Arm Clang (tiarmclang)

Support for TI's newer [Clang-based ARM toolchain](https://www.ti.com/tool/ARM-CGT).

## 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`.

## Wayland stable protocols can be versioned

The wayland module now accepts a version number for stable protocols.

```meson
wl_mod = import('unstable-wayland')

wl_mod.find_protocol(
'linux-dmabuf',
state: 'stable'
version: 1
)
```

Loading
Loading