This is an archive of the discontinued LLVM Phabricator instance.

[llvm-exegesis] Fix missing-headers build errors.
ClosedPublic

Authored by oontvoo on Jul 12 2021, 5:33 PM.

Details

Summary

Switch all #includes to use <> because that is consistent with what happens in the cmake checks.
Otherwise, we could be in the situation where cmake checks see that headers exist at <perfmon/...>
but in llvm-exegesis code, we use "perfmon/...", which may not exist.

Related PR/revisions: D84076, PR51017+D105615

Diff Detail

Event Timeline

oontvoo created this revision.Jul 12 2021, 5:33 PM
oontvoo requested review of this revision.Jul 12 2021, 5:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 12 2021, 5:33 PM
courbet added inline comments.Jul 12 2021, 11:19 PM
llvm/cmake/modules/FindLibpfm.cmake
18 ↗(On Diff #358110)

I just looked at the code for check_include_file[1]: They are using #include <> and not #include "" - can we try that before giving up ? Because there should really be no difference between CHECK_CXX_SOURCE_COMPILES and this.

[1] https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/CheckIncludeFile.c.in

oontvoo updated this revision to Diff 358332.Jul 13 2021, 10:30 AM

updated code to use <> #include everywhere

oontvoo marked an inline comment as done.Jul 13 2021, 10:30 AM
oontvoo added inline comments.
llvm/cmake/modules/FindLibpfm.cmake
18 ↗(On Diff #358110)

Done

oontvoo retitled this revision from [llvm-exegesis] Rework cmake variables around LIBPFM checking. to [llvm-exegesis] Fix missing-headers build errors..Jul 13 2021, 10:31 AM
oontvoo edited the summary of this revision. (Show Details)
oontvoo updated this revision to Diff 358386.Jul 13 2021, 12:33 PM
oontvoo marked an inline comment as done.
oontvoo edited the summary of this revision. (Show Details)

clean up #ifdefs

courbet accepted this revision.Jul 14 2021, 11:14 PM
This revision is now accepted and ready to land.Jul 14 2021, 11:14 PM
This revision was landed with ongoing or failed builds.Jul 15 2021, 10:21 AM
This revision was automatically updated to reflect the committed changes.