RFR: 8326685: Linux builds not reproducible if two builds configured in different build folders
Andrew Leonard
aleonard at openjdk.org
Tue Feb 27 11:04:52 UTC 2024
On Tue, 27 Feb 2024 10:35:20 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:
>> It seems correct to include the output dir in the remapping, but I have two objections/questions to the way you are doing it.
>> 1) Why not just use OUTPUTDIR instead of the two specialized subdirs? That is simpler, more general and future-proof.
>> 2) Why not expand the value of the OUTPUTDIR variable? I.e.
>>
>> DEBUG_PREFIX_CFLAGS="$DEBUG_PREFIX_CFLAGS -fdebug-prefix-map=$OUTPUTDIR/="
>> ```
>>
>> instead of trying to preserve it as a variable to be expanded in the make execution.
>
> Also, this mapping business is getting really convoluted. :-( I did not like it as it was, and this patch makes it even worse. I think we need to rewrite this to create some kind of dict/map, and then iterate over the map and apply `-fdebug-prefix-map` to all items in the map. Unfortunately, the data structures available in shell scripts is limited and will make this a bit tricky to pull off. :(
> It seems correct to include the output dir in the remapping, but I have two objections/questions to the way you are doing it.
>
> 1. Why not just use OUTPUTDIR instead of the two specialized subdirs? That is simpler, more general and future-proof.
>
> 2. Why not expand the value of the OUTPUTDIR variable? I.e.
>
>
> ```
> DEBUG_PREFIX_CFLAGS="$DEBUG_PREFIX_CFLAGS -fdebug-prefix-map=$OUTPUTDIR/="
> ```
>
> instead of trying to preserve it as a variable to be expanded in the make execution.
Ah thanks @magicus I hadn't seen that existed! that would simplify it, i'll try that now
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18009#discussion_r1504043380
More information about the build-dev
mailing list