diff options
author | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2020-09-17 22:08:35 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2020-09-17 20:39:37 +0000 |
commit | ea46daa7bc600fec61b1962f1ebb6d948907040c (patch) | |
tree | 8b76768da45f8482c71815007bb5739769accddf /mesonbuild/modules/windows.py | |
parent | e9fea0fecfc14c43d609fa53bbf92a97549ae2db (diff) | |
download | meson-ea46daa7bc600fec61b1962f1ebb6d948907040c.zip meson-ea46daa7bc600fec61b1962f1ebb6d948907040c.tar.gz meson-ea46daa7bc600fec61b1962f1ebb6d948907040c.tar.bz2 |
Revert "windows: reduce chance of going over path limit in backend/vs"
This reverts commit 807f88739ebfa002c9a0b9acd3e24c9610fb02a2.
Diffstat (limited to 'mesonbuild/modules/windows.py')
-rw-r--r-- | mesonbuild/modules/windows.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/mesonbuild/modules/windows.py b/mesonbuild/modules/windows.py index ac28d65..6050705 100644 --- a/mesonbuild/modules/windows.py +++ b/mesonbuild/modules/windows.py @@ -119,23 +119,22 @@ class WindowsModule(ExtensionModule): src = unholder(src) if isinstance(src, str): - name_formatted = src + name_format = 'file {!r}' name = os.path.join(state.subdir, src) elif isinstance(src, mesonlib.File): - name_formatted = src.fname + name_format = 'file {!r}' name = src.relative_name() elif isinstance(src, build.CustomTarget): if len(src.get_outputs()) > 1: raise MesonException('windows.compile_resources does not accept custom targets with more than 1 output.') - name_formatted = src.get_basename() + name_format = 'target {!r}' name = src.get_id() else: raise MesonException('Unexpected source type {!r}. windows.compile_resources accepts only strings, files, custom targets, and lists thereof.'.format(src)) # Path separators are not allowed in target names name = name.replace('/', '_').replace('\\', '_') - name_formatted = name_formatted.replace('/', '_').replace('\\', '_') res_kwargs = { 'output': name + '_@BASENAME@.' + suffix, @@ -150,7 +149,7 @@ class WindowsModule(ExtensionModule): res_kwargs['depfile'] = res_kwargs['output'] + '.d' res_kwargs['command'] += ['--preprocessor-arg=-MD', '--preprocessor-arg=-MQ@OUTPUT@', '--preprocessor-arg=-MF@DEPFILE@'] - res_targets.append(build.CustomTarget(name_formatted, state.subdir, state.subproject, res_kwargs)) + res_targets.append(build.CustomTarget('Windows resource for ' + name_format.format(name), state.subdir, state.subproject, res_kwargs)) add_target(args) |