[23.07,2/2] build: explicitly track file paths in current directory
Checks
Commit Message
To ensure proper path tracking for files being used by the build, the
"files()" function should always be used. While meson currently assumes
that bare filenames passed to commands refer to paths in the current
directory, other reimplementations of meson, e.g. muon, require the
paths to be properly tracked. Therefore, for resiliency, ensure all
paths are specified using "files()".
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
app/test/meson.build | 2 +-
buildtools/pkg-config/meson.build | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
2.37.2
Comments
On Fri, Mar 10, 2023 at 11:11:38AM +0000, Bruce Richardson wrote:
> To ensure proper path tracking for files being used by the build, the
> "files()" function should always be used. While meson currently assumes
> that bare filenames passed to commands refer to paths in the current
> directory, other reimplementations of meson, e.g. muon, require the
> paths to be properly tracked. Therefore, for resiliency, ensure all
> paths are specified using "files()".
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
@@ -470,7 +470,7 @@ dpdk_test = executable('dpdk-test',
driver_install_path),
install: true)
-has_hugepage = run_command(py3, 'has_hugepage.py', check: true).stdout().strip() != '0'
+has_hugepage = run_command(py3, files('has_hugepage.py'), check: true).stdout().strip() != '0'
message('hugepage availability: @0@'.format(has_hugepage))
# some perf tests (eg: memcpy perf autotest)take very long
@@ -56,4 +56,4 @@ This is required for a number of static inline functions in the public headers.'
# For static linking with dependencies as shared libraries,
# the internal static libraries must be flagged explicitly.
-run_command(py3, 'set-static-linker-flags.py', check: true)
+run_command(py3, files('set-static-linker-flags.py'), check: true)