Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hotfix for K LLVM backend update (#869)
This PR is a hotfix for a [broken](runtimeverification/k#3728) backend update job. When using the new [inlined version of `llvm-kompile`](#814), we were incorrectly using the result of `sys::getDefaultTargetTriple()` as our target for machine code emission, rather than the consistent value selected by running Clang on an empty input file. On newer versions of macOS, this produces warnings like: ``` ld: warning: object file (tmp.1YutNb2k5B.o) was built for newer macOS version (14.0) than being linked (10.12) ``` when running `llvm-kompile`. These warnings were silently absorbed by CI as they are just warnings, but they are a) noisy and b) break the K test suite when grepping for error messages in failed compilations (`kompile ... 2>&1 | grep ...`). The fix is just to use our existing technique for target triple selection in the one place we weren't previously. Additionally, the PR makes two small related changes: * Add conditional compilation guards for some LLVM headers that give deprecation warnings in LLVM 17 * Catch future errors of this kind in the backend CI by ensuring that `llvm-kompile` is silent and doesn't pollute `stderr` with extra output when it runs successfully
- Loading branch information