Commit Graph

10874 Commits

Author SHA1 Message Date
Dylan Baker c6ec13e6bf
Only try to get RSP syntax if RSP is supported (#8804) 2021-05-30 00:24:53 +03:00
Xavier Claessens 25fa2d4f7b vsenv: Recommend using "meson compile" wrapper
When meson has setup the VS environment, running ninja to build won't
work, user should use meson wrapper to compile.
2021-05-28 17:34:25 -04:00
Jussi Pakkanen a9b65b421e Remove HFS workaround as everyone should use APFS by now. 2021-05-29 00:22:38 +03:00
Xavier Claessens 2fb24b18e1 unstable_external_project: Remove unused imports 2021-05-28 15:17:10 -04:00
Xavier Claessens 8abbc5cc5d modules: Replace find_program_impl() by state.find_program() 2021-05-28 15:17:10 -04:00
Xavier Claessens 2e02ef6592 modules: Add methods dict everywhere
This fix calling random internal methods from meson.build as long as
they were not prefixed by underscore.
2021-05-28 15:17:10 -04:00
Xavier Claessens a734bcfc83 modules: Stop using ModuleReturnValue where it's not needed
It is only needed in functions that need to add targets to the
interpreter.
2021-05-28 15:17:10 -04:00
Xavier Claessens 3340284805 modules: Stop using InterpreterObject
Custom objects returned by modules must be subclass of ModuleObject and
have the state argument in its methods.

Add MutableModuleObject base class for objects that needs to be deep
copied on assignation.
2021-05-28 15:17:10 -04:00
Xavier Claessens 723c5227a4 modules: Remove snippet methods
The only advantage they have is they have the interpreter in arguments,
but it's already available as self.interpreter. We should discourage
usage of the interpreter API and rely on ModuleState object instead in
the future.

This also lift the restriction that a module method cannot add build
targets, but that was not enforced for snippet methods anyway (and some
modules were doing it) and it's really loose restriction as it should
check for many other things if we wanted to make it consistent.
2021-05-28 15:17:10 -04:00
Naveen M K 495e76d10a Remove `Microsoft.VisualStudio.Workload.WDExpress` 2021-05-28 15:16:37 -04:00
Naveen M K 7ec5267939 Find Visual Studio Build Tools 2019
Got the Idea from setuptools
a5131f0b82/setuptools/msvc.py (L176)
2021-05-28 15:16:37 -04:00
Xavier Claessens a9959a3859 Vala: Add missing FeatureNew() when C is missing
It was previously an hard error, only permitted since 0.59.0.
2021-05-28 10:20:08 -04:00
Dylan Baker a5b43aa16c Add a helper to simplify the usage of PerMachineDefaultable 2021-05-28 09:26:38 -04:00
Dylan Baker 336f2f8835 tests: Add a test for dependencies with native set in a host == build configuration 2021-05-28 09:26:38 -04:00
Dylan Baker d2e7bdccd7 build: Use a PerMachineDefaultable for (project|global)[_link]_args 2021-05-28 09:26:38 -04:00
Dylan Baker 76b98459ac coredata: Use a PerMachineDefaultable for the deps cache 2021-05-28 09:26:38 -04:00
Dylan Baker f9a9faba92 build: Use a PerMachineDefaultable for dependency override cache
This way if we're doing a host == build configuration then the build and
host dependencies will be stored correctly.
2021-05-28 09:26:38 -04:00
Dylan Baker 012d60b100 mesonlib: Allow PerMachineDefaultable to take arguments at initialization 2021-05-28 09:26:38 -04:00
Dylan Baker 49b5037496 dependencies/zlib: System Dependency needs a clib_compiler on windows
Otherwise it'll except when it tries to get an attribute from None that
doesn't exist.
2021-05-28 09:26:38 -04:00
Dylan Baker 7114a9015e mesonlib: Fix return type of PerMachineDefaultable.default_missing() 2021-05-28 09:26:38 -04:00
Dylan Baker 76768eaf20 build: fix type annotation import 2021-05-28 09:26:38 -04:00
Dylan Baker f1e053fa44 modules/gnome: Correctly handle generated sources for generate_gir
We need to pass any generated sources down the CustomTarget
inititalizers so that they will generate a dependency correctly,
otherwise we get race conditions.
2021-05-28 08:47:11 -04:00
Chun-wei Fan 45af5d9d72 test cases: Disable whole archive test on older VS IDE
The pre-2015 Visual Studio IDE do not handle things correctly for this test,
so disable this.
2021-05-27 09:54:37 -07:00
Chun-wei Fan 0a0639ec06 MSVC: Always enable common tests 137 and 170
This will test the "whole archive" and "generator link whole" for all
Visual C++ versions.
2021-05-27 09:54:37 -07:00
Chun-wei Fan bbb6f2c51c ninjabackend.py: Implement `link_whole:` for pre-VS2015
...Update 2, to be exact, since the Visual Studio linker only gained the
`/WHOLEARCHIVE:` feature since Visual Studio 2015 Update 2.

This checks whether we have the corresponding `cl.exe` which is
versioned at or after Visual Studio 2015 Update 2 before we try to apply
the `/WHOLEARCHIVE:xxx` linker flag.  If we aren't, use built-in methods
in Meson to grab the object files of the dependent static lib's, along
with the objects that were `link_whole:`'ed into them, and feed this
list into the linker instead.

This would make `link_whole:` work on Visual Studio 2015 Update 1 and
earlier, including previous Visual Studio versions.
2021-05-27 09:54:37 -07:00
Jussi Pakkanen b9b73b65a7 Update chat info. [skip ci] 2021-05-26 12:39:34 +03:00
Jussi Pakkanen 799b96f753 Also skip VS activation if gcc is found. 2021-05-23 21:33:24 +01:00
Jon Turney 7e7a23293b Fix double negative in 'No CMake binary not found' 2021-05-23 17:59:43 +01:00
Jussi Pakkanen 43f0aa17b7 Add swift executable support in Xcode. 2021-05-23 17:59:14 +01:00
Jussi Pakkanen cb085f3eb3 Handle macOS filesystem sometimes setting lower digits to zero. 2021-05-23 17:58:56 +01:00
Jussi Pakkanen 2dc8d1d626 Fix text used to validate test output. 2021-05-23 17:58:56 +01:00
Jussi Pakkanen 3d12f928cf Rename VERSION because case insensitive file systems are a thing. 2021-05-23 17:58:56 +01:00
Jussi Pakkanen 45acef1241
Merge pull request #8787 from mesonbuild/xcodeprojecttree
Rework Xcode project navigation tree
2021-05-23 17:58:20 +01:00
Jussi Pakkanen df960b0a35
Merge pull request #8786 from jon-turney/cygwin-tests-reenable
Re-enable various tests on Cygwin
2021-05-23 17:52:20 +01:00
Jussi Pakkanen e23fd086bf Remove unnecessary hierarchical layer. 2021-05-23 13:28:25 +03:00
Jussi Pakkanen b84265052e Remove top level sources entry as unnecessary. 2021-05-23 13:28:25 +03:00
Jussi Pakkanen 7ceba6388c Add meson.build files to pbxgroup. 2021-05-23 13:28:25 +03:00
Jussi Pakkanen 818685ec18 Write project info in a tree structure rather than the current flat one. 2021-05-23 13:28:25 +03:00
Jussi Pakkanen cdb91f493e Disable D test on macOS as it fails mysteriously. 2021-05-23 11:26:53 +01:00
Jussi Pakkanen 293da38546 It seems ld64 is the default linker name on macOS now. 2021-05-23 11:26:53 +01:00
Jacob Nielsen 3e5ec00a40
Better detection of Visual Studio compiler 2021-05-22 01:05:18 +03:00
Jon Turney f76c6b8d0a
Fix LTO test on Cygwin
This partially reverts commit add502c648.

In 'linkshared' test, annotate cppfunc() as imported, so an indirection
through an import stub is generated, avoiding a relocation size error
when building using gcc for Cygwin with LTO on.

Align with the example of how to write this portably in [1].

The 'c' language part of that test already gets this right.

[1] http://gcc.gnu.org/wiki/Visibility
2021-05-21 14:19:35 +01:00
Jon Turney 91aeae558d
Revert "ci: Disable pytest-xdist on cygwin"
This reverts commit dce60c8f58.
2021-05-20 23:37:15 +01:00
Jon Turney 2d215d93b2
Revert "Disable failing Cygwin GIR test."
This partially reverts commit add502c648.
2021-05-20 23:12:21 +01:00
Jon Turney 1694e4ceca
Revert "Disable broken asm test on Cygwin as nobody knows how to fix it."
This reverts commit 56a0e74d71.
2021-05-20 21:49:40 +01:00
Dylan Baker 619e05c8cf vala: Test that adding C manually isn't requiured 2021-05-20 13:27:17 -07:00
Dylan Baker 17eb224aa7 interpreter: Automatically add 'c' to languages when 'vala' is used
This is so dumb, we can just insert C for you without you having to know
that you're using C under the hood. This is nicer because:
1) Meson doesn't make the user add a language they're not explicitly
   using
2) If there was ever an implementaiton of Vala that didn't use C as
   it's assembly language, this wouldn't make any sense.
2021-05-19 23:28:17 +03:00
Dylan Baker bfd06783bd backends: use a set for processed targets instead of a dict
We're only interested in the keys, not in the value (which was always
set to True), so a set is a better data structure anyway.
2021-05-19 23:28:17 +03:00
Dylan Baker 156d6160d1 compilers: Add `get_debug_args` to base Compiler
This was missed, there should be an implementation in the base Compiler
class, if for nothing else to help mypy
2021-05-19 23:28:17 +03:00
Dylan Baker 7659ae50a0 ninjabackend: Fix vala type annotations 2021-05-19 23:28:17 +03:00