mesonbuild/meson

Compiler detection is incorrect for native LLVM/Clang install on Windows

Chiusa

#2560 aperta il 30 ott 2017

 (9 commenti) (2 reazioni) (0 assegnatari)Python (1465 fork)batch import
OS:windowscompilershelp wanted

Metriche repository

Star
 (4978 stelle)
Metriche merge PR
 (Merge medio 139g 13h) (51 PR mergiate in 30 g)

Descrizione

ClangCompiler.get_soname_args assumes that Clang on Windows is running under MINGW. It then tries to generate -Wl,-soname options, which are incompatible with Clang 5.0.0.0 running natively on Windows.

CompilerArgs.to_native adds groups via -Wl,--start-group and -Wl,--end-group (as get_compiler_uses_gnuld returns true for Clang on Windows).

CCompiler.gen_import_library_args adds the -Wl,--out-implib option.

CCompiler.build_rpath_args adds the -Wl,-rpath option.

Related options -Wl,--as-needed and -Wl,--no-undefined aren't supported either, but they can be disabled via the b_asneeded and b_lundef flags, respectively.

Guida contributor