Hardcoded filepaths in compiled exe

Steven Schveighoffer schveiguy at gmail.com
Wed Dec 30 01:21:37 UTC 2020


On 12/29/20 7:46 PM, Basile B. wrote:
> On Tuesday, 29 December 2020 at 23:11:25 UTC, Steven Schveighoffer wrote:
>> But I would think a feature should exist that masks the base directory 
>> of exception file names.
>>
>> Probably worth an enhancement request.
>>
> 
> Also aren't dmd output binaries supposed to be "reproducible" ?

If you had an option to change __FILE__ to be canonical, then it could be.

i.e. instead of:

C:\D\dmd2\windows\bin\..\..\src\phobos\std\file.d

you stored:

(imports)\std\file.d

where (imports) (or maybe some other token) was substituted in for the 
base of every import. Files passed on the command line would just store 
the __FILE__ as it was passed.

-Steve


More information about the Digitalmars-d-learn mailing list