On Sat, 14 Mar 2020, Egor Pugin wrote:
clang --version
clang version 11.0.0 (https://github.com/llvm/llvm-project
1bf5ffa164f19094ece5809a4cceeedb740b9281)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: D:\dev\llvm\win64_ninja_release\bin
"-target" "x86_64-unknown-windows"
Yes, this is not "x86_64-msvc-windows" or whatever.
Clang does treat x86_64-unknown-windows the same as
x86_64-unknown-windows-msvc; you can try it for yourself with the command
below, and have a look at the target that it set:
$ clang -target x86_64-unknown-windows -v
clang version 11.0.0 (https://github.com/llvm/llvm-project.git
8391674ea4650849daa8d51d053e42a8d6187b83)
Target: x86_64-unknown-windows-msvc
Thread model: posix
InstalledDir: /home/martin/clang-nightly/bin
And it does handle __declspec just fine:
$ cat test.c
__declspec(dllexport) int foo(void) {
return 42;
}
$ clang -target x86_64-unknown-windows -c test.c
$ llvm-readobj --coff-directives test.o
File: test.o
Format: COFF-x86-64
Arch: x86_64
AddressSize: 64bit
Directive(s): /EXPORT:foo
This said, I think being able to override WINPTHREAD_API is a good thing,
but I don't agree with your conclusion that clang doesn't support
__declspec in the configuration your describing. It sounds like something
else in your setup is breaking __declspec then.
// Martin
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public