aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/vs2010backend.py
AgeCommit message (Collapse)AuthorFilesLines
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.
2020-09-17backends: Treat build target as generator only when it's the first argNirbheek Chauhan1-1/+1
Otherwise it might be an argument to a script that just inspects the binary itself.
2020-09-13Remove redudant checks in vs2010 backendVili VÀinölÀ1-6/+3
- Implicit include dirs was checked twice in a row - Add define only if it does not yet exist rather than remove.
2020-09-13Add VS include directories to projects as wellVili VÀinölÀ1-2/+3
- "Go To Document" action previously only worked on c/cpp files which had the include directories set but it was not possible to move from header to another header.
2020-09-08typing: more fixesDaniel Mensinger1-2/+2
2020-06-22compilers: Return CompilerArgs from compiler instanceDylan Baker1-5/+4
Since the CompileArgs class already needs to know about the compiler, and we really need at least per-lanaguage if not per-compiler CompilerArgs classes, let's get the CompilerArgs instance from the compiler using a method.
2020-06-22compilers: Split CompilerArgs into a separate moduleDylan Baker1-1/+1
I've also moved this out of the compilers pacakge because we're soon going to need it in linkers, and that creates some serious spagetti
2020-06-15Add exception handling to be also written to the VS project xmlVili VÀinölÀ1-0/+12
When changing meson option cpp_eh, it was passed to cl with AdditionalOptions and resulted in unsuppressable warning "cl : command line warning D9025: overriding '/EHs' with '/EHa'"
2020-06-06backend/vs: Fix OpenMP supportPeter Harris1-17/+17
Use the IDE's OpenMP flag instead of adding /openmp to additional arguments. The IDE appears to override /openmp in additional arguments with the IDE setting, which defaults to false, leading to binaries built without OpenMP.
2020-05-19Build private directory name from output file name.Jussi Pakkanen1-0/+3
2020-05-14backend/vs: Fix b_vscrt=from_buildtype for debugoptimizedPeter Harris1-2/+2
The ninja backend only uses the debug C runtime for 'debug', not for 'debugoptimized'. The ninja backend always uses the DLL C runtime for all configurations. The documentation matches the ninja backend. Make the visual studio backend follow the documentation (and the precedent set by the ninja backend).
2020-05-04Fix incremental debug builds in VSGustavoLCR1-1/+2
2020-04-24backend/vs: Fix build when not all languages have pchPeter Harris1-10/+4
It is not unheard-of for a project to use pch for C++ but not for C (because C usually builds fast enough anyway, so it's not worth the developer overhead of maintaining the pch file). This code was trying to optimize the vcxproj file size by detecting "only one language", but it was only looking at the number of pch-languages defined. This is incorrect when pch is not defined for all languages in use. Instead of tweaking the optimization further, remove it. This makes the vs backend behave more like the ninja backend.
2020-04-20Compiler options per langJohn Ericson1-7/+11
A current rather untyped storage of options is one of the things that contributes to the options code being so complex. This takes a small step in synching down by storing the compiler options in dicts per language. Future work might be replacing the langauge strings with an enum, and defaultdict with a custom struct, just like `PerMachine` and `MachineChoice`.
2020-04-11Handle BuildTarget as custom_target() argument #6914Marc-André Lureau1-1/+1
2020-04-10Fixes meson bug to allow arm64 buildJesse Natalie1-1/+5
2020-04-04backend/vs: Fix link of wmain / wWinMain based appsPeter Harris1-5/+0
Executables may have an entry point of wmain or wWinMain. These executables link successfully with ninja. Rather than add more flags to executable() in meson.build, remove the EntryPointSymbol override. This makes the vs backend behave more like the ninja backend. Fixes #6698
2020-04-03backend/vs: Fix debug information and runtime checksPeter Harris1-6/+6
Both DebugInformationFormat and BasicRuntimeChecks need to be in clconf (not type_config) for Visual Studio to recognize them. Fixes #6699
2020-01-28backend: refactor: set self.interpreter in the constructorDaniel Mensinger1-9/+10
2020-01-22vs: Write checksums in PE binaries (DLLs and EXEs)Nirbheek Chauhan1-0/+4
This is needed for detecting data corruption, and its absence (or an incorrect value) is also used as a hint by anti-viruses that the binary may be malware. Flag is only supported by MSVC `link.exe`, not `lld-link.exe` https://docs.microsoft.com/en-us/cpp/build/reference/release-set-the-checksum
2019-11-30Prevent the presence of duplicated items in .vcxproj filesLuca Bacci1-22/+43
Visual Studio refuses to open projects that present duplicated items, for example: <ItemGroup> <CLInclude Include="glib-enumtypes.h"/> <CLInclude Include="glib-enumtypes.h"/> </ItemGroup> Note that MSBuild handles duplicated items without any issue, this is useful only for compatibility with the VS IDE. See pull request mesonbuild#6151 Fixes issue mesonbuild#6147
2019-07-19backends: choose whether to serialize in as_meson_exe_cmdlinePaolo Bonzini1-6/+7
This removes more duplicate code between custom targets and generators. In addition, generators can now have arguments with newlines in them.
2019-07-19vs2010backend: always serialize executables for generatorsPaolo Bonzini1-12/+14
Do the same as for custom targets.
2019-07-19backends: hide meson --internal exe cmdline from backendsPaolo Bonzini1-9/+7
Return the command line from serialize_executable, which is then renamed to as_meson_exe_cmdline. This avoids repeating code that is common to custom targets and generators.
2019-07-10vs backend: commandrunner.py takes source dir firstXavier Claessens1-1/+1
2019-07-10Add alias_target() functionXavier Claessens1-1/+6
2019-06-09Purge `is_cross` and friends without changing user interfacesJohn Ericson1-14/+10
In most cases instead pass `for_machine`, the name of the relevant machines (what compilers target, what targets run on, etc). This allows us to use the cross code path in the native case, deduplicating the code. As one can see, environment got bigger as more information is kept structured there, while ninjabackend got a smaller. Overall a few amount of lines were added, but the hope is what's added is a lot simpler than what's removed.
2019-06-08Moved RuntimeLibrary property to ItemDefinitionGroup/ClCompilefilippocrocchini1-9/+10
2019-05-02Merge pull request #5311 from mensinda/flake8PluginsJussi Pakkanen1-3/+3
Added flake8 plugins and some code fixes
2019-04-29Added special handling of CustomTargetIndex in VS backendTheQwertiest1-1/+5