mesonbuild / meson

The Meson Build System
http://mesonbuild.com
Apache License 2.0
5.54k stars 1.61k forks source link

Meson fails on sanity check step when using clang-cl+ASAN #5846

Open pelijah opened 5 years ago

pelijah commented 5 years ago

Config command: meson --buildtype=release --default-library=shared -Dc_args="-fsanitize=address" . builddir

Error:

Sanity testing C compiler: clang-cl
Is cross compiler: False.
Sanity check compiler command line: clang-cl /MDd -fsanitize=address /nologo /showIncludes %BUILDDIR%\meson-private\sanitycheckc.c /Fe%BUILDDIR%\meson-private\sanitycheckc.exe
Sanity check compile stdout:

-----
Sanity check compile stderr:
clang-cl: error: invalid argument '/MDd' not allowed with '-fsanitize=address'
clang-cl: note: AddressSanitizer doesn't support linking with debug runtime libraries yet

Is it ok that Meson uses '/MDd' even if --buildtype=release is set?

jpakkane commented 5 years ago

The linker issues are caused by environment detector classifying the linker as AppleDynamicLinker rather than some better type, presumably LLVMDynamicLinker.

XVilka commented 4 years ago

Any updates on this issue?

XVilka commented 4 years ago

How I can help?