RFR: 8323667: Library debug files contain non-reproducible full gcc include paths [v2]
Andrew Leonard
aleonard at openjdk.org
Tue Jan 16 14:01:20 UTC 2024
On Tue, 16 Jan 2024 13:53:59 GMT, Andrew Leonard <aleonard at openjdk.org> wrote:
>> The logic of this is a bit strange. I think what we really want to express is:
>>
>> if ! ALLOW_ABSOLUTE_PATHS_IN_OUTPUT and -fdebug-prefix-map is a valid option for gcc then
>> set -fdebug-prefix-map for both workspace_root and gcc system libraries
>> endif
>>
>> Now this connection is kind of lost. Maybe the easiest way to do this is just to do the FLAGS_COMPILER_CHECK_ARGUMENTS separately, and reading the result of that check as a boolean variable in a separate if statement, since nesting much code inside a `IF_TRUE:` block can be hard to read. Or move the setting of the workspace_root as well to DEBUG_PREFIX_MAP_GCC_INCLUDE_PATHS, perhaps renaming it in the process, and calling it from `IF_TRUE:`.
>
> @magicus Yes, good point the condition is sort of hidden as it is.
> I've moved the DEBUG_PREFIX_MAP_GCC_INCLUDE_PATHS setting prior to the compiler option check, so the whole constructed DEBUG_PREFIX_CFLAGS is verified, which is probably how it should be.
>
> Updated... What do you think?
Hmm, i'm not sure, it makes the configure output a bit noisy:
checking if CC supports "-fdebug-prefix-map=/home/andrew/temurin-build/workspace/build/src/= -fdebug-prefix-map=/home/andrew/jdk21u/build/devkit/result/aarch64-linux-gnu-to-aarch64-linux-gnu/aarch64-linux-gnu/sysroot/usr/include/=/usr/include/ -fdebug-prefix-map=/home/andrew/jdk21u/build/devkit/result/aarch64-linux-gnu-to-aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/11.3.0/include/=/usr/local/gcc_include/ -fdebug-prefix-map=/home/andrew/jdk21u/build/devkit/result/aarch64-linux-gnu-to-aarch64-linux-gnu/include/c++/11.3.0/=/usr/local/gxx_include/"... yes
I'll try moving DEBUG_PREFIX_MAP_GCC_INCLUDE_PATHS to IF_TRUE instead
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17399#discussion_r1453466318
More information about the build-dev
mailing list