summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Don't use -fPIC on Cygwin, eitherJon Turney2017-04-064-5/+13
| | | | | | | Identify Cygwin-targetted gcc as sui generis (don't use -fPIC, but don't link with standard Windows libraries, either) Update tests appropriately
* Don't crash if a meson.build file is empty (#1570)Aaron Plattner2017-04-074-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Don't crash if a meson.build file is empty Commit 9adef3a8e878 caused an empty meson.build file to generate a traceback: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/mesonbuild/mparser.py", line 415, in getsym self.current = next(self.stream) StopIteration During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/mesonbuild/mesonmain.py", line 298, in run app.generate() File "/usr/lib/python3.6/site-packages/mesonbuild/mesonmain.py", line 180, in generate intr.run() File "/usr/lib/python3.6/site-packages/mesonbuild/interpreter.py", line 2529, in run super().run() File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 125, in run self.evaluate_codeblock(self.ast, start=1) File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 146, in evaluate_codeblock raise e File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 140, in evaluate_codeblock self.evaluate_statement(cur) File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 151, in evaluate_statement return self.function_call(cur) File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 372, in function_call return self.funcs[func_name](node, self.flatten(posargs), kwargs) File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 47, in wrapped return f(self, node, args, kwargs) File "/usr/lib/python3.6/site-packages/mesonbuild/interpreter.py", line 2237, in func_subdir self.evaluate_codeblock(codeblock) File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 146, in evaluate_codeblock raise e File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 140, in evaluate_codeblock self.evaluate_statement(cur) File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 151, in evaluate_statement return self.function_call(cur) File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 372, in function_call return self.funcs[func_name](node, self.flatten(posargs), kwargs) File "/usr/lib/python3.6/site-packages/mesonbuild/interpreterbase.py", line 47, in wrapped return f(self, node, args, kwargs) File "/usr/lib/python3.6/site-packages/mesonbuild/interpreter.py", line 2233, in func_subdir codeblock = mparser.Parser(code, self.subdir).parse() File "/usr/lib/python3.6/site-packages/mesonbuild/mparser.py", line 410, in __init__ self.getsym() File "/usr/lib/python3.6/site-packages/mesonbuild/mparser.py", line 417, in getsym self.current = Token('eof', '', self.current.line_start, self.current.lineno, self.current.colno + self.current.bytespan[1] - self.current.bytespan[0], (0, 0), None) AttributeError: 'Parser' object has no attribute 'current'
* Renamed tests with the same number.Jussi Pakkanen2017-04-0510-0/+0
|
* Merge pull request #1511 from centricular/get-defineJussi Pakkanen2017-04-0510-70/+146
|\ | | | | New compiler function: cc.get_define()
| * Prohibit ':' in project namesNirbheek Chauhan2017-04-052-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | This would make it harder to parse an option to mesonconf such as -Dfoo:bar:baz:fun=value since it could mean either of these: * For subproject 'foo:bar:baz', set the option 'fun' to 'value' * For subproject 'foo:bar', an invalid option 'baz:fun' was set To differentiate between these two we'd need to create the list of subprojects first and then parse their options later, which complicates the parsing quite a bit.
| * Allow option values to contain ':'Nirbheek Chauhan2017-04-042-4/+5
| | | | | | | | | | | | | | Instead, check that option keys don't contain ':'. Also change the failing option test to look for this. Closes https://github.com/mesonbuild/meson/issues/1454
| * Use CPPFLAGS for pre-processor compiler checksNirbheek Chauhan2017-04-047-15/+44
| | | | | | | | | | | | Also don't add CFLAGS twice for links() checks Includes a test for this.
| * Use shlex.split() to split CFLAGS/LDFLAGS/etcNirbheek Chauhan2017-04-041-3/+4
| | | | | | | | | | This allows people to use spaces in the environment variables as long as they use the correct quoting.
| * New compiler function: cc.get_define()Nirbheek Chauhan2017-04-043-32/+72
| | | | | | | | | | | | Runs the pre-processor and fetches the value of the define. Can find any arbitrary value and returns it as a string.
| * compilers: Rename 'get_define' to 'get_builtin_define'Nirbheek Chauhan2017-04-042-12/+12
| | | | | | | | | | We will use `get_define` to implement a function that fetches the values of defines from headers.
* | Merged Valgrind dependency branch.Jussi Pakkanen2017-04-042-0/+10
|\ \
| * | Add dependency type for ValgrindDylan Baker2017-03-292-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Valgrind is a bit of a strange beast, in general use one isn't supposed to link against valgrinds libs, they're non-PIC static libs, instead, including the headers does magic to make valgrind work. This patch implements a simple ValgrindDependency class subclassed from PkgConfigDependency, that overwrites (effectively) only the get_link_args method to always return an empty list. This solution may seem strange, but I think that it follows the principle of least surprise, and simplifies the most common use case for valgrind. Essentially without this every valgrind consumer would be forced to implement the following code to have a usable valgrind dependency object: _dep = dependency('valgrind', required : false) if _dep.found() valgrind_dep = declare_dependency( compile_args : _dep.get_pkgconfig_variable('Cflags') ) else valgrind_dep = [] endif While the above is workable, it's surprising behavior and the above code snippet becomes boilerplate that everyone needs to copy into their meson files. Fixes #826
* | | Merge pull request #1557 from pitti/fix/configure_data-files-inputJussi Pakkanen2017-04-044-8/+18
|\ \ \ | |_|/ |/| | Fix configure_data files input
| * | update authors.txtPhilipp Ittershagen2017-04-031-0/+1
| | |
| * | Enable File() objects as an input parameter to configure_filePhilipp Ittershagen2017-04-032-2/+11
| | | | | | | | | | | | | | | | | | | | | The configure_file command raised an exception when an input was specified as a File, because os.path.join does not take File objects directly. This patch converts a File object to a string and adjusts the subsequent os.path.join calls.
| * | Refactor duplicate code in FilePhilipp Ittershagen2017-04-031-6/+6
| | | | | | | | | | | | | | | Increase readability using the File method self.relative_name() to factor out some of the os.path.join(...) commands.
* | | Merge pull request #1520 from mesonbuild/tingping/python3-moduleJussi Pakkanen2017-04-032-0/+32
|\ \ \ | | | | | | | | Add get_path() and get_version() methods to the python3 module
| * | | python3: Add tests for sysconfig_path() and language_version()Patrick Griffis2017-03-301-0/+10
| | | |
| * | | python3: Add sysconfig_path() methodPatrick Griffis2017-03-301-0/+14
| | | | | | | | | | | | | | | | | | | | This returns the value of sysconfig paths, useful for installing modules for example.
| * | | python3: Add language_version() methodPatrick Griffis2017-03-301-0/+8
| | | |
* | | | Merge pull request #1457 from mesonbuild/overridesJussi Pakkanen2017-04-0316-37/+216
|\ \ \ \ | | | | | | | | | | Add MVP implementation of overriding options.
| * | | | Add test for werror which is a boolean type.Jussi Pakkanen2017-04-023-3/+9
| | | | |
| * | | | Review fixes.Jussi Pakkanen2017-04-024-5/+4
| | | | |
| * | | | Proxy object for overriding options transparently.Jussi Pakkanen2017-04-028-2/+77
| | | | |
| * | | | Use get_option_for_target for builtins where sensible.Jussi Pakkanen2017-04-024-27/+34
| | | | |
| * | | | Use relative object file name for unity files everywhere.Jussi Pakkanen2017-04-022-8/+10
| | | | |
| * | | | Create unity files with the VS backend.Jussi Pakkanen2017-04-024-10/+20
| | | | |
| * | | | Add MVP implementation of overriding options.Jussi Pakkanen2017-04-028-7/+87
| |/ / /
* | | | tests/common/141: Fix build on mingw64Nirbheek Chauhan2017-04-032-1/+6
| |/ / |/| |
* | | Merge pull request #1505 from centricular/dont-use-c++-for-assemblyJussi Pakkanen2017-04-0217-26/+188
|\ \ \ | |/ / |/| | Try harder to use the C compiler for compiling asm
| * | run_tests: Don't run unit tests when the VS backend is selectedNirbheek Chauhan2017-03-301-1/+10
| | |
| * | tests/common/141: Also test C + asm targetsNirbheek Chauhan2017-03-303-2/+27
| | | | | | | | | | | | Ensure that they are all built with and linked with the C compiler
| * | wrap: Also capture stderr while running quiet_git()Nirbheek Chauhan2017-03-272-1/+6
| | | | | | | | | | | | We want to return the stderr if the command failed.
| * | Try even harder to use the C compiler for assemblyNirbheek Chauhan2017-03-2711-16/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now as long as you have a C compiler available in the project, it will be used to compile assembly even if the target contains a C++ compiler and even if the target contains only assembly and C++ sources. Earlier, the order in which sources appeared in a target would decide which compiler would be used. However, if the project only provides a C++ compiler, that will be used for compiling assembly sources. If this breaks your use-case, please tell us. Includes a test that ensures that all of the above is adhered to.
| * | tests: Fix typo in unit test codeNirbheek Chauhan2017-03-271-1/+1
| | | | | | | | | | | | This project wasn't actually configured, so it was never noticed.
| * | Don't require a language/compiler for configuringNirbheek Chauhan2017-03-272-3/+3
| | | | | | | | | | | | | | | | | | Not really needed for projects that don't compile anything. Closes https://github.com/mesonbuild/meson/issues/1208
| * | compilers: Implement __repr__ for easier debuggingNirbheek Chauhan2017-03-271-0/+5
| | |
| * | Try harder to use the C compiler for compiling asmNirbheek Chauhan2017-03-273-17/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use an ordered dict for the compiler dictionary and sort it according to a priority order: fortran, c, c++, etc. This also ensures that builds are reproducible because it would be a toss-up whether a C or a C++ compiler would be used based on the order in which compilers.items() would return items. Closes https://github.com/mesonbuild/meson/issues/1370
* | | strip trailing backslash from WindowsSDKVersion (#1538)melak472017-03-302-1/+2
| |/ |/|
* | fix "Meson encountered an error in file meson.build, line 19, column … (#1536)kalmiya2017-03-292-2/+3
| | | | | | | | fix "Meson encountered an error in file meson.build, line 19, column 8: Unknown method "set_install_script" in object."
* | Merge pull request #1346 from msink/test-mingwJussi Pakkanen2017-03-2920-26/+184
|\ \ | | | | | | appveyor: run tests against MSYS2-MinGW
| * | tests/windows/5: Skip if build_to_src has spacesNirbheek Chauhan2017-03-281-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | In this case, the arguments to MinGW windres will contain spaces and the test will definitely fail, so just skip it. This effectively means that manually running the test will be fine, but running it via run_project_tests.py will always fail (skip).
| * | appveyor: Move msys2-mingw matrix a little higherNirbheek Chauhan2017-03-281-4/+4
| | | | | | | | | | | | Allows us to see failures in it sooner because it will be run earlier
| * | modules: Start using @SOURCE_ROOT@ and @BUILD_ROOT@Nirbheek Chauhan2017-03-286-13/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First step in fixing https://github.com/mesonbuild/meson/issues/1419 Also works around an issue in the MinGW windres.exe that causes it to fail if any of the arguments passed to it contain a space. There seems to be no way to quote or escape the spaces in the path to make windres parse the path correctly, so we just warn about it instead. https://sourceware.org/bugzilla/show_bug.cgi?id=4933 https://github.com/mesonbuild/meson/pull/1346
| * | tests/windows/5: Add more subdirs to the testNirbheek Chauhan2017-03-286-4/+7
| | | | | | | | | | | | | | | This improves test coverage by testing that resources, includes, and build targets being in separate directories works properly.
| * | project tests: Don't look for PDB files on MinGW/GCCNirbheek Chauhan2017-03-281-1/+2
| | |
| * | tests/common/127: Fix test on MinGW 64-bitNirbheek Chauhan2017-03-282-1/+6
| | | | | | | | | | | | | | | Instead of hard-coding whether the symbol should be underscored, detect it.
| * | project tests: DummyExecutor for MSYS2 and OpenBSDNirbheek Chauhan2017-03-281-1/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added and tested on MSYS2/MinGW which doesn't implement the required semaphore locks in the multiprocessing module: Traceback (most recent call last): File "C:/msys64/mingw64/lib/python3.5\multiprocessing\synchronize.py", line 29, in <module> from _multiprocessing import SemLock, sem_unlink ImportError: cannot import name 'sem_unlink' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "run_project_tests.py", line 560, in <module> (passing_tests, failing_tests, skipped_tests) = run_tests(all_tests, 'meson-test-run', options.extra_args) File "run_project_tests.py", line 406, in run_tests executor = conc.ProcessPoolExecutor(max_workers=num_workers) File "F:/msys64/mingw64/lib/python3.5\concurrent\futures\process.py", line 390, in __init__ EXTRA_QUEUED_CALLS) File "F:/msys64/mingw64/lib/python3.5\multiprocessing\context.py", line 101, in Queue return Queue(maxsize, ctx=self.get_context()) File "F:/msys64/mingw64/lib/python3.5\multiprocessing\queues.py", line 42, in __init__ self._rlock = ctx.Lock() File "F:/msys64/mingw64/lib/python3.5\multiprocessing\context.py", line 65, in Lock from .synchronize import Lock File "F:/msys64/mingw64/lib/python3.5\multiprocessing\synchronize.py", line 34, in <module> " function, see issue 3770.") ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770. See also: https://bugs.python.org/issue3770 https://github.com/mesonbuild/meson/issues/1323 According to 3770, the same problem also exists on OpenBSD, so this will potentially also be useful there.
| * | tests/common/135: Fix assembly on GCC/MinGWNirbheek Chauhan2017-03-283-5/+6
| | | | | | | | | | | | .type declaration only works on Linux
| * | unit tests: Skip static library overwrite on WindowsNirbheek Chauhan2017-03-281-1/+3
| | | | | | | | | | | | Test is broken due to https://github.com/mesonbuild/meson/issues/1526