Open SchrodingerZhu opened 2 months ago
From a quick search through the codebase I found this list of public headers that are currently being including and need updating:
#include <assert.h>
#include <stdlib.h>
#include <sys/syscall>
#include <fcntl.h>
#include <sys/stat.h>
#include <signal.h>
#include <errno.h>
#include <sys/mman.h>
#include <dirent.h>
#include <pthread.h>
#include <sys/types.h>
#include <time.h>
#include <sched.h>
#include <search.h>
#include <setjmp.h>
#include <spawn.h>
#include <stdio.h>
#include <string.h>
#include <sys/prctl.h>
#include <sys/random.h>
#include <sys/resource.h>
#include <sys/select.h>
#include <sys/sendfile.h>
#include <sys/socket.h>
#include <sys/utsname.h>
#include <sys/wait.h>
#include <termios.h>
#include <threads.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <wchar.h>
And this list of internal headers being included that need updating:
#include "include/llvm-libc-macros/limits-macros.h"
#include "include/llvm-libc-macros/stdfix-macros.h"
#include "include/llvm-libc-types/ENTRY.h"
#include "include/llvm-libc-macros/float16-macros.h"
#include "include/llvm-libc-types/float128.h"
#include "include/llvm-libc-types/size_t.h"
#include "include/llvm-libc-types/ssize_t.h"
#include "include/llvm-libc-types/rpc_opcodes_t.h"
#include "include/llvm-libc-macros/linux/fcntl-macros.h"
We have introduced proxy layers to help us dispatch headers for overlay mode and fullbuild mode. However, as proxy layers is just introduced early this year, many headers are not properly ported to use proxy layers. Depending on platforms, glibc and linux versions, build errors due to mixed system and llvm definitions are frequently reported. We should scan through the libc codebase to properly provide overlay type/macro definitions via proxy layers.
@lntue maybe we can keep the list updated in this issue?