[PATCH] D28757: [scudo] Eliminate the runtime dependency on libc++abi

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 15 18:16:30 PST 2017


phosek created this revision.
phosek added reviewers: cryptoad, kcc.
phosek added a subscriber: llvm-commits.
phosek set the repository for this revision to rL LLVM.
Herald added a reviewer: EricWF.

Making the CPU features variable non-static avoids the need for locking to ensure that the initialization is thread-safe which in turns eliminates the runtime dependency on libc++abi library (for __cxa_guard_acquire and __cxa_guard_release) which makes it possible to link scudo against pure C programs.


Repository:
  rL LLVM

https://reviews.llvm.org/D28757

Files:
  lib/scudo/scudo_utils.cpp


Index: lib/scudo/scudo_utils.cpp
===================================================================
--- lib/scudo/scudo_utils.cpp
+++ lib/scudo/scudo_utils.cpp
@@ -87,7 +87,7 @@
 
 bool testCPUFeature(CPUFeature Feature)
 {
-  static CPUIDRegs FeaturesRegs = getCPUFeatures();
+  CPUIDRegs FeaturesRegs = getCPUFeatures();
 
   switch (Feature) {
     case CRC32CPUFeature:  // CRC32 is provided by SSE 4.2.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28757.84515.patch
Type: text/x-patch
Size: 409 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170116/ce43fae8/attachment.bin>


More information about the llvm-commits mailing list