aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/mixins/compcert.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-07-13 19:46:58 -0400
committerEli Schwartz <eschwartz@archlinux.org>2023-07-14 14:50:51 -0400
commitadaea4136fdbf24933f243400f7771128f74deed (patch)
tree3dd45c9ce0f1122076d2d0800a926a914cba8df2 /mesonbuild/compilers/mixins/compcert.py
parentb92858a5beba687478e56850269bc89bc61b3954 (diff)
downloadmeson-adaea4136fdbf24933f243400f7771128f74deed.zip
meson-adaea4136fdbf24933f243400f7771128f74deed.tar.gz
meson-adaea4136fdbf24933f243400f7771128f74deed.tar.bz2
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
Diffstat (limited to 'mesonbuild/compilers/mixins/compcert.py')
0 files changed, 0 insertions, 0 deletions