-
Notifications
You must be signed in to change notification settings - Fork 105
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
feat(packages): Add debug output to nix builds #356
base: master
Are you sure you want to change the base?
Conversation
Test with |
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'm loving the ability to debug! I had a few questions and comments.
] ++ (if debug then [ "-DCMAKE_BUILD_TYPE=Debug" ] else [ "-DCMAKE_BUILD_TYPE=Release" ]); | ||
|
||
|
||
CXXFLAGS = optionals (debug) [ "-ggdb -O1" ]; |
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.
Shouldn't these be compile_options
that are set in CMake?
@@ -12,6 +12,8 @@ | |||
barretenbergOverlay = final: prev: { | |||
barretenberg = prev.callPackage ./barretenberg.nix { }; | |||
barretenberg-wasm = prev.callPackage ./barretenberg-wasm.nix { }; | |||
barretenberg-wasm-debug = prev.callPackage ./barretenberg-wasm.nix { debug = true; }; |
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'd rather us use .override { debug = true }
in packages that want to consume barretenberg that we want to debug. Is there a reason you wanted to add another package?
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.
This way we can build it remotely and grab just debug artifact easily. Override patter would mean that you need to be changing configs in a workspace?
This is awesome! Looks good to my eyes, and in the "needed yesterday" category. Only real feedback for such a hotly requested feature, I would have made a bit more noise that this is being worked on. Looks like another person was working on this, but at least that scope wasn't fully the same. +1 for getting this into CMake |
Adopting all caps DEBUG Co-authored-by: Blaine Bublitz <[email protected]>
Description
Adding new package output for
nix build
command to allow for easy wasm target with debug symbols. Among others this allow to debug cpp code in browser.Use with
nix build git+https://github.com/AztecProtocol/barretenberg#wasm32
Checklist:
/markdown/specs
have been updated.@brief
describing the intended functionality.