aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-06-12mintro: typing fixTheQwertiest1-1/+1
2020-06-12mintro: typing fixTheQwertiest1-1/+1
2020-06-12mintro: enforced order for subcommandsTheQwertiest1-12/+14
2020-06-12[skip ci] docs: Bring up to date on options per machineJohn Ericson2-14/+64
I tried to fix the docs when the stuff was added, but it turns out I missed things, as noted in https://github.com/mesonbuild/meson/issues/7284#issuecomment-641641177
2020-06-12modules/cmake: Fix setting install_dirDylan Baker4-2/+21
Fixes: #7301
2020-06-12cmake: Subprojects support CMAKE_PREFIX_PATH (fixes #7249)Daniel Mensinger4-15/+37
2020-06-12docs: remove duplicated entry for gnome.generate_gir() documentation [skip ci]坂本 貴史1-1/+0
The documentation of gnome.generate_gir() has duplicated entry for dependencies parameter. As a fix, this patch removes the entry added recently. Fixes: 893d101fff01 ("gnome: Add header kwarg to generate_gir()") Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
2020-06-11Correct argument typo in partial_dependnecy (#7300) [skip ci]Phillip Johnston1-1/+1
Should be "sources" not "source" ``` ../meson.build:162: WARNING: Passed invalid keyword argument "source". WARNING: This will become a hard error in the future. Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/mesonbuild/mesonmain.py", line 131, in run return options.run_func(options) File "/usr/local/lib/python3.7/site-packages/mesonbuild/msetup.py", line 245, in run app.generate() File "/usr/local/lib/python3.7/site-packages/mesonbuild/msetup.py", line 159, in generate self._generate(env) File "/usr/local/lib/python3.7/site-packages/mesonbuild/msetup.py", line 192, in _generate intr.run() File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreter.py", line 4359, in run super().run() File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 465, in run self.evaluate_codeblock(self.ast, start=1) File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 490, in evaluate_codeblock raise e File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 483, in evaluate_codeblock self.evaluate_statement(cur) File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 498, in evaluate_statement self.assignment(cur) File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 1151, in assignment value = self.evaluate_statement(node.value) File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 500, in evaluate_statement return self.method_call(cur) File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 895, in method_call return obj.method_call(method_name, args, self.kwargs_string_keys(kwargs)) File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 39, in method_call return method(args, kwargs) File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 285, in wrapped return f(*wrapped_args, **wrapped_kwargs) File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 151, in wrapped return f(*wrapped_args, **wrapped_kwargs) File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 213, in wrapped return f(*wrapped_args, **wrapped_kwargs) File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreter.py", line 484, in partial_dependency_method pdep = self.held_object.get_partial_dependency(**kwargs) TypeError: get_partial_dependency() got an unexpected keyword argument 'source' FAILED: build.ninja ```
2020-06-11unit tests: Pass args to pytestNirbheek Chauhan1-0/+3
Gets --help working and --failfast too.
2020-06-11apple: -headerpad args are ignored when bitcode is enabledNirbheek Chauhan2-7/+13
Causes spammy warnings from the linker: ld: warning: -headerpad_max_install_names is ignored when used with -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES)
2020-06-11Fix typo in bitcode messageNirbheek Chauhan1-1/+1
2020-06-11compilers: corretify deduplication directionMarcel Hollerbach2-2/+21
so: when building compile args, meson is deduplicating flags. When a compiler argument is appended, a later appearance of a dedup'ed is going to remove a earlier one. If the argument is prepended, the element *before* the new one is going to be removed. And that is where the problem reported in https://github.com/mesonbuild/meson/pull/7119 is coming in. In the revision linked there, the order of replacement in the prepend case was revesered. With this patch, we restore this behaviour again.
2020-06-10Updated to resolve issue identifying SGI CPUs on IRIX systemsEric Dodd3-2/+11
2020-06-10Fix python3 installed from the Windows StoreD Scott Phillips2-4/+26
When meson is currently being run with a python that seems to have been installed from the Windows Store, replace the general WindowsApps directory in search paths with dirname(sys.executable), and also handle failures with pathlib.resolve on WindowsApps exe files.
2020-06-10dependencies: Remove finish_init methodDylan Baker3-26/+37
This is a holdover from before we had the DependencyFactory. It should have already been refactored into the initializer, but wasn't for some reason.
2020-06-10tell variable name when erroring on bad combo optionMichael Hirsch1-1/+3
fixes #7269
2020-06-09Made --help options sortedTheQwertiest2-2/+2
2020-06-09cmake_traceparser: ignore parse errorMichael Hirsch1-1/+1
2020-06-09compilers: Add UNIX large file support for MinGWSeungha Yang1-3/+3
MinGW gcc supports _FILE_OFFSET_BITS=64 and we need to set it for MinGW as well
2020-06-08docs/users: Add Le Machine Learning library [skip ci]Kyrylo Polezhaiev1-0/+1
2020-06-08Merge pull request #7245 from dankegel/response-files-when-needed-tidiedJussi Pakkanen16-110/+444
Make ninja backend only use response files when needed, on linux too
2020-06-07Merge pull request #7119 from marcelhollerbach/masterJussi Pakkanen2-38/+73
Performance optimize ninja backend
2020-06-07Merge pull request #7256 from peterh/openmpJussi Pakkanen4-18/+25
Fix OpenMP on Visual Studio
2020-06-07Remove warnings from sample code. Closes #7248.Jussi Pakkanen1-1/+1
2020-06-07End test code with a newline. Closes #7247.Jussi Pakkanen1-2/+2
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-06-06msvc: Avoid spurious openmp link warningsPeter Harris3-1/+8
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.
2020-06-05docs: add snippet about response file changeDan Kegel1-0/+7
2020-06-05run_unittests.py: skip test_internal_include_order for now if forcing ↵Dan Kegel1-0/+3
response files on msys2 That test looks at the compdb very carefully, but isn't yet set up to handle gcc responsefile quoting on windows, it seems.
2020-06-05ci: run some builders with response file threshold set to zeroDan Kegel3-1/+12
2020-06-05test cases/common/234: get limit right on linux, generate fewer filesDan Kegel1-2/+25
2020-06-05ninja: response file threshold now more accurate, overridable, portable.Dan Kegel1-2/+20
2020-06-05gnulike linkers (and ar) accept rsp files.Dan Kegel1-0/+7
2020-06-05ninja: Add ninja variable DEPFILE_UNQUOTED with unquoted DEPFILE valueJon Turney1-1/+7
It's assumed that where we use DEPFILE in command or rspfile_content, it can be quoted by quoting the ninja variable (e.g. $DEPFILE -> '$DEPFILE') This is nearly always true, but not for gcc response files, where backslash is always an escape, even inside single quotes. So this fails if the value of DEPFILE contains backslashes (e.g. a Windows path) Do some special casing, adding DEPFILE_UNQUOTED, so that the value of depfile is not shell quoted (so ninja can use it to locate the depfile to read), but the value of DEPFILE used in command or rspfile_content is shell/response file quoted) (It would seem this also exists as a more general problem with built-in ninja variables: '$out' appearing in command is fine, unless one of the output filenames contains a single quote. Although forbidding shell metacharacters in filenames seems a reasonable way to solve that.) (How does this even work, currently? Backslashes in the value of all ninja variables, including DEPFILE were escaped, which protected them against being treated as escapes in the gcc response file. And fortunately, the empty path elements indicated by a double backslash in the value of depfile are ignored when ninja opens that file to read it.)
2020-06-05ninja: Specifically implement gcc rspfile style quotingJon Turney1-8/+18
This differs from sh-quoting in that a backslash *always* escapes the following character, even inside single quotes. Yes, really. https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libiberty/argv.c#l176
2020-06-05backend: There is no need for 'compiler-specific escaping' anymoreJon Turney2-24/+7
Now that all command-line escaping for ninja is dealt with in the ninja backend, escape_extra_args() shouldn't need to do anything. But tests of existing behaviour rely on all backslashes in defines being C escaped: This means that Windows-style paths including backslashes can be safely used, but makes it impossible to have a define containing a C escape.
2020-06-05ninja: Implement Windows-style command line quotingJon Turney1-4/+11
We avoided having to get this right previously, as we'd always use a response file if possible. But this is so insane, I can't imagine it's right. See also: subprocess.list2cmdline() internal method
2020-06-05ninja: Quoting in rspfile depends on the compiler, not the shellJon Turney1-17/+48
In certain exotic configurations, the style of quoting expected in the response file may not match that expected by the shell. e.g. under MSYS2, ninja invokes commands via CreateProcess (which results in cmd-style quoting processed by parse_cmdline or CommandLineToArgvW), but gcc will use sh-style quoting in any response file it reads. Future work: The rspfile quoting style should be a method of the compiler or linker object, rather than hardcoded in ninjabackend. (In fact, can_linker_accept_rsp() should be extended to do this, since if we can accept rsp, we should know the quoting style)
2020-06-05ninja: Push ninja and shell quoting down into NinjaRuleJon Turney1-50/+91
Rather than ad-hoc avoiding quoting where harmful, identify arguments which contain shell constructs and ninja variables, and don't apply quoting to those arguments. This is made more complex by some arguments which might contain ninja variables anywhere, not just at start, e.g. '/Fo$out' (This implementation would fall down if there was an argument which contained both a literal $ or shell metacharacter and a ninja variable, but there are no instances of such a thing and it seems unlikely) $DEPFILE needs special treatment. It's used in the special variable depfile, so it's value can't be shell quoted (as it used as a filename to read by ninja). So instead that variable needs to be shell quoted when it appears in a command. (Test common/129, which uses a depfile with a space in it's name, exercises that) If 'targetdep' is not in raw_names, test cases/rust all fail.
2020-06-05Extended test case for special characters to compiler argumentsJon Turney4-0/+77
2020-06-05ninja: Refcount rsp and non-rsp rule usage separatelyJon Turney1-10/+26
We need to count rsp and non-rsp references separately, which we need to do after build statement variables have been set so we can tell the difference, which introduces a bit of complexity.
2020-06-05ninja: Expose response file rules in compdbJon Turney1-2/+6
Possibly this should now be done by marking rules as being wanted in compdb, rather than listing the rule names...
2020-06-05ninja: Only use response files when neededJon Turney1-20/+72
Writing rsp files on Windows is moderately expensive, so only use them when the command line is long enough to need them. This also makes the output of 'ninja -v' useful more often (something like 'cl @exec@exe/main.c.obj.rsp' is not very useful if you don't have the response file to look at) For a rule where using a rspfile is possible, write rspfile and non-rspfile versions of that rule. Choose which one to use for each build statement, depending on the anticpated length of the command line.
2020-06-05ninja: Rename 'rule' -> 'rulename' in NinjaBuildElementJon Turney1-6/+6
Rename 'rule' to 'rulename' in the NinjaBuildElement class, we're going to want a reference to the NinjaRule object as well.
2020-06-05Add a test case for very long command linesJon Turney4-0/+38
This exercises commands of about 20K in length Also test short commandlines to make sure they don't regress.
2020-06-05cmake: Skip MSVC like compilers, since C++11 is not supportedDaniel Mensinger1-0/+5
2020-06-05cmake: added docsDaniel Mensinger2-3/+91
2020-06-05cmake: added test caseDaniel Mensinger9-0/+151
2020-06-05cmake: Add more advanced subproject configuration optionsDaniel Mensinger5-20/+223
This is done with the new cmake subprojects options object that is similar to the already exisiting configuration data object. It is consumed by the new `options` kwarg of the cmake.subproject function.
2020-06-05CompilerArgs: refactor __iadd__Marcel Hollerbach1-18/+64
the previous optimizations from 4524088d386d2e2315d8fef6ffedc11d8e9a394a were not relaly good, and not really scaleable, since only the lookup was improved. However, the really heavy calls to remove have not been improved. With this commit we are refactoring CompilerArgs into a data structure which does not use remove at all. This works that we are building a pre and post list, which gets flushed into __container at some point. However, we build pre and post by deduplicating forward. Later on, when we are flushing pre and post into __container, we are deduplicating backwards the list, so we are not changing behaviour here. This overall cuts off 10s of the efl configuration time. Further more this improves configure times on arm devices a lot more, since remove does seem to be a lot slower there. In general this results in the fact that __iadd__ is not within the top 5 of costly functions in generate_single_complie.