This is an archive of the discontinued LLVM Phabricator instance.

Working on reconciling out-of-tree patches to compiler-rt for building for iOS.
ClosedPublic

Authored by beanz on Jun 17 2015, 10:59 AM.

Details

Summary

This is one of many changes needed for compiler-rt to get it building on iOS.

This change does the following:

  • Don't include crt_externs on iOS (it isn't available)
  • Support ARM thread state objects

Note: this change does not enable building for iOS, as there are more changes to come.

Diff Detail

Repository
rL LLVM

Event Timeline

beanz updated this revision to Diff 27847.Jun 17 2015, 10:59 AM
beanz retitled this revision from to Working on reconciling out-of-tree patches to compiler-rt for building for iOS..
beanz updated this object.
beanz edited the test plan for this revision. (Show Details)
beanz added a subscriber: Unknown Object (MLST).

Looping in Alexander Potapenko because git blame :-).

Adding Kuba and Justin for review.

samsonov added inline comments.
lib/sanitizer_common/sanitizer_mac.cc
33 ↗(On Diff #27847)

Please use SANITIZER_IOS instead. It is already defined in sanitizer_platform.h (here and below)

371 ↗(On Diff #27847)

Please use indentation in nested #ifs

# if foo
  a = x;
#  if bar
  b = y;
#  else
  b = yy;
#  endif
  c = z;
# endif
beanz updated this revision to Diff 28266.Jun 23 2015, 11:06 AM

Updating based on feedback from samsonov.

samsonov edited edge metadata.Jun 23 2015, 2:12 PM

LGTM, though I really think we should move _NSGetEnviron logic to a function.

lib/sanitizer_common/sanitizer_mac.cc
200 ↗(On Diff #28266)

We have similar code in asan_mac.cc. Please consider factoring it to a function, which we could call from there instead.

samsonov accepted this revision.Jun 23 2015, 2:12 PM
samsonov edited edge metadata.
This revision is now accepted and ready to land.Jun 23 2015, 2:12 PM
beanz updated this revision to Diff 28286.Jun 23 2015, 2:26 PM
beanz edited edge metadata.

Refactoring reading environ out into a funciton.

LGTM. Let me know if there are more patches you're blocked on.

This revision was automatically updated to reflect the committed changes.