aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/vs2010backend.py
AgeCommit message (Collapse)AuthorFilesLines
2022-03-29Replace backend.get_option_for_target() with target.get_option()Xavier Claessens1-3/+3
That method had nothing specific to the backend, it's purely a Target method. This allows to cache the OptionOverrideProxy object on the Target instance instead of creating a new one for each option lookup.
2022-03-22backends: Stop separating base and compiler optionsXavier Claessens1-1/+1
Since OptionKey is used we can mix all options together in a single dictionary. That's already what we do in coredata.options.
2021-11-27Fix '# Visual Studio <>' comment in sln files with VS backendLuke Elliott1-4/+7
such that Visual Studio Version Selector works.
2021-11-25Stop backend_startup_project from erasing the last project in a VS solutionLuke Elliott1-1/+1
if it is not the specified project.
2021-11-21Support Visual Studio 2022 backendCrend King1-0/+4
2021-11-21Run pylintGustavoLCR1-28/+36
2021-11-21Fix vs backend cross compilation regressionGustavoLCR1-6/+15
2021-11-02Move language standard in separate method within vsbackendMoroz Oleg1-9/+4
2021-11-02Fixes .vcxproj for vs2017 vs2019Олег Мороз1-0/+9
fixes #6314 in case of backend is vs2017 or vs2019 place LanguageStandard tag with stdcpp version and LanguageStandard_C tag with stdc version in .vcxproj file
2021-11-01various manual conversion of percent-formatted strings to f-stringsEli Schwartz1-11/+10
2021-11-01fix typoed vs backend tokenEli Schwartz1-1/+1
2021-10-10Fix typos discovered by codespellChristian Clauss1-1/+1
2021-10-08backend/vs: Parallelize compilation inside one project.Andres Freund1-0/+1
UseMultiToolTask allows parallelism inside a project, without requiring cl.exe internal multi-threading (which meson generated projects currently can't use, mainly due to specifying output filenames for each object). TODO: - think about making behaviour conditional on msbuild version / add comment why not
2021-10-08backend/vs: Deduplicate basic project template.Andres Freund1-171/+61
Note that a few minor details of the output changed for some target types. I think I called them out with XXXs in the code for now.
2021-10-08backend/vs: Name pch pdb files to avoid naming & lock conflicts.Andres Freund1-0/+7
2021-10-08backend/vs: Move Microsoft.Cpp.props to before ItemDefinitionGroup.Andres Freund1-2/+3
The main reason for this move is to make it easier to merge the copies of project generation. But as far as I can tell, the Microsoft.Cpp.props import also belongs before the ItemDefinitionGroup. Originally the order seems to have been that way, but 431a9ea664 changed it in the course of other changes.
2021-10-04backend/vs: process link dependencies.Andres Freund1-0/+10
Partially-Fixes: #1799
2021-10-04remove useless variables that are no longer or were never usedEli Schwartz1-1/+0
2021-09-20backends/vs: Set ObjectFileName for generated sources.Andres Freund1-0/+3
When a static library B to a static library A with generated sources, B directly references the object file corresponding to the generated source in A. For that reference in B object_filename_from_source() is used. But A did not specify the object file name, ending up with cl.exe's default. Fixes: #9235
2021-09-14backends/vs: Do not emit dummy command for alias_command().Andres Freund1-11/+19
Alias commands did not work with the vs backend, due to trying to access target.command[0] with an empty command. Fix this by just not emitting a CustomBuild node for alias targets - the project references are enough to trigger the necessary actions. Fixes: #9247
2021-08-31pyllint: enable consider-user-enumerateDylan Baker1-2/+1
This caught a couple of cases of us doing: ```python for i in range(len(x)): v = x[i] ``` which are places to use enumerate instead. It also caught a couple of cases of: ```python assert len(x) == len(y) for i in range(len(x)): xv = x[i] yv = y[i] ``` Which should instead be using zip() ```python for xv, yv in zip(x, y): ... ```
2021-08-31pylint: turn on superflous-parensDylan Baker1-1/+1
We have a lot of these. Some of them are harmless, if unidiomatic, such as `if (condition)`, others are potentially dangerous `assert(...)`, as `assert(condtion)` works as expected, but `assert(condition, message)` will result in an assertion that never triggers, as what you're actually asserting is `bool(tuple[2])`, which will always be true.
2021-08-20backends: remove unused name parameter from as_meson_exe_cmdlineDylan Baker1-3/+2
This parameter isn't used, at all, so just remove it
2021-08-20backends/vs: add a missing annotationDylan Baker1-1/+1
2021-08-09Fix native targets for vs backend cross compilationGustavoLCR1-10/+40
2021-06-29Add feed arg to custom_target()Simon Ser1-0/+1
2021-06-29fix: Always explicitly set encoding for text files (fixes #8263)Daniel Mensinger1-1/+1
2021-06-22Add Visual Studio 2012/2013 backends (#8803)fanc9991-5/+35
* backends: Add a Visual Studio 2013 backend This is more-or-less a quick port from the VS2015 backend, except that we update the Visual Studio version strings and toolset versions accordingly. Also correct the generator string for Visual Studio 2015 in mesonbuild/cmake/common.py. * backend: Add VS2012 backend Similar to what we did for Visual Studio 2013, add a Visual Studio 2012 backend. * vs2010backend.py: Implement `link_whole:` if needed We actually need Visual Studio 2015 Update 2 to use `/WHOLEARCHIVE:`, which is what we are currently using for `link_whole:` on Visual Studio. For Visual Studio versions before that, we need to expand from the static targets that were indicated by `link_whole:`, and any of the sub-dependent targets that were pulled in via the dependent target's `link_whole:`. This wil ensure `link_whole:` would actually work in such cases. * vs2010backend.py: Handle objects from generated sources Unforunately, we can't use backends.determine_ext_objs() reliably, as the Visual Studio backends handle this differently. * vs2010backend.py: Fix generating VS2010 projects Visual Studio 2010 (at least the Express Edition) does not set the envvar %VisualStudioVersion% in its command prompt, so fix generating VS2010 projects by taking account into this, so that we can determine the location of vcvarsall.bat correctly. * whole archive test: Disable on vs2012/2013 backends too The Visual Studio 2012/2013 IDE has problems handling the items that would be generated from this test case, so skip this test when using --backend=vs[2012|2013]. This test does work for the Ninja backend when VS2012 or VS2013 is used, though. Consolidate this error message with XCode along with the vs2010 backend. * docs: Add the new vs2012 and vs2013 backends Let people know that we have backends for vs2012 and 2013. Also let people know that generating Visual Studio 2010 projects have been fixed and the pre-vs2015 backends now handle the `link_whole:` project option.
2021-05-15Visual Studio Address Sanitizer updatesPeter Harris1-0/+10
* Allow address sanitizer for Visual Studio 2019 version 16.9 Address Sanitizer was first supported with the current syntax in Visual Studio 16.9.0 (cl version 19.28.29910). * VS: Convert /fsanitize=address to project file setting
2021-04-19Xcode: regenerato project file when build conf changes.Jussi Pakkanen1-17/+0
2021-04-11VS: Disable MSBuild warnings for always-generated targetsJesse Natalie1-2/+5
Without this, VS will generate warning MSB8065: Custom build for item "<path>\custom_target.rule" succeeded, but specified output "<path>\outofdate.file" has not been created. This may cause incremental build to work incorrectly.
2021-03-04mass rewrite of string formatting to use f-strings everywhereEli Schwartz1-4/+4
performed by running "pyupgrade --py36-plus" and committing the results
2021-02-25Allow custom target output to be processed by generatorsMatthias Klumpp1-9/+17
2021-02-08Fix exe wrapper detection for run targets.Jussi Pakkanen1-1/+1
2021-02-05backend: Do not check for exe wrapper twiceXavier Claessens1-1/+1
It is already checked by as_meson_exe_cmdline().
2021-02-05run_target: Add env kwargXavier Claessens1-25/+11
Re-implement it in backend using the same code path as for custom_target(). This for example handle setting PATH on Windows when command is an executable.
2021-01-27custom_target: Add env kwargXavier Claessens1-1/+2
2021-01-25Add ARM64EC as a new conceptual cpu type of arm64Ben Niu1-1/+7
ARM64EC is a new ARM64 ABI made by Microsoft. The ARM64EC binaries can be loaded in x64 processes on the latest Windows Insider Preview on ARM64, and they don't need to be emulated for the sake of performance. To support the ARM64EC build target, a new conceptual arm64 cpu type 'arm64ec' is added. The cpu can be specified in cross files like below to generate msbuild solution/vcxproj files with platform set to ARM64EC. [target_machine] system = 'windows' cpu_family = 'aarch64' cpu = 'arm64ec' endian = 'little'
2021-01-04Use a single coredata dictionary for optionsDylan Baker1-16/+15
This patches takes the options work to it's logical conclusion: A single flat dictionary of OptionKey: UserOptions. This allows us to simplify a large number of cases, as we don't need to check if an option is in this dict or that one (or any of 5 or 6, actually).
2021-01-04use OptionKey for builtin and base optionsDylan Baker1-4/+4
I would have prefered to do these seperatately, but they are combined in some cases, so it was much easier to convert them together. this eliminates the builtins_per_machine dict, as it's duplicated with the OptionKey's machine parameter.
2021-01-04move OptionKey to mesonlibDylan Baker1-2/+1
There's starting to be a lot of things including coredata that coredata needs to itself include. putting it in mesonlib makes more sense
2021-01-04use OptionKey for compiler_optionsDylan Baker1-6/+4
2021-01-04use OptionKey for backend_optionsDylan Baker1-1/+2
2020-11-20use real pathlib moduleDylan Baker1-1/+1
We added the _pathlib module to work around defeciencies in python 3.5's implementation, since we now rely on 3.6 lets drop this
2020-10-14vs: add static_from_buildtype to b_vscrtPeter Harris1-0/+7
2020-10-07Add win_subsystem kwarg. Closes #7765.Jussi Pakkanen1-2/+7
2020-10-04pathlib: Fix resolve() by overriding it in Python 3.5Daniel Mensinger1-2/+2
2020-09-29Merge pull request #7762 from jon-turney/meson-exe-output-improveJussi Pakkanen1-7/+7
Improve the output for meson wrapped commands
2020-09-29compilers/VS: fix build to use optimization and debug flagsVili Väinölä1-10/+20
- Fixed using debug and optimization built-in options in MSVC. - Fixed that VS backend does not create pdb files in release mode. VS implicitly adds the debug fields if left out. - Fix that it is possible to add debug info with ninja backend with optimizations.
2020-09-20Improve description of meson wrapped custom commandsJon Turney1-7/+7
I've always found ninja reporting 'a meson_exe.py custom command' unclear and confusing. Instead say we are invoking a custom command, wrapped by meson, and why.