| Age | Commit message (Collapse) | Author |
|
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']
|
|
|
|
|
|
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This adds support for DEF files to rust and removes
some hasattr duck typing.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
|
|
CLikeCompiler._get_basic_compiler_args
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Compiler.symbols_have_underscore_prefix
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This also fixes the `_cross_sizeof` helper
|
|
This also fixes the helper `_cross_alignment` method.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Same logic as the openmp flags
|
|
I've done the compile and link flags in one commit since they're so
closely related
|
|
|
|
|
|
|
|
|
|
|
|
Which, ironically, is passed down three levels and never used.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is calculated by `Environment().is_cross_build(for_machine)`. Since
we have that in the Compiler class, just calculate it in the Compiler
initializer
|