[PATCH] D25230: [compiler-rt] Exclude compiler-rt from using -fmodules when LLVM_ENABLE_MODULES=On

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 4 08:43:21 PDT 2016


aprantl accepted this revision.
aprantl added a comment.
This revision is now accepted and ready to land.

Thanks! This will allow us to enable compiler-rt on the http://lab.llvm.org:8080/green/job/clang-stage2-cmake-modulesRDA/ bot again.

For more context; on Darwin building compiler-rt with modules enabled produces errors like:

  ../projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:784:22: error: conflicting types for 'pread'
  INTERCEPTOR(SSIZE_T, pread, int fd, void *ptr, SIZE_T count, OFF_T offset) {
  ^
  <...>/usr/include/unistd.h:576:10: note: previous declaration is here
  ssize_t pread(int __fd, void * __buf, size_t __nbyte, off_t __offset) __DARWIN_ALIAS_C(pread);
  ^
  In file included from ../projects/compiler-rt/lib/asan/asan_interceptors.cc:205:
  ../projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:784:22: error: declaration of 'pread' must be imported from module 'Darwin.POSIX.unistd' before it is required
  INTERCEPTOR(SSIZE_T, pread, int fd, void *ptr, SIZE_T count, OFF_T offset) {
  ^


Repository:
  rL LLVM

https://reviews.llvm.org/D25230





More information about the llvm-commits mailing list