This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Add support for LLVM_USE_SANITIZER to libcxx when being built standalone and in-tree
ClosedPublic

Authored by EricWF on Aug 17 2014, 9:10 PM.

Details

Summary

This patch adds support for LLVM_USE_SANITIZER when being built in-tree and standalone.

This patch does the following things:

  1. define the LLVM_USE_SANITIZER option to "" when being built standalone. This also helps show we support it.
  2. Translate LLVM_USE_SANITIZER when standalone in a very similar way done in llvm/cmake/HandleLLVMOptions.cmake.
  3. Add config.llvm_use_sanitizer to lit.site.cfg.in
  4. Add code to translate config.llvm_use_sanitizer's value into the needed compile flags in lit.cfg.

Currently lit.cfg assumes that that the compiler supports '-fno-omit-frame-pointer' while CMakeLists.txt actually checks to see if its supported. We could pass this information to lit but I'm not sure its needed.

Diff Detail

Event Timeline

EricWF updated this revision to Diff 12601.Aug 17 2014, 9:10 PM
EricWF retitled this revision from to [libcxx] Add support for LLVM_USE_SANITIZER to libcxx when being built standalone and in-tree.
EricWF updated this object.
EricWF edited the test plan for this revision. (Show Details)
EricWF added reviewers: mclow.lists, danalbert.
EricWF added a subscriber: Unknown Object (MLST).
danalbert added inline comments.Aug 17 2014, 9:30 PM
CMakeLists.txt
30

What is this change for? Doesn't this just list the variable in the cmake GUI? We don't want this to be configurable.

test/lit.cfg
318

"is not None" is unnecessary.

EricWF updated this revision to Diff 12603.Aug 17 2014, 9:39 PM

Removed the cache variable. I made it a cache variable for testing and forgot to remove it.

danalbert accepted this revision.Aug 17 2014, 10:00 PM
danalbert edited edge metadata.
This revision is now accepted and ready to land.Aug 17 2014, 10:00 PM
EricWF updated this revision to Diff 12605.Aug 17 2014, 10:09 PM
EricWF edited edge metadata.

Just updating to the final version of the patch so I can use arc to commit it.

EricWF closed this revision.Aug 17 2014, 10:12 PM