Backtrace on error

I’m currently trying to debug a custom OS target on a fork, and I’m trying to track down why certain errors are happening inside the compiler (I’m specifically getting unsupported machine mode ‘TC and __float128 is not supported on this target, and I’m trying to track down what I need to set in my target defs order to fix these errors). I’m interested in knowing the source of the errors, is there a way to get this? On rustc, there’s a debug flag -Ztreat-err-as-bug, which causes the compiler to deliberately ICE and print a backtrace on an error. I’d like an equivalent flag if possible.

The error messages are pretty reasonable IMO:

For the ‘TC’, looks like someone is trying to use the ‘TC’ mode of __attribute__((mode)), which eventually checks .getIntTypeByWidth in the target, so one of those isn’t supported. It looks to me that TC sets the width to whatever 128, so this is ‘no 128 bit ints`.

For the ‘float not supported issue: Your target is configured to not .hasFloat128Type. Depending on your library, you might check to see if it is checking a macro before it attempts to use float128 to see if you can figure out why that is set instead.

This is in compiler-rt, I’m porting the compiler to a new OS on x86-64 and attempting to start porting the library. I have set HasFloat128 in my target info (and I know that the constructor that sets it is running, because the constructor also modifies the LongDouble format, which I see the results of), so I’m not sure why that’s coming up. I’m guessing this won’t be the last error, so I’d like a more general tool to track down errors. NVM, looks like it’s pulling in host headers. Which I’m not sure how to fix.