diff options
author | Rainer Orth <ro@gcc.gnu.org> | 2022-01-11 23:50:37 +0100 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2022-01-11 23:50:37 +0100 |
commit | c79d37279156d8f2242c8f9acc6119c67aa5cf52 (patch) | |
tree | 8d0e2769197d75c942c5c3a5c0156489a68d90ca /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 4993eff3e253a1c04e1a1a2fa5d68f6b33423419 (diff) | |
download | llvm-c79d37279156d8f2242c8f9acc6119c67aa5cf52.zip llvm-c79d37279156d8f2242c8f9acc6119c67aa5cf52.tar.gz llvm-c79d37279156d8f2242c8f9acc6119c67aa5cf52.tar.bz2 |
[sanitizer_common] Only use NT_GNU_BUILD_ID in sanitizer_linux_libcdep.cpp if supported
D114294 <https://reviews.llvm.org/D114294> broke the Solaris buildbots:
/opt/llvm-buildbot/home/solaris11-amd64/clang-solaris11-amd64/llvm/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:613:29: error: use of undeclared identifier 'NT_GNU_BUILD_ID'
if (nhdr->n_type == NT_GNU_BUILD_ID && nhdr->n_namesz == kGnuNamesz) {
^
Like D107556 <https://reviews.llvm.org/D107556>, it forgot that
`NT_GNU_BUILD_ID` is an unportable GNU extension.
Fixed by making the code conditional on the definition of the macro.
Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`.
Differential Revision: https://reviews.llvm.org/D117051
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions