Stone Tickle
6ed33c72a2
better linker detection and usage
...
Adds support for using msvc, as well as a proper detection step for
linkers. Static and shared linkers are both tied to the compiler object
for now.
2024-02-09 20:13:44 -05:00
Stone Tickle
6742311017
remove all usage of getloadavg
...
implementing proper feature detection for this is not worth it. People
can use ninja/samu if they really need this feature.
2024-02-08 12:32:31 -05:00
Stone Tickle
abf28c65ce
fix windows argv0 determination
2024-02-08 11:58:03 -05:00
Stone Tickle
8f8a9a36f3
handle more cl arguments
2024-02-02 15:01:29 -05:00
Vincent Torri
9d16636042
Windows: add str_endswithi() for compiler_cl_args_output()
...
also added references in meson to check if it is
compatible with meson
2024-02-02 09:49:47 -05:00
Stone Tickle
db41ddfb26
add fs_remove and replace remove() calls with it
2024-02-01 12:47:19 -05:00
Stone Tickle
3f20a98619
refactor windows run_cmd to allow async commands
...
also add run_cmd_unsplit for samu on windows
2024-01-31 07:03:24 -05:00
Stone Tickle
a7c70b0aa1
change samu mtime special values
...
1 and 2 seem more unlikely to me, and they are much more easily
identified in a debugger
2024-01-31 07:03:23 -05:00
Stone Tickle
1c1ab49460
add win32_fatal
2024-01-31 07:03:23 -05:00
Stone Tickle
32ee8b8dab
add os_ functions for querying job spawning info
2024-01-31 07:03:20 -05:00
Stone Tickle
19d813fd03
move os_ functions that only path should call
2024-01-31 07:03:19 -05:00
Stone Tickle
0930ddd18e
change scan.c to use a buffer directly
2024-01-31 07:03:19 -05:00
Stone Tickle
b43e50a2ac
move mtime calculation to platform/
2024-01-31 07:03:18 -05:00
Stone Tickle
0de4b672e9
remove some more cleanup functions that do nothing
2024-01-31 07:03:18 -05:00
Stone Tickle
59c9124ca2
factor samu output to allow outputting to file
...
This allows muon to run samu -t compdb internally and redirect the
output to compile_commands.json without the ugly fs_redirect functions.
2024-01-31 07:03:17 -05:00
Stone Tickle
f6dd918a7f
integrate samurai
...
Copy samurai's sources into muon's tree and refactor slightly
To prevent name collisions during bootstrap:
- prefix all identifiers with samu_ or SAMU_
To make reentrant:
- move all global state into a struct that gets passed around (samu_ctx)
- convert all memory allocations to use an arena
2024-01-31 07:03:17 -05:00
Stone Tickle
bc624d0da6
rename timer_end to timer_read
2024-01-31 07:03:17 -05:00
Stone Tickle
70fcd6a526
add meson.project() for modules to get proj info
2024-01-08 11:20:58 -05:00
Stone Tickle
6dfbd61416
support setting destdir from command line
2024-01-07 21:59:02 -05:00
Stone Tickle
0f22851a0a
ignore leading/trailing whitespace in str.to_int()
...
This is what meson does and seems reasonable.
2024-01-07 13:05:05 -05:00
Vincent Torri
0660a6e941
add missing windows defines
2024-01-05 20:32:35 -05:00
Stone Tickle
802d17bd06
add -Wno-redirect-script-error to analyzer
...
This helps when debugging script modules
2024-01-02 12:05:42 -05:00
Stone Tickle
95e20fdb8b
error on multiple project() calls
2024-01-02 12:03:02 -05:00
Stone Tickle
536c086222
implement meson.build_command()
2024-01-02 08:02:38 -05:00
Stone Tickle
bb0927c7e7
remove unused function
2024-01-02 08:02:26 -05:00
Stone Tickle
52650ede99
allow tests to be selected on command line
...
plus other improvements
2024-01-01 21:58:54 -05:00
Stone Tickle
446122b154
add str_eql_glob
2024-01-01 21:58:12 -05:00
Stone Tickle
23e99c656d
redirect all script function errs to the callsite
...
This is more consistent with how builtin functions report errors
2023-12-31 20:02:53 -05:00
Stone Tickle
0b860734a3
make analyzer a little smarter about returns
...
The return will actually return if the codepath it was reached by is
entirely pure. This will likely need tweaking but it works well for
simple cases.
2023-12-31 20:01:13 -05:00
Stone Tickle
769f0d508a
improve function typechecking function analysis
...
Functions are now analyzed when they are defined so they aren't
erroneously marked as dead code. This led to some weird typechecking
issues that ended up pushing me to clean up some of the typechecking
code.
2023-12-30 14:20:16 -05:00
Stone Tickle
c9896c1751
rename ARG_TYPE_GLOB/ARG_TYPE_ARRAY_OF
...
the new names are TYPE_TAG_GLOB TYPE_TAG_LISTIFY which better reflect
that they are type "tags" (i.e. not real types) and line up with the
typechecking syntax naming
2023-12-16 20:06:52 -05:00
Stone Tickle
55816e413d
replace old nested typechecking with new system
...
I didn't update message() though because technically the type signature
is recursive and we don't have a way to represent that.
2023-12-16 20:03:12 -05:00
Stone Tickle
97ba99ade9
update type system to support nested types
...
These new types are supported in the typechecker as well as the script
module syntax.
2023-12-16 12:07:40 -05:00
Vincent Torri
e1bb250f8c
add getopt for cl.exe
2023-12-12 21:12:43 -05:00
Stone Tickle
de372bafd5
support type annotations in script
2023-12-12 16:03:42 -05:00
Stone Tickle
3ddf339d4a
remove usage of strncasecmp
2023-12-11 20:58:07 -05:00
Stone Tickle
c9a556b197
fix name and type_name for not found dependencies
2023-12-08 10:38:52 -05:00
Stone Tickle
283b33c7d6
revert unistd.h removal from opts.h
2023-12-08 10:12:39 -05:00
Stone Tickle
3baacb88e0
remove unused unistd includes
2023-12-08 10:04:00 -05:00
Vincent Torri
a0c4b44300
implement chdir() and getcwd() on Windows and Unix
...
Needed for compilation with cl.exe
2023-12-08 09:45:00 -05:00
Stone Tickle
b9b305dd17
remove local keyword
2023-12-06 21:39:23 -05:00
Stone Tickle
d9388848eb
add analyze -d
2023-12-06 16:37:15 -05:00
Stone Tickle
8973302295
add analyze -t
2023-12-06 16:36:26 -05:00
Stone Tickle
ed4e516dc7
reimplement dict_del
2023-12-06 16:31:51 -05:00
Stone Tickle
0010f5f451
wip optimize dicts with hash map backing
2023-12-06 09:10:00 -05:00
Stone Tickle
883594c470
reuse identical strings
2023-12-04 21:17:26 -05:00
Stone Tickle
ea05cc0cbb
add some tracy annotations
2023-12-01 11:16:09 -05:00
Stone Tickle
acd88ddf23
add dict delete
2023-11-30 13:12:20 -05:00
Stone Tickle
d7dff4b44c
obj array more functions and fix when deleting end
2023-11-29 22:26:21 -05:00
Stone Tickle
b6545fc75e
make logging objects easier
2023-11-29 22:25:33 -05:00