Linking fails with `'ItaniumNodes.def' file not found`
toolchain
### Description of the bug:
While working on reverse introp I've occasionally been running a full compile-link-run test to make sure the code is doing what I think it's doing. This stopped working after [Switch to a Bazel-based runtimes build, and add bootstrapping](https://github.com/carbon-language/carbon-lang/commit/27870892472cbc96324184fb64c2099f95d95f5e). I now get this error:
```
INFO: Invocation ID: c8ff09b8-b4de-4927-9f1f-cac0b719b1cf
Computing main repo mapping:
Loading:
Loading: 0 packages loaded
bazel: Entering directory `/usr/local/google/home/nicholasbishop/.cache/bazel/_bazel_nicholasbishop/7a0bf1e4d37f50d2dd7c7e67a3c8032e/execroot/_main/'
Analyzing: target //toolchain:toolchain (0 packages loaded, 0 targets configured)
Analyzing: target //toolchain:toolchain (0 packages loaded, 0 targets configured)
INFO: Analyzed target //toolchain:toolchain (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
bazel: Leaving directory `/usr/local/google/home/nicholasbishop/.cache/bazel/_bazel_nicholasbishop/7a0bf1e4d37f50d2dd7c7e67a3c8032e/execroot/_main/'
Target //toolchain:carbon up-to-date:
bazel-bin/toolchain/carbon
INFO: Elapsed time: 0.427s, Critical Path: 0.08s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/toolchain/carbon <args omitted>
In file included from /usr/local/google/home/nicholasbishop/.cache/bazel/_bazel_nicholasbishop/7a0bf1e4d37f50d2dd7c7e67a3c8032e/execroot/_main/bazel-out/k8-fastbuild/bin/toolchain/carbon.runfiles/_main/toolchain/install/runtimes/libcxxabi/src/cxa_demangle.cpp:17:
/usr/local/google/home/nicholasbishop/.cache/bazel/_bazel_nicholasbishop/7a0bf1e4d37f50d2dd7c7e67a3c8032e/execroot/_main/bazel-out/k8-fastbuild/bin/toolchain/carbon.runfiles/_main/toolchain/install/runtimes/libcxxabi/src/demangle/ItaniumDemangle.h:170:10: fatal error:
'ItaniumNodes.def' file not found
170 | #include "ItaniumNodes.def"
| ^~~~~~~~~~~~~~~~~~
1 error generated.
error: failure running `clang` to perform linking: Failed to compile runtime source file 'runtimes/libcxxabi/src/cxa_demangle.cpp'
```
### What did you do, or what's a simple way to reproduce the bug?
`~/tmp/carb/simple.carbon`:
```carbon
import Core library "io";
fn Run() -> i32 {
Core.Print(1234);
return 0;
}
```
Run: `./scripts/run_bazelisk.py run //toolchain compile ~/tmp/carb/simple.carbon && ./scripts/run_bazelisk.py run //toolchain -- link --output=/usr/local/google/home/nicholasbishop/tmp/carb/simple ~/tmp/carb/simple.o && ~/tmp/carb/simple`
### What did you expect to happen?
_No response_
### What actually happened?
_No response_
### Any other information, logs, or outputs that you want to share?
_No response_
2 条评论