-
Notifications
You must be signed in to change notification settings - Fork 104
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
meson.build: enable LTO and -O3 for C schedulers #1155
base: main
Are you sure you want to change the base?
Conversation
Looks like linker fails when we use LTO.
|
with static libbpf/bpftool. |
Yeah I am not sure what's going on, probably related to the missing library index (#1155 (comment)). Perhaps a more experienced user of Meson could help? (I don't know about meson that much) We need to run ranlib manually on |
Is I found a similar issue in Meson: mesonbuild/meson#8371 but nothing too useful where to try except changing a linker from |
In my case, I am fetching a specific commit of Line 142 in 382c879
And using Clang as the compiler for all targets. Could be related to mesonbuild/meson#4138 but that was apparently fixed. I tried to run ranlib manually but it didn't seem to work. Could you check on your end perhaps? |
Sure, why not. Could you please send me your exact build commands to reproduce the issue? I'll try to reproduce it in my Fedora-based env and report back the results. Thanks! |
I am using Nix (it automatically runs the build commands). I would say my configure flags are:
And Nix build script is mostly following: https://github.com/sched-ext/scx?tab=readme-ov-file#static-linking-against-libbpf-preferred I am fetching libbpf and bpftool repos, which are built by meson. Log is here: https://pastebin.com/SCDe5e81 |
I quickly tried to reproduce your error but got other linking errors about undefined references: https://gist.github.com/zamazan4ik/3b013a6dc51dea1ede8a43e87fd440f0 |
Humm, errors related to cargo, which couldn't be caught from my side as I had disabled building rust schedulers with |
With |
Signed-off-by: John Titor <[email protected]>
Follow-up of #1011.
We can also set
b_lto_mode
tothin
. Clang is especially good with thin-lto I hear. (https://mesonbuild.com/Builtin-options.html#base-options)CC #1010
CC @ptr1337 @htejun