diff --git a/cross/sdcc-mcs51.txt b/cross/sdcc-mcs51.txt index d74d159eb..e668e9da6 100644 --- a/cross/sdcc-mcs51.txt +++ b/cross/sdcc-mcs51.txt @@ -2,7 +2,9 @@ # to the environment(PATH) variable, so that Meson can find # sdcc and sdar while building. [binaries] -c = 'sdcc' +# SDCC selects the target port with '-m'; it must be passed when +# compiling and when linking, so put it in the compiler command. +c = ['sdcc', '-mmcs51'] ar = 'sdar' [host_machine] @@ -13,9 +15,3 @@ endian = 'little' [properties] needs_exe_wrapper = true - -[built-in options] -# SDCC selects the target port with '-m'; it must be passed when -# compiling and when linking. -c_args = ['-mmcs51'] -c_link_args = ['-mmcs51'] diff --git a/docs/markdown/snippets/cython_args-option.md b/docs/markdown/snippets/cython_args-option.md new file mode 100644 index 000000000..a9afe3068 --- /dev/null +++ b/docs/markdown/snippets/cython_args-option.md @@ -0,0 +1,6 @@ +## The `cython_args` option is passed to the Cython compiler + +The `cython_args` built-in option, set with `-Dcython_args=...` or in a machine +file, was ignored when translating `.pyx` files to C. It is now added to the +Cython command line, together with the `cython_args` keyword argument of the +target. diff --git a/docs/markdown/snippets/dict-kwargs-key.md b/docs/markdown/snippets/dict-kwargs-key.md new file mode 100644 index 000000000..12ce7bcb1 --- /dev/null +++ b/docs/markdown/snippets/dict-kwargs-key.md @@ -0,0 +1,8 @@ +## A dictionary key named `kwargs` is no longer expanded + +A dictionary literal such as `{'kwargs': {'env': {'CFLAGS': '-DFOO'}}}` used to +be evaluated as if `kwargs` were the special keyword argument of function +calls, and the value of the dictionary was replaced with the contents of the +nested dictionary. The `kwargs` key is now a normal key in dictionary +literals, and is only special in the arguments of a function or method call. +This also makes it possible to write `func(kwargs: d['kwargs'])`. diff --git a/docs/markdown/snippets/ibm-i-support.md b/docs/markdown/snippets/ibm-i-support.md new file mode 100644 index 000000000..271206f75 --- /dev/null +++ b/docs/markdown/snippets/ibm-i-support.md @@ -0,0 +1,6 @@ +## Added support for IBM i + +Meson now recognizes IBM i (also known as OS/400) when it is running +in the PASE environment. `host_machine.system()` returns `'aix'` +because the user space is the same as AIX, but `host_machine.kernel()` +returns `'os400'` to tell the two systems apart. diff --git a/docs/markdown/snippets/run-result-exit-status.md b/docs/markdown/snippets/run-result-exit-status.md new file mode 100644 index 000000000..23af7a46e --- /dev/null +++ b/docs/markdown/snippets/run-result-exit-status.md @@ -0,0 +1,6 @@ +## `compiler.run()` results are marked as not compiled if the program fails + +When the program given to `compiler.run()` was built successfully but exited with a nonzero +status, the `compiled()` method of the result used to return `true`. It now returns `false`, +as it does for a program that does not compile. For backwards compatibility you can +still check for zero `returncode()`, in addition to checking for `compiled()` being `true`. diff --git a/docs/markdown/snippets/sdcc-support.md b/docs/markdown/snippets/sdcc-support.md new file mode 100644 index 000000000..9c5e6c3ee --- /dev/null +++ b/docs/markdown/snippets/sdcc-support.md @@ -0,0 +1,22 @@ +## Added support for the Small Device C Compiler (SDCC) + +Meson can now detect and use `sdcc` to compile C code for small 8-bit +microcontrollers. Static libraries are created with `sdar`, and executables are +produced in the Intel HEX (`.ihx`) format. The new CPU families `f8`, `hc08`, +`mcs51`, `padauk`, `stm8` and `z80` are recognized in cross files. + +SDCC selects the target architecture with the `-m` option, which must be +passed both when compiling and when linking. Add it to the `c` entry of the +`[binaries]` section so that it is used for all invocations of the compiler. +See `cross/sdcc-mcs51.txt` for an example: + +```ini +[binaries] +c = ['sdcc', '-mmcs51'] + +[host_machine] +system = 'bare metal' +cpu_family = 'mcs51' +cpu = 'mcs51' +endian = 'little' +``` diff --git a/docs/markdown/snippets/structured-sources-fixes.md b/docs/markdown/snippets/structured-sources-fixes.md new file mode 100644 index 000000000..5b8e3a2ac --- /dev/null +++ b/docs/markdown/snippets/structured-sources-fixes.md @@ -0,0 +1,16 @@ +## `structured_sources()` is now checked and copies files when needed + +A bugs in `structured_sources()` has been fixed which can cause a Rust +target to be built from a different set of files than before. +In particular, the check to detect whether source files have to be copied +to the build directory was previously wrong, and calls that only move +around source files require Meson 1.13.0 or newer. For example: + +```meson +structured_sources(['main.rs'], {'foo': 'linux/foo.rs'}) +``` + +did not place `linux/foo.rs` in `foo.rs`, and `mod foo;` failed to compile. +The layout is now the same whether the structure contains generated +files or not, and files are copied requested layout differs from the +layout in the source directory. diff --git a/docs/markdown/snippets/windows-extra-paths-shared-libraries.md b/docs/markdown/snippets/windows-extra-paths-shared-libraries.md new file mode 100644 index 000000000..6469fa6ce --- /dev/null +++ b/docs/markdown/snippets/windows-extra-paths-shared-libraries.md @@ -0,0 +1,12 @@ +## Only shared libraries are added to `PATH` for tests and `meson devenv` on Windows + +On Windows, the directories of the shared libraries that an executable links to +are added to `PATH` when running tests and in `meson devenv`. The directories +of other targets listed in `depends` or in the test arguments, for example +a `custom_target()`, were also added. This was not intended and could cause +the wrong DLL to be found. Now only the directories containing +`shared_library()` targets, and the shared libraries that they depend on, are +added. + +A project that relied on a `custom_target()` output directory being in `PATH` +should add that directory to the test environment explicitly.