Rangi42
85e044f5be
Use std::move when relevant in Token constructor
2026-04-28 13:32:45 +02:00
Rangi42
60e76b2da4
Avoid UB if new OOMs by removing std:nothrow
2026-04-28 13:28:32 +02:00
Rangi42
3c7488c131
Some refactoring, renaming, and debug assertions for clarity and safety
...
- Add more `assume()` checks in the lexer
- Replace double negative "`disable* = false`" with "`enable* = true`"
- Naming convention of "`std::deque<> *Stack`" when relying on
`.push_front()` and `.pop_back()`
2026-04-27 18:47:06 +02:00
Rangi42
9fd0c0297f
Fix invalid character in bracketed macro argument
...
The invalid character should not be consumed by `shiftChar()`.
2026-04-27 17:11:20 +02:00
Rangi42
c1c7e64249
Add two assume calls to verify lexer arguments
2026-04-27 15:35:10 +02:00
Rangi42
a18b2f1049
Consistently lex local labels after keywords, even when skipping/capturing
2026-04-27 15:28:30 +02:00
Rangi42
3f144b7713
Add test case for local labels after block-ending keywords
2026-04-27 15:04:12 +02:00
Rangi42
eeb3a73210
Small optimization to skipToLeadingKeyword
2026-04-27 14:26:47 +02:00
ISSOtm
37d39f91f6
Build using GCC 9 in CI
...
Checking that we don't regress this later.
Ubuntu doesn't package GCC 8, and we don't support it either,
so that is a good compromise for now.
2026-04-26 23:30:59 +02:00
ISSOtm
d5ce5329ea
Fix compilation with GCC 9
2026-04-26 23:30:59 +02:00
ISSOtm
6bcd79b997
Revert "Derive operator!= from operator== ( #1660 )"
...
This reverts commit 993879a2ed .
2026-04-26 23:30:59 +02:00
ISSOtm
decc5f7153
Let parallelism be determined automatically
...
Ninja is parallel by default;
however, it is not used on FreeBSD, so we still have to specify it there.
2026-04-20 15:32:54 +02:00
ISSOtm
a3c953ea46
Pass C++ compiler to CMake via env var
...
This is a little terser
2026-04-20 15:32:54 +02:00
ISSOtm
d43049c84d
Imply CMake source dir
...
Shortening our command lines slightly
2026-04-20 15:32:54 +02:00
ISSOtm
b6ff54acc3
Avoid libpng compilation on Windows spamming the Microsoft banner
2026-04-20 15:32:54 +02:00
ISSOtm
71fc449452
Use Ninja on Unix platforms
...
It has nicer UX, only showing full command lines when they fail.
It could also be slightly faster, though I've seen no measurable improvement.
2026-04-20 15:32:54 +02:00
ISSOtm
59dd1fbbf8
Correct naming of MSBuild CMake presets
...
You can build with MSVC without MSBuild
2026-04-20 15:32:54 +02:00
ISSOtm
2502d130eb
Use Ninja on Windows
...
MSBuild is slow, and its output is hard to parse visually
(it's all interwoven, like Make without `--output-sync`).
Since we use CMake anyway, we don't care about the build system.
2026-04-20 15:32:54 +02:00
ISSOtm
a78a268cb4
Pass convenience options to Make invoked via CMake
...
Can't pass them to plain Make invocations,
because we try to be compatible with macOS' old Make.
2026-04-20 15:32:54 +02:00
Rangi42
0553491107
Replace a FIXME comment with an explanation of why we can't/won't "fix" it
2026-04-20 14:51:38 +02:00
Eldred Habert
6edac50cc4
Target an even older version of Mac OS X
...
We can, so let's not ask if we should!
More realistically, we can right now so it's nice to mark that we do, but this is subject to be re-evaluated if any later changes conflicts with this.
Note also that this only affects the binaries we distribute with our releases!
It may very well be possible to compile RGBDS on even older versions of Mac OS X if you have the appropriate compiler setup;
we're just not testing it nor offering such binaries ourselves, but third-party packagers are welcome to do so.
(Looking at you, TigerBrew! ;)
2026-04-20 14:33:59 +02:00
Rangi
77dceaf43a
Update libpng to 1.6.57 ( #1958 )
2026-04-20 13:55:27 +02:00
Rangi
cfec017fed
Consolidate, refactor, and bugfix the lexer's handling of captures and skips ( #1957 )
...
- Do not error about local labels following keywords in skips or captures (fixes #1955 )
- Do not incompletely attempt to handle line continuations in skips (fixes #1956 )
- Rename `skipToLeadingIdentifier` to `skipToLeadingKeyword`, refactor to merge
`skipToEOL` into it, and use it for both skips and captures
2026-04-20 13:04:20 +02:00
Rangi42
12186fdccc
Keep more non-declaration initialization within the for loop clause
2026-04-19 22:01:56 +02:00
Rangi
71dfab3365
Use charmapEntry to simplify charmap_HasChar
2026-04-17 15:39:30 -04:00
Rangi
20b11039c9
Keep trie edges sorted for O(log N) lookup
2026-04-17 15:39:30 -04:00
Rangi
eb9e9c0f33
Replace charmaps' fixed-size 256-value array with a vector of pairs
...
This should save memory at the cost of O(n) instead of O(1) access,
which should be okay because the `next` vector is generally small.
2026-04-17 15:39:30 -04:00
Rangi
ac2a022124
Set the Cygwin shell once as a default for its job
2026-04-15 23:54:12 -04:00
Rangi
1249c4ef58
Revert "Set up Cygwin before cloning our repo"
...
This reverts commit aeedfb35a6 .
2026-04-15 21:53:29 -04:00
ISSOtm
aeedfb35a6
Set up Cygwin before cloning our repo
...
Otherwise different Gits set up and tear down the repo,
leading to issues.
2026-04-16 03:16:56 +02:00
ISSOtm
63609871f4
Cache downloaded dependencies for MinGW build also
...
Forgot about you!
2026-04-16 02:56:14 +02:00
ISSOtm
393eaa9dc1
Fix a Fix typo ;)
2026-04-16 02:54:40 +02:00
Rangi
b3c3981a90
Use a separate CI step to install clang-format before running it
...
Also use short `-Yqu` flags like our other invocations
2026-04-15 20:12:48 -04:00
ISSOtm
185a5c5369
Add necessary flags to apt install for checkformat
2026-04-16 01:58:42 +02:00
ISSOtm
4ea15ed85a
Touch up checkformat.bash
...
The logic can be slightly simplified,
and the script doesn't require Bash after all.
2026-04-16 01:05:03 +02:00
ISSOtm
b218fd65a0
Install clang-format on ubuntu-slim runner
...
Unlike the “fat” runners, that's not installed by default.
Why that causes `find` to nonetheless exit normally, I have no idea.
2026-04-16 01:02:30 +02:00
ISSOtm
81edc27b6e
Fix two warnings on MinGW
2026-04-16 00:57:33 +02:00
ISSOtm
dc52487d31
Make -Wformat non-fatal on MinGW
...
See the comment for a rationale.
2026-04-16 00:57:33 +02:00
ISSOtm
6b994b1737
Fix some warnings raised by MSVC
2026-04-16 00:57:33 +02:00
ISSOtm
0849eb801e
Decouple -Werror from MORE_WARNINGS
2026-04-16 00:57:33 +02:00
ISSOtm
e6916360f4
Set some flags only for our own code
2026-04-16 00:57:33 +02:00
ISSOtm
a802bcb320
Switch MinGW building to CMake
...
Automatically grabs and compiles libpng, and avoids having hacky lines in our Makefile
(the compiler specification *should* be orthogonal to the build target!)
Also move the MinGW package install to the `install_deps.sh` script,
to move logic off of the YAML.
2026-04-16 00:57:33 +02:00
ISSOtm
846aa975f1
Stop trying to install md5sha1sum
...
macOS already provides it and Homebrew doesn't override it,
so that's a no-op anyway.
2026-04-16 00:25:58 +02:00
ISSOtm
b65649ca73
Tidy up system info
2026-04-16 00:25:58 +02:00
ISSOtm
62ddabb570
Avoid hardcoding Brew's prefix
2026-04-16 00:25:58 +02:00
ISSOtm
d48d6fe5d9
Bump our macOS CI runners
2026-04-16 00:25:58 +02:00
Eldred Habert
ac0f93ffda
Delete GCC static analyzer workflow ( #1950 )
...
As for GCC 15, it is stated not to be suitable for C++ code,
and we have gotten annoyingly many false positives out of it,
so let's just disable it (as per
https://github.com/gbdev/rgbds/pull/1950#issuecomment-4243959126 ).
2026-04-14 22:04:20 +02:00
ISSOtm
a1712cb6d9
Run patch format check on ubuntu-slim
2026-04-14 22:03:29 +02:00
Eldred Habert
2968bee86f
Run macos-static tests using CTest ( #1947 )
...
We can, so why not? It has benefits.
2026-04-14 01:25:47 +02:00
ISSOtm
dec7a74166
Fix macOS static build
...
- Turns out the variable wasn't being set, and thus the flags weren't being passed
- Passing the flags via those variables is basically a bad idea, and it
turns out to break libpng's config script
- The flags need to be passed during link as well, otherwise the binary
isn't linked as a fat one
2026-04-14 00:01:14 +02:00