-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ninja build #231
Ninja build #231
Conversation
Nice work, finally. |
Few ideas for the future (might send PRs implementing those)
With all of that is done, Any other interactions with the build system would be accessible through the
Probably too overkill and idealistic for a decomp project but it could help build a standard template |
MWCC .d files don't work on linux, but dkp's cpp is used instead and should be able to do everything that they do already afaik |
diff_settings.py
Outdated
@@ -17,7 +17,7 @@ def apply(config: dict, args): | |||
config["myimg"] = "artifacts/target/pal/main.dol" | |||
config["baseimg"] = "artifacts/orig/pal/main.dol" | |||
config["symbols_yml"] = "pack/symbols.yml" | |||
config["make_command"] = [executable, "build.py", "--diff_py"] | |||
config["make_command"] = "ninja" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be ["ninja"]
btw
All the suggestions are reasonable. One thing to note is that the main remaining performance gain is by by quite a margin assembly regeneration, but we need to figure out and implement our own depfile. After that, ninja integration is pretty straightforward. |
Does it need anything more complicated than just depending on the slices and symbols files? |
The best thing would be to actually read them and generate only what's neccessary, it would save a lot of time. |
Btw, give me an hour or two before merging to add some of what terorie mentioned |
I think that's something you'd have to do at the tool level rather than the ninja level though? |
Yes, similar to how we use dkp gcc as a script to generate a depfile for C |
Note that the tools only generate the depfile, not the asm itself |
If we want to do it in Ninja, it requires one level of indirection. For slices, this is easy – if the range changes, the resulting asm file name will also change and be rebuilt. Reacting to symbol changes is a bit more difficult. symbols.txt is spans lots of asm files. So if the asm gen rule directly depends on it directly, it would regen everything if the modification date changes (e.g. a single line is added). Unlike Make, Ninja doesn't natively support recursion, so it would be hacky or require a wrapper script anyways. |
Probably easier to do at the tool level and reconfigure ninja yeah |
@SeekyCt Aight, PR is ready, I need some help with the windows CI though... |
It doesn't seem to like |
Perhaps there is some way to glob on windows? Maybe with a userspace utility? |
Otherwise this can be done in python https://stackoverflow.com/questions/2186525/how-to-use-glob-to-find-files-recursively |
Is there anything wrong with just doing source and source/platform like the CW args do? |
You're right |
|
LGTM. Nice work! |
* Ninja build for C/ASM sources * ninja on linux * Remove old build flags * Update CI and diff settings * Change links to dropbox * Add link rules for ninja * Add rules for packing and verifying, update README and CI * allow chain * gcc depfile include dirs * nostdinc * Different tools installation Co-authored-by: Theodoros Tyrovouzis <teotyrov@gmail.com>
Use ninja for C and ASM compilation