36 Commits

Author SHA1 Message Date
Stone Tickle
640b16bdd7
support custom_target depfiles 2023-01-29 11:56:55 -05:00
Stone Tickle
4a5aa18e45
add more flexibility to ninja command detection
- use NINJA from environment if available
- if samurai=enabled but we already called samu_main once, use `muon
  samu` as NINJA.
2022-11-05 13:13:48 -04:00
Stone Tickle
4298aa2011
make muon reuse compliant
https://reuse.software
2022-10-25 10:54:31 -04:00
Stone Tickle
d40dfb3c66
change signature of relativize_paths
This function can actually never fail (except due to
unrecoverable_error, which is well, unrecoverable :P)
2022-09-26 10:02:10 -04:00
Stone Tickle
094d40d945
optimize build.ninja rules
- reduce duplication of ARGS by generating a rule per target
2022-09-24 16:57:55 -04:00
Stone Tickle
b59e78bee6
make more path_ functions use sbufs 2022-09-05 06:50:39 -05:00
Stone Tickle
0d041a41c5
allow muon info options to be run from biuld dir
also add -m flag
2022-08-23 15:12:18 -05:00
Stone Tickle
a8536f85b3
add compiler check cache 2022-08-18 16:38:49 -05:00
Stone Tickle
86768ce13c
use includes & args from deps in compiler check
In addition to linker arguments, which are already used.
2022-08-16 14:51:59 -05:00
Stone Tickle
25f356b9e9
fix empty element in argv/env attempt #2
I tried to fix this by ending the argstr in a triple NUL, but that has
an edge case when the last element of argv is empty.  This time fix it
more robustly by tracking argc separately.
2022-08-04 17:48:46 -05:00
Stone Tickle
080997ce78
fix compile_commands.json generation
- use all generated compiler rules rather than a single hardcoded rule
- fallback to external ninja/samu if internal not available
2022-07-04 15:02:05 -05:00
Stone Tickle
88c39ad6e2
fix include_directories kw for compiler checks 2022-06-13 15:45:15 -05:00
Stone Tickle
cb1343486e
dependency refactor
Calculate dependency information ahead of time, rather than on-demand.
Also unify how dependency information is stored between build targets
and dependencies by using a common sub-struct "build_dep".
2022-06-12 15:18:55 -05:00
Stone Tickle
30c4383c96
pull out relativize_paths function 2022-06-12 15:17:53 -05:00
Stone Tickle
347bf6cea7
implement meson.add_postconf_script() 2022-06-04 14:55:11 -05:00
Stone Tickle
b5dbd2452b
add info summary subcommand 2022-06-01 14:22:20 -05:00
Stone Tickle
26cd4d6c6e
add noop default tgt if no tgts are default
Before, if no targets were built by default, no default statements were
written, and eveything got built by default!
2022-05-24 16:15:54 -05:00
Stone Tickle
9f63223542
implement override_options kw 2022-05-16 12:06:05 -05:00
Stone Tickle
8520517e38
setup linker opts for shared libraries 2022-04-25 21:18:25 -05:00
Stone Tickle
5109abfc7b
restrict default compiler check args
The meson docs say:

These compiler checks do not use compiler arguments added with
add_*_arguments(), via -Dlang_args on the command-line, or through
CFLAGS/LDFLAGS, etc in the environment.

However, upon further investigation, it apears that arguments set via
-Dlang_args / CFLAGS/LDFLAGS are actually used.

660bfa6e7c/mesonbuild/compilers/compilers.py (L1196)
2022-04-25 11:00:46 -05:00
Stone Tickle
d939fc8c35
add base compiler arguments to compiler checks 2022-04-24 09:54:11 -05:00
Stone Tickle
f6f2b8c710
pass common target arguments as a struct 2022-03-10 10:48:34 -06:00
Stone Tickle
14ecdcdcce
support custom_target build_always_stale 2022-02-17 22:20:36 -06:00
Stone Tickle
860cdb26a7
finish making all get_obj calls typed 2022-02-14 07:04:46 -06:00
dffdff2423
4662b3157a
Add support for alias targets
* Added a object type 'obj_alias_type'
* Implemented the meson function alias_target()
* Added support for generating alias_targets
* Copied and modified the relevant test from meson

Currently because run targets are not implemented there are TODOs where
they should be handled.
2022-01-25 20:40:30 -06:00
Stone Tickle
5ef6181117
improve find_library and pkgconfig lib resolution 2021-12-14 15:27:29 -06:00
Stone Tickle
7fbc67dabb
support export_dynamic kwarg 2021-12-12 11:44:03 -06:00
Stone Tickle
2f93cb575d
implement dependency compile_args 2021-12-03 07:09:03 -06:00
Stone Tickle
0dd0a874b1
add include_directories kw to some compiler funcs 2021-11-19 20:58:00 -06:00
Stone Tickle
5fa91c4366
support add_{project,global}_link_args 2021-11-18 07:37:15 -06:00
Stone Tickle
b4ea77b9bc
add soname and rpath linker arguments 2021-11-10 19:02:42 -06:00
Stone Tickle
f650875b7d
write build options for regen as a serial dump 2021-11-03 07:35:58 -05:00
Stone Tickle
3439bb44f0
implement compiler_has_function
This also finishes pulling out all the necessary compiler argument logic from
the backend.
2021-10-05 18:10:05 -05:00
Stone Tickle
d5c61aa6eb
major ninja backend refactor
This is a long overdue organization of the functionality that has
collected in the ninja backend.  Most importantly, the process for
getting dependency build arguments has been separated for use in e.g.
compiler has_ functions.
2021-10-04 13:58:03 -05:00
Stone Tickle
7fc00dbe28
begin cleaning up ninja output generator 2021-09-21 11:28:14 -05:00
Stone Tickle
eed6d7ba14
rename output/output.c to backend/ninja.c 2021-09-21 07:01:23 -05:00