meson/mesonbuild/interpreter
Eli Schwartz adaea4136f
compiler.compiles/links: fix failure when compiling a built File object
In order to pass a File object down into the compiler impl and compile
it, we cannot pass a string with the filename, and we cannot either pass
the File object as-is, since it relies on being given Environment
attributes to calculate the relative location. So we build a fresh File
object as an absolute path.

But the code to do this was totally broken. Instead of using the File
method to get an absolute path, we used one that expected to create
builddir-relative paths... and then gave it the absolute source dir as
the "relative path portion" prefix. This worked by accident as long as
it wasn't a built File, but if it was a built file then we intentionally
didn't include that prefix -- which was wrong anyway, since we need the
build directory!

Use the correct method to get an absolute path in all cases, and emit a
warning if it was a built file. This never worked. Sometimes it crashed,
sometimes it silently returned false.

Fixes #11983
2023-07-14 14:50:51 -04:00
..
primitives string: Add missing FeatureNew tags to methods 2023-07-12 15:32:01 -04:00
__init__.py interpreter: replace ConfigurationDataObject with ConfigurationDataHolder 2022-01-18 17:53:29 -05:00
compiler.py compiler.compiles/links: fix failure when compiling a built File object 2023-07-14 14:50:51 -04:00
dependencyfallbacks.py interpreter: allow default_options and override_options as a dict 2023-06-20 16:10:20 -07:00
interpreter.py Merge pull request #11742 from xclaesse/link-whole-cases 2023-07-05 01:10:58 +03:00
interpreterobjects.py Add kernel and subsystem properties to machine objects. 2023-06-19 18:03:57 +03:00
kwargs.py interpreter: Accept more types in default_options dict values 2023-06-20 16:10:20 -07:00
mesonmain.py Alphabetize methods in MesonMain. 2023-06-19 18:03:57 +03:00
type_checking.py interpreter: Accept more types in default_options dict values 2023-06-20 16:10:20 -07:00