summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/mixins/visualstudio.py
Commit message (Collapse)AuthorAgeFilesLines
* compilers: clang-cl: Also accept .s files (#8520)D Scott Phillips2021-03-241-0/+3
| | | | | | | * compilers: clang-cl: Also accept .s files clang-cl has support for gas-compatible assembly files. * Add clang-cl to '128 generated assembly' test
* Add address sanitizer support for Visual Studio.Jussi Pakkanen2021-03-091-0/+9
|
* Add /Od flag to msvc optimization 0 argsVili Väinölä2021-03-081-1/+1
| | | | | Without specifying optimization the used optimization depends on vs runtime-library. With mdd it is /Od but with md it is /O2.
* mass rewrite of string formatting to use f-strings everywhereEli Schwartz2021-03-041-1/+1
| | | | performed by running "pyupgrade --py36-plus" and committing the results
* MSVC and Clang-Cl Compiler Argument CleanupMarios Staikopoulos2021-01-201-27/+6
| | | | | | | | | This commit performs some cleanup for the msvc and clang-cl arguments. * "Disable Debug" (`/Od`) is no longer manually specified for optimization levels {`0`,`g`} (it is already the default for MSVC). * "Run Time Checking" (`/RTC1`) removed from `debug` buildtype by default * Clang-CL `debug` buildtype arguments now match MSVC arguments * There is now no difference between `buildtype` flags and `debug` + `optimization` flags
* Removal of /ZI on MSVC DebugMarios Staikopoulos2021-01-171-2/+2
| | | | | | | | The /ZI flag adds in "Edit and Continue" debug information, which will cause massive slowdown. It is not a flag that we should be adding by default to debug builds. /Zi will still be added.
* use OptionKey for builtin and base optionsDylan Baker2021-01-041-1/+1
| | | | | | | | 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.
* Slight consistency changes to get_gui_app_argsLaurin-Luis Lehning2020-12-141-8/+0
|
* Make win_subsystem a linker propertyLaurin-Luis Lehning2020-12-141-3/+0
|
* vs: add static_from_buildtype to b_vscrtPeter Harris2020-10-141-5/+10
|
* Add win_subsystem kwarg. Closes #7765.Jussi Pakkanen2020-10-071-0/+3
|
* compilers: move get_dependency_gen_args to base CompilerDylan Baker2020-10-011-3/+0
| | | | | | So that every subclass doesn't have to reimplement it. Especially since the Gnu implementation moved out of the CCompiler and into the GnuLikeCompiler mixin
* compilers/VS: fix build to use optimization and debug flagsVili Väinölä2020-09-291-17/+17
| | | | | | | | - 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.
* compilers: Tell mypy that the compiler mixins are just thatDylan Baker2020-09-241-24/+12
| | | | | | We do this by making the mixins inherit the Compiler class only when mypy is examining the code (using some clever inheritance shenanigans). This caught a bunch of issues, and also lets us delete a ton of code.
* compilers/mixins: make visual studio type safeDylan Baker2020-09-241-2/+21
|
* compilers: Use a distinct type for compile/link resultsDylan Baker2020-09-241-1/+1
| | | | | | | Currently we do some crazy hackery where we add extra properties to a Popen object and return that. That's crazy. Especially since some of our hackery is to delete attributes off of the Popen we don't want. Instead, let's just have a discrete type that has exactly the properties we want.
* Canonicalize target architectures aarch64/armv* into arm64/arm for MSVC toolsMartin Storsjö2020-09-171-0/+4
| | | | | | If the architectures are taken from the output of "clang-cl --version", we need to convert these names into names that the MSVC tools accept as the -machine: parameter.
* visualstudio: warning_level 0 should not map to /W1Xavier Claessens2020-07-221-1/+1
| | | | In every other compilers level 0 maps to no argument at all.
* msvc: Avoid spurious openmp link warningsPeter Harris2020-06-061-0/+3
| | | | | | | | | | | | The linker that comes with MSVC does not understand the /openmp flag. This results in a string of LINK : warning LNK4044: unrecognized option '/openmp'; ignored warnings, one for each static_library linked with an executable. Avoid this by only setting the linker openmp flag when the compiler is not MSVC.
* compilers: Error if invalid linker selectedDylan Baker2020-03-171-4/+0
|
* linkers: Move import_library_args to from VS compiler to linkerDylan Baker2020-03-091-4/+0
| | | | | | | This is the argument to name the implib when using the Visual Studio Linker. This is needed by LDC and DMD when using link.exe or lld-link.exe on windows, and is really a linker argument not a compiler argument.
* compilers: Use /Zi instead of /ZI with clang-clDylan Baker2020-01-281-4/+13
| | | | | | | Clang-cl doesn't support /ZI, so we need to use either /Zi or /Z7, which both do the same thing for clang-cl (though not for msvc) Fixes #6414
* compilers: Split ClangCL and MSVC mixinsDylan Baker2020-01-281-26/+65
| | | | | | Instead of checking the compiler id inside the VisualStudioLikeCompiler class, this creates two subclasses that each represent the divergent behavior of the two compilers
* types: import typing as T (fixes #6333)Daniel Mensinger2020-01-081-41/+41
|
* Consider compiler arguments in linker detection logicDylan Baker2019-12-121-0/+2
| | | | | | | | | | | | | If a user passes -fuse-ld=gold to gcc or clang, they expect that they'll get ld.gold, not whatever the default is. Meson currently doesn't do that, because it doesn't pass these arguments to the linker detection logic. This patch fixes that. Another case that this is needed is with clang's --target option This is a bad solution, honestly, and it would be better to use $LD or a cross/native file but this is needed for backwards compatability. Fixes #6057
* Allow selecting the dynamic linkerDylan Baker2019-12-021-0/+4
| | | | | | | This uses the normal meson mechanisms, an LD environment variable or via cross/native files. Fixes: #6057
* Fix typos found by codespellWolfgang Stöggl2019-11-061-1/+1
| | | | - Typos were found by codespell v1.16.0
* MSVC: support -LIBPATHAleksey Gurtovoy2019-10-291-2/+4
| | | | Fixes #6101 (with a test), following up #5881
* Handle -idirafter in unix_args_to_nativeDaniel Mensinger2019-10-031-0/+12
|
* Correctly handle platform-specific LDFLAGS optionsAleksey Gurtovoy2019-09-271-0/+12
|
* compilers: Dispatch to dynamic linker classDylan Baker2019-08-141-68/+1
| | | | | Most of the cuda code is from Olexa Bilaniuk. Most of the PGI code is from Michael Hirsc
* compilers/mixins/visualstudio: Add type annotationsDylan Baker2019-07-151-106/+119
|
* compilers: Move the VisualStudioLikeCompiler class into mixinsDylan Baker2019-07-151-0/+411