This is an archive of the discontinued LLVM Phabricator instance.

[XRay][compiler-rt] Allow for defining defaults at compile-time
ClosedPublic

Authored by dberris on Feb 15 2017, 7:11 PM.

Details

Summary

Currently, defaulted options cannot be overriden easily. As an example,
we always patch the binary pre-main unless the user defines the option
at the commandline to inhibit this behaviour. This change allows for
building different versions of the XRay archive with different defaults
(whether to patch pre-main, or whether to use FDR mode by default, etc.)
and giving that choice at link-time.

For now we don't create different archives that have different defaults,
but those could be added in later revisions. This change just enables
the possibility.

Diff Detail

Repository
rL LLVM

Event Timeline

dberris created this revision.Feb 15 2017, 7:11 PM
dberris updated this revision to Diff 88919.Feb 17 2017, 10:42 AM

Fix order of applying the overrides

timshen accepted this revision.Feb 17 2017, 10:59 AM
This revision is now accepted and ready to land.Feb 17 2017, 10:59 AM
timshen added inline comments.Feb 17 2017, 11:04 AM
lib/xray/xray_flags.cc
43 ↗(On Diff #88919)

It took me two minutes to understand why we need this. :) Maybe add a comment here?

This revision was automatically updated to reflect the committed changes.