{"action":"created","issue":{"url":"https://api.github.com/repos/mesonbuild/meson/issues/3635","repository_url":"https://api.github.com/repos/mesonbuild/meson","labels_url":"https://api.github.com/repos/mesonbuild/meson/issues/3635/labels{/name}","comments_url":"https://api.github.com/repos/mesonbuild/meson/issues/3635/comments","events_url":"https://api.github.com/repos/mesonbuild/meson/issues/3635/events","html_url":"https://github.com/mesonbuild/meson/issues/3635","id":326721158,"node_id":"MDU6SXNzdWUzMjY3MjExNTg=","number":3635,"title":"Speed-up compiler checks by parallelizing where possible","user":{"login":"nirbheek","id":75801,"node_id":"MDQ6VXNlcjc1ODAx","avatar_url":"https://avatars0.githubusercontent.com/u/75801?v=4","gravatar_id":"","url":"https://api.github.com/users/nirbheek","html_url":"https://github.com/nirbheek","followers_url":"https://api.github.com/users/nirbheek/followers","following_url":"https://api.github.com/users/nirbheek/following{/other_user}","gists_url":"https://api.github.com/users/nirbheek/gists{/gist_id}","starred_url":"https://api.github.com/users/nirbheek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nirbheek/subscriptions","organizations_url":"https://api.github.com/users/nirbheek/orgs","repos_url":"https://api.github.com/users/nirbheek/repos","events_url":"https://api.github.com/users/nirbheek/events{/privacy}","received_events_url":"https://api.github.com/users/nirbheek/received_events","type":"User","site_admin":false},"labels":[{"id":251967616,"node_id":"MDU6TGFiZWwyNTE5Njc2MTY=","url":"https://api.github.com/repos/mesonbuild/meson/labels/compilers","name":"compilers","color":"c7def8","default":false},{"id":99546087,"node_id":"MDU6TGFiZWw5OTU0NjA4Nw==","url":"https://api.github.com/repos/mesonbuild/meson/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":448958539,"node_id":"MDU6TGFiZWw0NDg5NTg1Mzk=","url":"https://api.github.com/repos/mesonbuild/meson/labels/help%20wanted","name":"help wanted","color":"75B427","default":true},{"id":565616021,"node_id":"MDU6TGFiZWw1NjU2MTYwMjE=","url":"https://api.github.com/repos/mesonbuild/meson/labels/perf","name":"perf","color":"1d86db","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":25,"created_at":"2018-05-26T08:27:55Z","updated_at":"2018-11-11T00:06:13Z","closed_at":null,"author_association":"MEMBER","body":"Some compiler checks can be parallelized, for example:\r\n\r\n* `get_supported_arguments()`\r\n* `get_supported_link_arguments()`\r\n* `cross_compute_int()`: there are two branches at each guess, so we can run both at the same time, which will improve the worst-case time.\r\n\r\nWe should also add map-like API for batch-processing several `has_function()` and `has_header()` checks at once and sets values in a `configuration_data()` object, usually of the form:\r\n\r\n```meson\r\ncdata = configuration_data()\r\nif cc.has_function(func_name, prefix: includes)\r\n   cdata.set(func_name.to_upper().underscorify())\r\nendif\r\n```\r\n\r\nUsually this requires lambda support (or similar) to be able to do this, but since the function in this case is almost always the same, we can hard-code it in Meson. It would be a good default in case we want to extend it later anyway."},"comment":{"url":"https://api.github.com/repos/mesonbuild/meson/issues/comments/437631945","html_url":"https://github.com/mesonbuild/meson/issues/3635#issuecomment-437631945","issue_url":"https://api.github.com/repos/mesonbuild/meson/issues/3635","id":437631945,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzYzMTk0NQ==","user":{"login":"jpakkane","id":4079821,"node_id":"MDQ6VXNlcjQwNzk4MjE=","avatar_url":"https://avatars3.githubusercontent.com/u/4079821?v=4","gravatar_id":"","url":"https://api.github.com/users/jpakkane","html_url":"https://github.com/jpakkane","followers_url":"https://api.github.com/users/jpakkane/followers","following_url":"https://api.github.com/users/jpakkane/following{/other_user}","gists_url":"https://api.github.com/users/jpakkane/gists{/gist_id}","starred_url":"https://api.github.com/users/jpakkane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpakkane/subscriptions","organizations_url":"https://api.github.com/users/jpakkane/orgs","repos_url":"https://api.github.com/users/jpakkane/repos","events_url":"https://api.github.com/users/jpakkane/events{/privacy}","received_events_url":"https://api.github.com/users/jpakkane/received_events","type":"User","site_admin":false},"created_at":"2018-11-11T00:06:13Z","updated_at":"2018-11-11T00:06:13Z","author_association":"MEMBER","body":"Whatever approach ends up taken, changing the Meson language to expose asyncness or something similar to the end user will not be accepted. The syntax must be as declarative as possible.\r\n\r\nAs an alternative approach we could have something like a batch lookup function:\r\n\r\n```meson\r\nresults = cc.has_headers('foo.h', 'bar.h', 'baz.h', ...)\r\nif results['foo.h']:\r\n   do_something()\r\nendif\r\n# etc\r\n```\r\n"}}
{"actor":{"display_login":"jpakkane"}}