declare_dependencies
This allows dependencies declared in subprojects to set variables, and
for those variables to be accessed via the get_variable method, just
like those from pkg-config and cmake. This makes it easier to use
projects from subprojects in a polymorphic manner, lowering the
distinction between a subproject and an external dependency every
further.
this can be useful for if/elif where linker behaviors must be
considered.
For example, clang with "link" vs gcc with "ld.bfd" etc.
ci for compiler.get_linker_id() method
doc
add @FeatureNew check
Co-Authored-By: Daniel Mensinger <daniel@mensinger-ka.de>
is_samepath better reflects the nature of this function--that files
and directories can be compared.
Also, instead of raising exceptions, simply return False when one
or both .is_samepath(path1, path1) don't exist. This is more
intuitive behavior and avoids having an extra if fs.exist() to go
with every fs.is_samepath()
Fixes PR #6166 and more specifically commit 4e460f04f3 that tried to
make sure the type of a key variable is a string but checked the type of
the value instead. Extends test common/228's limited coverage,
its only test case had (surprise) a string value. Also avoid reserved
python keyword 'dict' and potentially confusing string 'key'.
Implements #5231 for real.
t.pic won't be defined. We can only hope it has been built with -fPIC.
Linker will complain otherwise any way.
t.extract_all_objects_recurse() won't be defined. We could support this
case by extracting the archive somewhere and pick object files.
* Have set() and set_quoted() of configuration object work with newlines.
set_quoted() makes the value into a double-quoted string, so let's
assume C-style string, in particular with newlines as "\n".
Also take care of remaining newlines in dump_conf_header(). C or nasm
macros expect single-line values so if the value was multi-line, we
would end up with broken syntax. Appending a backslash at each end of
line make them concat into a single line in both C and nasm format
(note: multi-line macros in nasm are actually possible apparently but
use another format not outputted by current meson code). Also note that
the replacement is done at the end only when dumping the conf as a
header because we cannot assume anything about the format when replacing
variables from an input file (in this case, it should be the dev
responsibility).
* Add unit tests for multiline set() and set_quoted().
Fortran: check for undeclared variables by forcing implicit none everywhere
C/C++: check for unused parameters and return types
removed unused variables from test cases
ci: do missing return and unused arg check with Github Actions
Static libraries don't have PDB files. A PDB that would previously end
up installed alongside a static library belonged in fact to the dynamic
version of the same library built at the same time.
This was because the former minstall.Installer implementation, when
installing a file target, also blindly copied any *.pdb file it found
whose filename was matching the target. So, for example installing
foo.dll and foo.a would also install two copies of foo.pdb into both
bin/ and lib/, which doesn't seem like the right thing to do - foo.pdb
should only get installed with foo.dll.
In qemu, minikconf generates a depfile that meson could use to
automatically reconfigure on dependency change.
Note: someone clever can perhaps find a way to express this with a
ninja rule & depfile=. I didn't manage, so I wrote a simple depfile
parser.
The main library must come before extra libraries, because they are
likely to be dependencies of the main library that get promoted from
private to public. This was causing static link issues with glib-2.0.pc.
Without this change, the test fails with:
[11/12] Linking target square-gen-test.
warning: Text relocation remains referenced
against symbol offset in file
square_unsigned 0x15 square-gen-test@exe/main.c.o
[12/12] Linking target square-ct-test.
warning: Text relocation remains referenced
against symbol offset in file
square_unsigned 0x15 square-ct-test@exe/main.c.o
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>