Stream: t-compiler/wg-llvm

Topic: save-temps


nikomatsakis (Oct 11 2019 at 22:15, on Zulip):

when i run -Csave-temps, where does the output go?

nagisa (Oct 11 2019 at 22:21, on Zulip):

to --out-dir=

nikomatsakis (Oct 12 2019 at 11:06, on Zulip):

ugh. I get;

build/x86_64-unknown-linux-gnu/llvm/bin/llvm-dis: error: Inserted value type doesn't match aggregate type (Producer: 'LLVM9.0.0-rust-1.40.0-dev-8adf9bdcc' Reader: 'LLVM 9.0.0-rust-1.40.0-dev-8adf9bdcc')
nikomatsakis (Oct 12 2019 at 11:06, on Zulip):

this is of course the problem I'm trying to debug in the first place!

nikomatsakis (Oct 12 2019 at 11:06, on Zulip):

I can't figure out how to actually see the IR that's causing the problem

nikomatsakis (Oct 12 2019 at 11:08, on Zulip):

I've built rustc with the "Verify llvm IR" option

nikomatsakis (Oct 12 2019 at 11:08, on Zulip):

which, rather annoyingly, means that we always verify LLVM IR and it cannot be disabled

nikomatsakis (Oct 12 2019 at 11:08, on Zulip):

this in turn prevents --emit llvm-ir from working

nikomatsakis (Oct 12 2019 at 11:08, on Zulip):

so it's kind of hard for me to figure out what the heck is going on

rkruppe (Oct 12 2019 at 11:14, on Zulip):

Since this error comes from llvm-dis, does --emit llvm-bc work?

nikomatsakis (Oct 12 2019 at 11:15, on Zulip):

well I used -Csave-temps to get the bc

nikomatsakis (Oct 12 2019 at 11:15, on Zulip):

I guess it might work but even if it did, what would I do with it?

nikomatsakis (Oct 12 2019 at 11:16, on Zulip):

I guess I can rebuild without "always-verify-llvm-ir" enabled

nikomatsakis (Oct 12 2019 at 11:16, on Zulip):

or maybe (better) hack the compiler to add a Zno-verify-llvm-ir option in that case :)

nikomatsakis (Oct 12 2019 at 11:16, on Zulip):

which is sort of what I want

rkruppe (Oct 12 2019 at 11:17, on Zulip):

Definitely sounds like the long term solution

nikomatsakis (Oct 12 2019 at 11:19, on Zulip):

the other thing I didn't try yet is -Cno-prepopulate-passes

nikomatsakis (Oct 12 2019 at 11:19, on Zulip):

maybe that will skip the verify step?

rkruppe (Oct 12 2019 at 11:19, on Zulip):

Quick skimming of the relevant code suggests no, but can't hurt to try

rkruppe (Oct 12 2019 at 11:22, on Zulip):

Oh. llvm-dis verifies by itself, it's not affected by rustc's cfg(always_verify_llvm_ir)

nikomatsakis (Oct 12 2019 at 11:28, on Zulip):

Oh. llvm-dis verifies by itself, it's not affected by rustc's cfg(always_verify_llvm_ir)

correct

nikomatsakis (Oct 12 2019 at 11:28, on Zulip):

and it has no option to disable it, from what I can tell

nikomatsakis (Oct 12 2019 at 11:28, on Zulip):

which seems...strange

nikomatsakis (Oct 12 2019 at 11:28, on Zulip):

like surely somebody else has had this same problem ;)

nikomatsakis (Oct 12 2019 at 11:32, on Zulip):

or maybe (better) hack the compiler to add a Zno-verify-llvm-ir option in that case :)

I'm doing this

nikomatsakis (Oct 12 2019 at 11:32, on Zulip):

not like it's hard

nikomatsakis (Oct 12 2019 at 11:32, on Zulip):

I just didn't want to rebuild :P

Last update: Nov 15 2019 at 10:45UTC