2465 Commits

Author SHA1 Message Date
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
b7e964d4dd
treat 0 handles as invalid
This allows a run_cmd_ctx to be destroyed safely even if run_cmd is
never called.
2024-02-09 20:02:52 -05:00
Stone Tickle
3ffa66494a
re-add POSIX_C_SOURCE undef on apple 2024-02-09 20:02:49 -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
b8b5024409
share shebang parsing code between run_cmd impls 2024-02-08 12:26:08 -05:00
Stone Tickle
abf28c65ce
fix windows argv0 determination 2024-02-08 11:58:03 -05:00
Stone Tickle
d5f134930a
fix assert on failed run_cmd 2024-02-08 11:58:03 -05:00
Stone Tickle
da7271e525
strip trailing newlines from win32 err message 2024-02-08 11:58:02 -05:00
Stone Tickle
f453d1b35b
add missing copyright 2024-02-02 15:09:57 -05:00
Stone Tickle
7570971b6c
remove nproc usage in ci
muon has code now to determine cpu count
2024-02-02 15:07:40 -05:00
Stone Tickle
edeaaadcda
remove comment 2024-02-02 15:07:34 -05:00
Stone Tickle
80ccbf4bb0 add prototype bootstrap.bat 2024-02-02 15:04:45 -05:00
Stone Tickle
8f8a9a36f3 handle more cl arguments 2024-02-02 15:01:29 -05:00
Vincent Torri
b633b8618e fix compiler_cl_args_set_std() 2024-02-02 09:49:47 -05:00
Vincent Torri
af132cb0b6 format meson.build 2024-02-02 09:49:47 -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
eaba9ab934 improve run_cmd output handling 2024-02-01 23:53:08 -05:00
Stone Tickle
8afd844def
add missing license 2024-02-01 14:25:55 -05:00
Stone Tickle
db41ddfb26
add fs_remove and replace remove() calls with it 2024-02-01 12:47:19 -05:00
Stone Tickle
659714f9d4
support meson.options 2024-02-01 11:23:02 -05:00
Stone Tickle
6b40ca85e5
update readme 2024-02-01 10:52:34 -05:00
Stone Tickle
ec80acae56
fix some asan/ubsan complaints 2024-02-01 10:32:06 -05:00
Stone Tickle
68903b225f
fix --opt=val handling in meson cli frontend 2024-02-01 10:30:50 -05:00
Stone Tickle
0a2253f942
use muon samu in debian build 2024-01-31 09:06:43 -05:00
Stone Tickle
753a854ec7
fix alpine build 2024-01-31 07:22:13 -05:00
rofl0r
1790160832
fix type punning in rpath_fixer.c
closes #13
2024-01-31 07:09:22 -05:00
Stone Tickle
321468f5a1
fix warnings 2024-01-31 07:03:25 -05:00
Stone Tickle
fc54704f89
use sbufs in posix run cmd 2024-01-31 07:03:25 -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
51a19cc7df
fix implementation of windows fs_mtime 2024-01-31 07:03:24 -05:00
Stone Tickle
c5168e9b4a
use sbuf_into_str with run_cmd output 2024-01-31 07:03:24 -05:00
Stone Tickle
b3accc4a5f
sbuf: allow into_str with manual alloc'd sbuf 2024-01-31 07:03:24 -05:00
Stone Tickle
f42479395b
avoid non-standard %z specifier 2024-01-31 07:03:24 -05:00
Stone Tickle
a335a9219a
remove setvbuf call 2024-01-31 07:03:24 -05:00
Stone Tickle
bdf96a1c3c
refactor samu log parser to not use f* calls 2024-01-31 07:03:24 -05:00
Stone Tickle
517d414511
refactor samu deps parser to not use f* calls 2024-01-31 07:03:23 -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
967e83ec05
set ninja builddir as muon private dir
This causes .ninja* files to be put into .muon which slightly declutters
the build dir.  Not that anyone cares :)
2024-01-31 07:03:23 -05:00
Stone Tickle
6a4f7a3886
change muon private dir to .muon 2024-01-31 07:03:23 -05:00
Stone Tickle
958228c0ea
fs_read: report EOF error correctly 2024-01-31 07:03:23 -05:00
Stone Tickle
2f6ecde98c
samu deps.c: avoid rename() call 2024-01-31 07:03:23 -05:00
Stone Tickle
244a3b74b6
samu_makedirs: don't fail if dir already exists 2024-01-31 07:03:22 -05:00
Stone Tickle
b1fdeb8f90
remove bogus assert 2024-01-31 07:03:22 -05:00
Stone Tickle
8f60fa14ee
calculate ncpus properly on macos 2024-01-31 07:03:22 -05:00
Stone Tickle
1c24c86462
fix bad job calculation when n = -1; 2024-01-31 07:03:22 -05:00
Stone Tickle
d9e474c8d9
add verbose test output to macos build 2024-01-31 07:03:22 -05:00
Stone Tickle
01e30b6896
implement job count calculation for windows 2024-01-31 07:03:22 -05:00
Stone Tickle
0ae3a0596f
fix getloadavg detection on macos 2024-01-31 07:03:21 -05:00
Stone Tickle
6ce1440ec1
make compiler checks log the source they are using 2024-01-31 07:03:21 -05:00