summaryrefslogtreecommitdiff
path: root/docs/genrefman.py
diff options
context:
space:
mode:
authorLeonid Zaburunov <zaburunov.lv@aobfg.ru>2025-08-05 20:51:24 +0300
committerDylan Baker <dylan@pnwbakers.com>2025-12-08 10:13:41 -0800
commit67469792363663f90468eb2a07c8d84ae8dc5c04 (patch)
tree1324cf3d8d91116d5d68e8f3abf04877c8b27af9 /docs/genrefman.py
parentc8a7fd7ff641ad664803bcbf06ada494e0db91aa (diff)
downloadmeson-67469792363663f90468eb2a07c8d84ae8dc5c04.tar.gz
compilers: clike: Deduplicate compile and link args from actually used arg list
Current behaviour is to loop over 'sys_args' list which contains both included and ignored compiler arguments. This could produce unexpected results when argument is both ignored and deduplicated. With the following changes, 'cleaned_sys_args' is used to ensure only included args are deduplicated. Example: CFLAGS (or 'c_args' as Meson option) has '-I${includedir} -L${libdir}' and LDFLAGS ('c_link_args') has '-L${libdir}'. Given CFLAGS value is wrong: -L entry belongs to LDFLAGS and thus should not be included in compiler argument list. Since we have -L in 'sys_args' list this entry will not be included as linker flag too! This is definitely not our goal: wrong entry should just be ignored. Some debug prints from Meson: C_ARGS: ['-I/opt/x64-compile/include', '-L/opt/x64-compile/lib'] LINKER_ARGS: ['-L/opt/x64-compile/lib'] RESULT_CARGS: ['-I/opt/x64-compile/include', '-D_FILE_OFFSET_BITS=64'] RESULT_LDARGS: [] (this is captured during compiler.find_library() call) And this is what we see after applying patch: C_ARGS: ['-I/opt/x64-compile/include', '-L/opt/x64-compile/lib'] LINKER_ARGS: ['-L/opt/x64-compile/lib'] RESULT_CARGS: ['-I/opt/x64-compile/include', '-D_FILE_OFFSET_BITS=64'] RESULT_LDARGS: ['-L/opt/x64-compile/lib']
Diffstat (limited to 'docs/genrefman.py')
0 files changed, 0 insertions, 0 deletions