This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Change the flag to use compiler-rt builtins to boolean
ClosedPublic

Authored by phosek on Jul 13 2018, 3:28 PM.

Details

Summary

This changes the name and the type to what it was prior to r333037
which matches the name of the flag used in other runtimes: libc++,
libc++abi and libunwind. We don't need the type to be a string since
there's only binary choice between libgcc and compiler-rt unlike in
the case of C++ library where there're multiple options.

Diff Detail

Repository
rL LLVM

Event Timeline

phosek created this revision.Jul 13 2018, 3:28 PM
Herald added subscribers: Restricted Project, llvm-commits, mgorny, dberris. · View Herald TranscriptJul 13 2018, 3:28 PM
phosek added inline comments.Jul 13 2018, 3:30 PM
compiler-rt/CMakeLists.txt
160 ↗(On Diff #155514)

@beanz do you know if we could also default to ON on APPLE?

166 ↗(On Diff #155514)

I'm not a big fan of the name, but another alternative would be COMPILER_RT_USE_COMPILER_RT which isn't great either.

morehouse accepted this revision.Jul 13 2018, 4:24 PM
morehouse added inline comments.
compiler-rt/CMakeLists.txt
164 ↗(On Diff #155514)

Maybe this would be simpler:

set(SANITIZER_DEFAULT_COMPILER_RT OFF)
if (FUCHSIA)
  set(SANITIZER_DEFAULT_COMPILER_RT ON)
endif()
166 ↗(On Diff #155514)

COMPILER_RT_USE_BUILTIN_RUNTIME_LIBRARY?

This revision is now accepted and ready to land.Jul 13 2018, 4:24 PM
phosek updated this revision to Diff 155574.Jul 14 2018, 8:00 PM
phosek marked 3 inline comments as done.
This revision was automatically updated to reflect the committed changes.