[PATCH] D40944: [profile] Enable on Solaris

Rainer Orth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 7 01:12:00 PST 2017


ro created this revision.
Herald added subscribers: Sanitizers, fedor.sergeev, krytarowski, mgorny, srhines.

The test/asan/TestCases/asan_and_llvm_coverage_test.cc failed to link on Solaris
since libclang_rt.profile was missing.  Instead of trying to document that requirement
in the test, I just tried to enable the library on Solaris instead.

Most changes are probably straightforward, but two bear explanation:

- The getpid prototype in lib/profile/InstrProfilingFile.c conflicted with the system one (returning pid_t instead of instead), so I removed it.

- While parts of the profile library prefer fcntl(F_SETLCKW) over flock(LOCK_EX) if available, others unconditionally use flock.  flock just doesn't exist on Solaris, so I moved the locking to common code.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D40944

Files:
  cmake/config-ix.cmake
  lib/profile/GCDAProfiling.c
  lib/profile/InstrProfilingFile.c
  lib/profile/InstrProfilingPlatformLinux.c
  lib/profile/InstrProfilingPlatformOther.c
  lib/profile/InstrProfilingPort.h
  lib/profile/InstrProfilingUtil.c
  lib/profile/InstrProfilingUtil.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40944.125898.patch
Type: text/x-patch
Size: 5760 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171207/10b2f43e/attachment.bin>


More information about the llvm-commits mailing list