-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Improve build system #5543
base: master
Are you sure you want to change the base?
Improve build system #5543
Conversation
Moved checklist/tests to external (gitbook) pages.
|
1ecf690
to
fefb0a3
Compare
Since this is getting quite large now, can we try to have certain cleanups be their own pr? Like some of makefile changes which are unrelated to the network architecture restructure please? |
We discussed the usage of “find” in the past and I think it wasn’t very portable.. I think on windows find already exists and the makefile for me took that find over the posix find because of how the environment variables were set by default |
Yes I 100% agree, I'm now trying to reduce any excessive changes that are not directly related to the primary purpose. But I don't understand what you meant by "some of makefile changes", can you elaborate? This essentially requires complete rewrite of Makefile at least - and I can't find which are unrelated yet. |
Maybe moving out net.sh can be a separate PR? If that's the case I'll prepare one. |
The usage of
what are unnecessary entries?
what is the reason behind this?
could be standalone as well no? etc... |
gcc saves profiling data in profdir so *.gcda and *.gcno are unnecessary. bench.txt is not created anywhere. For args and lt files, I haven't observed such files are created (maybe I missed), I'll check them again.
format uses clang-format but it is often not included in clang package. I think it could help users to know which to install exactly, but no big reason. Speaking of help, current Makefile calls echo per line, which is very slow on Windows due to the overhead of CreateProcess (no fork). printf also works, there is no difference.
When running a rule of CXX_REQUIRED_RULES, it prints which type of compiler is used at the very beginning. When dependency is updated Make restarts itself and prints the same info twice. It is also UX stuff to help users understand why sometimes duplicate message is shown, especially after doing Edit: to sum up, some are not strictly tied as you said, such as profileclean or clang-format, but others are still related as I see. Nothing is final, I always appreciate any type of feedbacks. |
for devs having some unrelated files in the tree (test.cpp comes to mind), the usage of find might be problematic. I think it is good to list explicitly. Generally, I agree with Disservin here, splitting things out that could be merged before makes sense to keep the diff between this branch and master small, which will eventually be helpful I think, for you to maintain it until it is ready, and for later review. |
for reference we discussed that here, In my dev env on windows I have the msys stuff in my env and use the normal windows shell where the windows find has a higher presence, and I'm not sure fishtest requires msys as the shell. |
The echo change would be good to have I think, people have already complained about how slow make is on windows. |
Yes indeed, although I was struggling to find out which can be splitted, especially in Makefile. Soon I'll open some PRs where possible, and some lines Disservin pointed out. |
Why do you use i386 as the name for the 64 bit targets? Okay I just saw it's not limited to 64 bits, it's also 32 bit.. but I still I find that name weird Just x86 maybe? |
But I think I like where this is going. The function syntax for the arch implementations do tend to be a bit complex but i think that’s probably okay otherwise we would need to alias them with macros.. I also think that this makes it easier for us to have a binary with different simd code paths in future as well ? |
Followed gcc convention. Planned to change to x86 later. |
Not desirable changes I guess |
55d4b79
to
8beb019
Compare
Added PowerPC paths and build presets for now. In my opinion, I think it's better to remove all non-x86/arm presets since we do not have full target arch support (i.e. no AltiVec implementation for ppc family, only popcount and prefetch), and let users compile and build native. In this proposal, the generic implementation calls builtin popcount functions (prefetch can be done in the same way) and compilers would definitely handle it efficiently. |
d3f0db1
to
21e61e5
Compare
The Makefile is notoriously slow on windows, because of new processes being spawned I believe. This pr improves it a little bit for the help and config-sanity targets, with the latter also improving `make -j build` because it depends on that. On the same machine ubuntu (wsl) is more than 3 times faster, if there are other improvements we can make I'd be happy to hear about them. Ultimately #5543 also aims to improve this I believe, but it will take some additional time before that lands. ``` make config-sanity: patch: 6.199s master: 12.738s make help: patch: 3.1s master: 11.49s make -j build: patch: 36s master: 43.25s make -j build: master ubuntu: 10s ``` closes #5642 No functional change
<commit description not ready yet>
No functional change