summaryrefslogtreecommitdiff
path: root/mesonbuild/backend/vs2010backend.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix '# Visual Studio <>' comment in sln files with VS backendLuke Elliott2021-11-271-4/+7
| | | | such that Visual Studio Version Selector works.
* Stop backend_startup_project from erasing the last project in a VS solutionLuke Elliott2021-11-251-1/+1
| | | | if it is not the specified project.
* Support Visual Studio 2022 backendCrend King2021-11-211-0/+4
|
* Run pylintGustavoLCR2021-11-211-28/+36
|
* Fix vs backend cross compilation regressionGustavoLCR2021-11-211-6/+15
|
* Move language standard in separate method within vsbackendMoroz Oleg2021-11-021-9/+4
|
* Fixes .vcxproj for vs2017 vs2019Олег Мороз2021-11-021-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
* various manual conversion of percent-formatted strings to f-stringsEli Schwartz2021-11-011-11/+10
|
* fix typoed vs backend tokenEli Schwartz2021-11-011-1/+1
|
* Fix typos discovered by codespellChristian Clauss2021-10-101-1/+1
|
* backend/vs: Parallelize compilation inside one project.Andres Freund2021-10-081-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
* backend/vs: Deduplicate basic project template.Andres Freund2021-10-081-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.
* backend/vs: Name pch pdb files to avoid naming & lock conflicts.Andres Freund2021-10-081-0/+7
|
* backend/vs: Move Microsoft.Cpp.props to before ItemDefinitionGroup.Andres Freund2021-10-081-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.
* backend/vs: process link dependencies.Andres Freund2021-10-041-0/+10
| | | | Partially-Fixes: #1799
* remove useless variables that are no longer or were never usedEli Schwartz2021-10-041-1/+0
|
* backends/vs: Set ObjectFileName for generated sources.Andres Freund2021-09-201-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
* backends/vs: Do not emit dummy command for alias_command().Andres Freund2021-09-141-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
* pyllint: enable consider-user-enumerateDylan Baker2021-08-311-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): ... ```
* pylint: turn on superflous-parensDylan Baker2021-08-311-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.
* backends: remove unused name parameter from as_meson_exe_cmdlineDylan Baker2021-08-201-3/+2
| | | | This parameter isn't used, at all, so just remove it
* backends/vs: add a missing annotationDylan Baker2021-08-201-1/+1
|
* Fix native targets for vs backend cross compilationGustavoLCR2021-08-091-10/+40
|
* Add feed arg to custom_target()Simon Ser2021-06-291-0/+1
|
* fix: Always explicitly set encoding for text files (fixes #8263)Daniel Mensinger2021-06-291-1/+1
|
* Add Visual Studio 2012/2013 backends (#8803)fanc9992021-06-221-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.
* Visual Studio Address Sanitizer updatesPeter Harris2021-05-151-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
* Xcode: regenerato project file when build conf changes.Jussi Pakkanen2021-04-191-17/+0
|
* VS: Disable MSBuild warnings for always-generated targetsJesse Natalie2021-04-111-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.
* mass rewrite of string formatting to use f-strings everywhereEli Schwartz2021-03-041-4/+4
| | | | performed by running "pyupgrade --py36-plus" and committing the results
* Allow custom target output to be processed by generatorsMatthias Klumpp2021-02-251-9/+17
|
* Fix exe wrapper detection for run targets.Jussi Pakkanen2021-02-081-1/+1
|
* backend: Do not check for exe wrapper twiceXavier Claessens2021-02-051-1/+1
| | | | It is already checked by as_meson_exe_cmdline().
* run_target: Add env kwargXavier Claessens2021-02-051-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.
* custom_target: Add env kwargXavier Claessens2021-01-271-1/+2
|
* Add ARM64EC as a new conceptual cpu type of arm64Ben Niu2021-01-251-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'
* Use a single coredata dictionary for optionsDylan Baker2021-01-041-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).
* use OptionKey for builtin and base optionsDylan Baker2021-01-041-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.
* move OptionKey to mesonlibDylan Baker2021-01-041-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
* use OptionKey for compiler_optionsDylan Baker2021-01-041-6/+4
|
* use OptionKey for backend_optionsDylan Baker2021-01-041-1/+2
|
* use real pathlib moduleDylan Baker2020-11-201-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
* vs: add static_from_buildtype to b_vscrtPeter Harris2020-10-141-0/+7
|
* Add win_subsystem kwarg. Closes #7765.Jussi Pakkanen2020-10-071-2/+7
|
* pathlib: Fix resolve() by overriding it in Python 3.5Daniel Mensinger2020-10-041-2/+2
|
* Merge pull request #7762 from jon-turney/meson-exe-output-improveJussi Pakkanen2020-09-291-7/+7
|\ | | | | Improve the output for meson wrapped commands
| * Improve description of meson wrapped custom commandsJon Turney2020-09-201-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.
* | compilers/VS: fix build to use optimization and debug flagsVili Väinölä2020-09-291-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.
* backends: Treat build target as generator only when it's the first argNirbheek Chauhan2020-09-171-1/+1
| | | | | Otherwise it might be an argument to a script that just inspects the binary itself.
* Remove redudant checks in vs2010 backendVili Väinölä2020-09-131-6/+3
| | | | | - Implicit include dirs was checked twice in a row - Add define only if it does not yet exist rather than remove.