diff options
| author | Xavier Claessens <xavier.claessens@collabora.com> | 2022-10-20 09:13:59 +0200 |
|---|---|---|
| committer | Xavier Claessens <xclaesse@gmail.com> | 2022-10-24 11:06:57 +0200 |
| commit | 4f4076bfc0dacbc5f804ad2d970054ab43d162b3 (patch) | |
| tree | 868868b7bf1bbda02eaa20db88d8930c5a3ce32c /mesonbuild | |
| parent | eb731cda758b5d0e2c83d934714b4e7a2656e805 (diff) | |
| download | meson-4f4076bfc0dacbc5f804ad2d970054ab43d162b3.tar.gz | |
nasm: Harcode default path on Windows
NASM's installer does not add itself into PATH, even when installed by
choco.
Diffstat (limited to 'mesonbuild')
| -rw-r--r-- | mesonbuild/compilers/detect.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py index 8644d75c0..849024cf4 100644 --- a/mesonbuild/compilers/detect.py +++ b/mesonbuild/compilers/detect.py @@ -1151,6 +1151,10 @@ def detect_nasm_compiler(env: 'Environment', for_machine: MachineChoice) -> Comp popen_exceptions: T.Dict[str, Exception] = {} for comp in compilers: + if comp == ['nasm'] and is_windows() and not shutil.which(comp[0]): + # nasm is not in PATH on Windows by default + default_path = os.path.join(os.environ['ProgramFiles'], 'NASM') + comp[0] = shutil.which(comp[0], path=default_path) or comp[0] try: output = Popen_safe(comp + ['--version'])[1] except OSError as e: |
