The original correct code (from commit 86a84f7f6) computed the sysroot
FROM the toolchain path:
if (overriddenToolchainPath) {
sysrootPath = getSysrootByToolchainPath(overriddenToolchainPath);
}
The previous fix used the toolchain path directly as the sysroot when
there was an override, but toolchain paths differ from sysroot paths:
- Toolchain: /opt/compiler-explorer/gcc-7.2.0
- Sysroot: /opt/compiler-explorer/gcc-7.2.0/x86_64-pc-linux-gnu/sysroot
Now the sysroot is always computed via getSysrootByToolchainPath(),
whether using an override or the default toolchain.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>