This is an archive of the discontinued LLVM Phabricator instance.

[MemProf] Decouple memprof build from COMPILER_RT_BUILD_SANITIZERS
ClosedPublic

Authored by tejohnson on Oct 26 2020, 1:44 PM.

Details

Summary

The MemProf compiler-rt support relies on some of the support only built
when COMPILER_RT_BUILD_SANITIZERS was enabled. This showed up in some
initial bot failures, and I addressed those by making the memprof
runtime build also conditional on COMPILER_RT_BUILD_SANITIZERS
(3ed77ecd0a5d5e5c33770f0f9d3d75cf2f80c80b). However, this resulted in
another inconsistency with how the tests were set up that was hit by
Chromium:

https://bugs.chromium.org/p/chromium/issues/detail?id=1142191

Undo the original bot fix and address this with a more comprehensive fix
that enables memprof to be built even when COMPILER_RT_BUILD_SANITIZERS
is disabled, by also building the necessary pieces under
COMPILER_RT_BUILD_MEMPROF.

Tested by configuring with a similar command as to what was used in the
failing Chromium configure. I reproduced the Chromium failure, as well
as the original bot failure I tried to fix in
3ed77ecd0a5d5e5c33770f0f9d3d75cf2f80c80b, with that fix reverted.
Confirmed it now works.

Diff Detail

Event Timeline

tejohnson created this revision.Oct 26 2020, 1:44 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 26 2020, 1:44 PM
Herald added subscribers: Restricted Project, mgorny. · View Herald Transcript
tejohnson requested review of this revision.Oct 26 2020, 1:44 PM
thakis accepted this revision.Oct 26 2020, 1:47 PM

Thanks!

compiler-rt/include/CMakeLists.txt
27

I think we usually do endif() without anything in parens

This revision is now accepted and ready to land.Oct 26 2020, 1:47 PM
tejohnson added inline comments.Oct 26 2020, 1:52 PM
compiler-rt/include/CMakeLists.txt
27

I'll keep it as is though since that is consistent with the other endifs in this file.

This revision was landed with ongoing or failed builds.Oct 26 2020, 1:53 PM
This revision was automatically updated to reflect the committed changes.