This is an archive of the discontinued LLVM Phabricator instance.

[BOLT] Make BOLT_ENABLE_RUNTIME user-configurable
ClosedPublic

Authored by urnathan on Apr 19 2023, 1:18 PM.

Details

Summary

This makes BOLT_ENABLE_RUNTIME a user-configurable option. It defaults (almost) the same as the current behaviour, but allows one to explicitly disable the runtime.

  • It adds a check for Linux or Darwin, AFAICT those are the only two hosts the runtime supports. So don't default on if not on those hosts.
  • If the runtime is enabled, it adds a check that /proc/self/map_files is readable. The RHEL7 VM dev machine I have is configured such that it is not, and consequently the runtime fails. The failure mode is that one can open() the dir, but getdents fails with EPERM. This is apparently not too uncommon.

Diff Detail

Event Timeline

urnathan created this revision.Apr 19 2023, 1:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 19 2023, 1:18 PM
urnathan requested review of this revision.Apr 19 2023, 1:18 PM
This revision is now accepted and ready to land.Apr 19 2023, 1:42 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2023, 11:42 AM