Change value of #file literal for release builds

Upon reading that thread, I'd disagree—it looks like it was quite well supported, but the discussion just trailed off, unfortunately.

Lately I've been working on path remapping for hermetic debug info; I'd be interested to know what people's answers are to the following two questions:

  1. Do you consider #file a debugging-only construct?
  2. Can you think of a situation where you would want paths returned by #file to look different than the paths embedded in your binary's debug symbols?

If the answers to these are "yes" and "no", respectively, then I'd propose that debug path remapping could also solve the same problem for #file. But I'd also like to hear if there are reasons we shouldn't do that that I haven't considered.

2 Likes