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
luajit: Expose build options, enable JIT debug module #79194
Conversation
sorry for delay, I don't think we have to map every option in nix. Like not sure |
There's no real reason not to expose all the options, though. They're not likely to change. As for
Come to think of it, pretty sure the valgrind option won't work as-is, IIRC it needs the valgrind header files to build. I'll have a poke at that later, but it should definitely be separate: the GDB JIT option causes a performance impact (even without GDB hooked up), and is mainly useful for debugging LuaJIT itself (whereas the valgrind option is potentially useful for debugging leaks in Lua scripts in general, at least insofar as ones that use C libraries). |
''; | ||
|
||
configurePhase = false; | ||
|
||
buildFlags = [ | ||
"amalg" # Build highly optimized version |
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.
is there a downside to this ?
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.
To my knowledge, the only downside is that the build process with amalg
enabled consumes more memory. amalg
is the recommended target for binary distribution.
It makes the nix derivation harder to read for a usecase that may benefit 1% of the use cases. But you convinced me anyway and as you've been pretty helpful in the past, I know you'll make good use of these options. Let's fix the valgrind option and merge. |
e850a9b
to
2eeb103
Compare
OK, fixed up the valgrind option. |
Motivation for this change
This change exposes various build options from luajit's makefile, many of which are useful when debugging Lua scripts. I've also enabled installing the JIT debug module files by default (used for
-jbc
,-jv
, and-jdump
CLI options).Things done
sandbox
innix.conf
on non-NixOS linux)Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)Ensured that relevant documentation is up to date@teto