Stream: t-compiler/help

Topic: using debug! while building core


Bastian Kauschke (Mar 20 2020 at 10:08, on Zulip):

I currently have an error while building libcore using the stage1 compiler.

How do I enable debug calls here?

my config.toml contains debug-assertions = true and I run RUSTC_LOG=rustc_trait_selection=debug ./x.py test src/test/ui/ --stage 1 --bless --pass check

bjorn3 (Mar 20 2020 at 10:12, on Zulip):

https://rustc-dev-guide.rust-lang.org/compiler-debugging.html#how-to-keep-or-remove-debug-and-trace-calls-from-the-resulting-binary

calls to debug! and trace! are only included in the program if debug-assertions=yes is turned on in config.toml [...] I also think that in some cases just setting it will not trigger a rebuild, so if you changed it and you already have a compiler built, you might want to call x.py clean to force one.

You may need to run ./x.py clean once it seems.

Bastian Kauschke (Mar 20 2020 at 10:14, on Zulip):

thanks! :heart:

Last update: Sep 27 2020 at 14:45UTC