[all-commits] [llvm/llvm-project] 547c55: [gn build] Try to fix build on linux after std=c++...
Nico Weber via All-commits
all-commits at lists.llvm.org
Sat Aug 6 05:34:39 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 547c551925c8f4dd979ba5cf16c857091a80254b
https://github.com/llvm/llvm-project/commit/547c551925c8f4dd979ba5cf16c857091a80254b
Author: Nico Weber <thakis at chromium.org>
Date: 2022-08-06 (Sat, 06 Aug 2022)
Changed paths:
M llvm/utils/gn/secondary/lldb/include/lldb/Host/BUILD.gn
Log Message:
-----------
[gn build] Try to fix build on linux after std=c++17 switch
glibc annotates `process_vm_readv` with `__THROW`.
lldb/include/lldb/Host/linux/Uio.h and
lldb/source/Host/linux/LibcGlue.cpp don't.
Having a mismatch causes an error with c++17:
../../lldb/source/Host/linux/LibcGlue.cpp:18:9:
error: 'process_vm_readv' is missing exception specification 'throw()'
ssize_t process_vm_readv(::pid_t pid, const struct iovec *local_iov,
^
../../lldb/include/lldb/Host/linux/Uio.h:18:9:
note: previous declaration is here
ssize_t process_vm_readv(::pid_t pid, const struct iovec *local_iov,
^
The diagnostic is a bit misleading, since the previous declaration
in the sysroot (in usr/include/x76_64-linux-gnu/bits/uio-ext.h) is
what has the `__THROW`.
In the cmake build, cmake sets `HAVE_PROCESS_VM_READV` correctly based
on header probing.
In the GN build, just set it to 1 unconditionally on linux. If that
turns out to not be good enough everywhere, we'll have to add a GN arg
for this.
(I'm also setting it to 1 on Android. I'm not sure if that's correct --
but we don't build lldb for Android anyways.)
More information about the All-commits
mailing list