Page MenuHomePhabricator

mati865 (Mateusz Mikuła)
User

Projects

User does not belong to any projects.

User Details

User Since
Nov 13 2016, 5:55 AM (210 w, 5 d)

Recent Activity

Oct 25 2020

mati865 accepted D90021: [libcxx] [libcxxabi] Set flags for visibility when statically linking libcxxabi into libcxx for windows.

Sorry for the delay.
LGTM from MinGW point of view.

Oct 25 2020, 3:55 AM · Restricted Project, Restricted Project

Oct 12 2020

mati865 abandoned D87547: [MinGW][clang-shlib] Build by default on MinGW.

Opened https://reviews.llvm.org/D89225

Oct 12 2020, 2:57 AM · Restricted Project
mati865 requested review of D89225: [MinGW][clang-shlib] Build only when LLVM_LINK_LLVM_DYLIB is enabled.
Oct 12 2020, 2:57 AM · Restricted Project

Oct 10 2020

mati865 added a comment to D87547: [MinGW][clang-shlib] Build by default on MinGW.

Or maybe even make it into a cmake option?

Oct 10 2020, 12:08 PM · Restricted Project
mati865 added a comment to D87547: [MinGW][clang-shlib] Build by default on MinGW.

Older versions of lld didn't error out if exceeding the limit, this is fixed in D86701, unfortunately after the 11 branch.

Oct 10 2020, 6:06 AM · Restricted Project

Oct 9 2020

mati865 added a comment to D87547: [MinGW][clang-shlib] Build by default on MinGW.

With -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_RANLIB_COMPILER=llvm-ranlib -DCMAKE_AR_COMPILER=llvm-ar -DCMAKE_LINKER=ld.lld -DLLVM_ENABLE_LLD=ON libclang-cpp.dll has 65535 exports, seems it got truncated?

Oct 9 2020, 3:47 PM · Restricted Project
mati865 added a comment to D87547: [MinGW][clang-shlib] Build by default on MinGW.

Reproduced by adding -DLLVM_ENABLE_ASSERTIONS=ON.

Oct 9 2020, 3:09 PM · Restricted Project
mati865 added a comment to D87547: [MinGW][clang-shlib] Build by default on MinGW.

How many exports does your DLL end up with - is it close to the 64k limit, or far from it? Is there maybe some other library that is linked in, that increases the number of exported symbols (=all), or does this DLL only export explicitly intended symbols with dllexport?

Oct 9 2020, 1:14 PM · Restricted Project
mati865 added a comment to D87547: [MinGW][clang-shlib] Build by default on MinGW.

@ASDenysPetrov what CMake options do you use?
I'm unable to reproduce this error with Clang+LLD and GCC+Binutils from MSYS2.

Oct 9 2020, 10:52 AM · Restricted Project

Oct 7 2020

mati865 retitled D89009: Add version to libLLVM also on non-UNIX from Add version to libLLVM also on non UNIX to Add version to libLLVM also on non-UNIX.
Oct 7 2020, 3:06 PM · Restricted Project
mati865 added a comment to D88991: [LLD] Ignore ELF tests when ld.lld defaults to MinGW.

I wonder if it'd be possible to add some custom substitution in the lit config, to have it replace ld.lld with ld.lld -m <some-elf> in this case...

Oct 7 2020, 3:05 PM · Restricted Project, lld
mati865 requested review of D89009: Add version to libLLVM also on non-UNIX.
Oct 7 2020, 2:25 PM · Restricted Project
mati865 requested review of D88991: [LLD] Ignore ELF tests when ld.lld defaults to MinGW.
Oct 7 2020, 11:03 AM · Restricted Project, lld

Oct 5 2020

mati865 accepted D88804: [LLD] [MinGW] Support setting the subsystem version via the subsystem argument.
Oct 5 2020, 5:39 AM · Restricted Project
mati865 added a comment to D88804: [LLD] [MinGW] Support setting the subsystem version via the subsystem argument.

With BFD (tested version 2.35) the latter specified option takes precedence:

Oct 5 2020, 4:11 AM · Restricted Project
mati865 accepted D88803: [LLD] [MinGW] Simplify handling of os/subsystem version.

Nit: according to https://docs.microsoft.com/en-us/cpp/build/reference/subsystem-specify-subsystem?view=vs-2019 the minimal and the default subsystem for ARM should be 6.02.

Oct 5 2020, 4:01 AM · Restricted Project

Sep 26 2020

mati865 updated subscribers of D86091: [cmake] Fix build of attribute plugin example on Windows.

@hans sorry for not spotting it earlier but is it possible to still backport it to LLVM 11?
It's totally OK if it's too late. I can easily keep it as a patch in MSYS2 repository.

Sep 26 2020, 11:28 AM · Restricted Project

Sep 22 2020

mati865 abandoned D87521: [MinGW][llvm-config] Use unversioned library name.
Sep 22 2020, 3:08 PM · Restricted Project

Sep 21 2020

mati865 added a comment to D88005: [clang] [MinGW] Add an implicit .exe suffix even when crosscompiling.

LGTM
Confirmed that GCC 9 still adds .exe.

Sep 21 2020, 3:12 AM · Restricted Project

Sep 14 2020

mati865 added a comment to D87524: [Windows][Polly] Disable LLVMPolly module for all compilers on Windows.

Sounds great, could you commit it? I don't have the permission.

Sep 14 2020, 9:57 AM · Restricted Project, Restricted Project
mati865 retitled D87524: [Windows][Polly] Disable LLVMPolly module for all compilers on Windows from [Windows][Polly] Disable loadable modules to [Windows][Polly] Disable LLVMPolly module for all compilers on Windows.
Sep 14 2020, 9:56 AM · Restricted Project, Restricted Project

Sep 13 2020

mati865 added a comment to D87521: [MinGW][llvm-config] Use unversioned library name.

Cygwin seems to be the only Windows target that adds version to the library names.

Sep 13 2020, 12:25 AM · Restricted Project

Sep 12 2020

mati865 added a comment to D87539: [MinGW][libclang] Allow simultaneous shared and static lib.

Thanks.

Sep 12 2020, 12:36 PM · Restricted Project
mati865 added a comment to D87539: [MinGW][libclang] Allow simultaneous shared and static lib.

Sorry, pasted wrong command. I was curious if import library has it (since static one did not) but in the end neither import nor static library shows any export.

Sep 12 2020, 6:39 AM · Restricted Project
mati865 added a comment to D87521: [MinGW][llvm-config] Use unversioned library name.

what code appends a version number in dynamic libs when built for other platforms, but decides not to, when targeting windows in general, or mingw specifically?

Sep 12 2020, 6:23 AM · Restricted Project
mati865 added a comment to D87539: [MinGW][libclang] Allow simultaneous shared and static lib.

bin/llvm-readobj --coff-directives lib/liblibclang.dll.a | grep -i export shows nothing.

Sep 12 2020, 6:14 AM · Restricted Project
mati865 added a comment to D87524: [Windows][Polly] Disable LLVMPolly module for all compilers on Windows.

Could you fix the title+description?

Sep 12 2020, 1:55 AM · Restricted Project, Restricted Project
mati865 retitled D87524: [Windows][Polly] Disable LLVMPolly module for all compilers on Windows from [MinGW][Polly] Disable loadable modules to [Windows][Polly] Disable loadable modules.
Sep 12 2020, 1:51 AM · Restricted Project, Restricted Project
mati865 updated the diff for D87521: [MinGW][llvm-config] Use unversioned library name.
Sep 12 2020, 1:48 AM · Restricted Project
mati865 added a comment to D87539: [MinGW][libclang] Allow simultaneous shared and static lib.

We had this patch at MSYS2 for years and I'm not aware of any issues with the static library.
I think the library looks fine:

$ nm lib/liblibclang.a | grep __imp_
                 U __imp___acrt_iob_func
                 U __imp___acrt_iob_func
                 U __imp_GetModuleFileNameA
                 U __imp_VirtualQuery
                 U __imp___acrt_iob_func
                 U __imp___acrt_iob_func
                 U __imp___acrt_iob_func
Sep 12 2020, 1:46 AM · Restricted Project
mati865 added a comment to D87521: [MinGW][llvm-config] Use unversioned library name.

I don't use MSVC but apparently there is no libLLVM there: https://github.com/llvm/llvm-project/blob/9c651c231f3144f53e13cd0a1747589e1b2edccd/llvm/tools/llvm-shlib/CMakeLists.txt#L15

Sep 12 2020, 1:37 AM · Restricted Project

Sep 11 2020

mati865 updated the diff for D87521: [MinGW][llvm-config] Use unversioned library name.
Sep 11 2020, 3:14 PM · Restricted Project
mati865 added a comment to D87517: [MinGW] Use lib prefix for libraries.

-DLLVM_ENABLE_PROJECTS="clang;lldb" -DLLVM_BUILD_LLVM_DYLIB=1 with only this patch applied (< is before, > is after):

$ diff <(cd ../build && find ./ | sort) <(cd ../build2/ && find ./ | sort)
38a39,41
> ./bin/libLLVM.dll
> ./bin/libLTO.dll
> ./bin/libRemarks.dll
51d53
< ./bin/LLVM.dll
119d120
< ./bin/LTO.dll
123d123
< ./bin/Remarks.dll
1460a1461
> ./lib/libclang.dll.a
1500,1501c1501
< ./lib/liblibclang.dll.a
< ./lib/libliblldb.dll.a
---
> ./lib/liblldb.dll.a
Sep 11 2020, 3:07 PM · Restricted Project, Restricted Project, Restricted Project
mati865 added inline comments to D87521: [MinGW][llvm-config] Use unversioned library name.
Sep 11 2020, 1:16 PM · Restricted Project
mati865 added a comment to D87517: [MinGW] Use lib prefix for libraries.

I haven't tried BUILD_SHARED_LIBS=TRUE TBH.

Sep 11 2020, 1:06 PM · Restricted Project, Restricted Project, Restricted Project
mati865 updated the summary of D87547: [MinGW][clang-shlib] Build by default on MinGW.
Sep 11 2020, 12:59 PM · Restricted Project
mati865 requested review of D87547: [MinGW][clang-shlib] Build by default on MinGW.
Sep 11 2020, 12:59 PM · Restricted Project
mati865 requested review of D87539: [MinGW][libclang] Allow simultaneous shared and static lib.
Sep 11 2020, 12:05 PM · Restricted Project
mati865 updated the summary of D87524: [Windows][Polly] Disable LLVMPolly module for all compilers on Windows.
Sep 11 2020, 9:53 AM · Restricted Project, Restricted Project
mati865 requested review of D87524: [Windows][Polly] Disable LLVMPolly module for all compilers on Windows.
Sep 11 2020, 9:52 AM · Restricted Project, Restricted Project
mati865 requested review of D87521: [MinGW][llvm-config] Use unversioned library name.
Sep 11 2020, 9:16 AM · Restricted Project
mati865 updated the diff for D87517: [MinGW] Use lib prefix for libraries.

Also adjusted llvm-config.

Sep 11 2020, 8:10 AM · Restricted Project, Restricted Project, Restricted Project
mati865 updated the summary of D87517: [MinGW] Use lib prefix for libraries.
Sep 11 2020, 7:57 AM · Restricted Project, Restricted Project, Restricted Project
mati865 requested review of D87517: [MinGW] Use lib prefix for libraries.
Sep 11 2020, 7:57 AM · Restricted Project, Restricted Project, Restricted Project
mati865 updated the diff for D87418: [LLD] Allow configuring default ld.lld backend.

Updated the diff.

Sep 11 2020, 3:54 AM · Restricted Project, lld

Sep 10 2020

mati865 added a comment to D87418: [LLD] Allow configuring default ld.lld backend.

How widespread are these build systems that parse help output? (Given that it took until now to discover them, I'd venture "not very".)

Sep 10 2020, 2:39 PM · Restricted Project, lld
mati865 updated the diff for D87418: [LLD] Allow configuring default ld.lld backend.
Sep 10 2020, 12:12 PM · Restricted Project, lld
mati865 added a comment to D87418: [LLD] Allow configuring default ld.lld backend.

Thanks for the explanation.

Sep 10 2020, 12:11 PM · Restricted Project, lld
mati865 updated the diff for D87418: [LLD] Allow configuring default ld.lld backend.
Sep 10 2020, 12:11 PM · Restricted Project, lld
mati865 added inline comments to D87418: [LLD] Allow configuring default ld.lld backend.
Sep 10 2020, 9:39 AM · Restricted Project, lld
mati865 updated the diff for D87418: [LLD] Allow configuring default ld.lld backend.
Sep 10 2020, 7:52 AM · Restricted Project, lld
mati865 added inline comments to D87418: [LLD] Allow configuring default ld.lld backend.
Sep 10 2020, 3:10 AM · Restricted Project, lld

Sep 9 2020

mati865 updated the summary of D87418: [LLD] Allow configuring default ld.lld backend.
Sep 9 2020, 2:58 PM · Restricted Project, lld
mati865 added a reviewer for D87418: [LLD] Allow configuring default ld.lld backend: lld.
Sep 9 2020, 2:57 PM · Restricted Project, lld
mati865 requested review of D87418: [LLD] Allow configuring default ld.lld backend.
Sep 9 2020, 2:56 PM · Restricted Project, lld

Aug 27 2020

mati865 added a comment to D86521: Revert "Use find_library for ncurses".

FYI this doesn't fully fix MinGW issue:

$ cat tools/llvm-config/BuildVariables.inc | grep LLVM_SYSTEM_LIBS
#define LLVM_SYSTEM_LIBS "-lpsapi -lshell32 -lole32 -luuid -ladvapi32 -lz.dll"

It's because libraries are found by their import library which is libz.dll.a in this case.
libz.dll.a matches if in line 213 and gets stripped to z.dll which doesn't match shared library regex lib.*\.dll.

Aug 27 2020, 8:52 AM · Restricted Project, Restricted Project, Restricted Project

Aug 26 2020

mati865 accepted D86654: [LLD] [MinGW] Enable dynamicbase by default.

This really should have been the default for years but it didn't work properly with ld.bfd: https://github.com/msys2/MINGW-packages/issues/6674
Since it already work good with COFF backend when targeting MSVC I'm strongly in favour of enabling it for MinGW as well.

Aug 26 2020, 2:57 PM · Restricted Project
mati865 added a comment to D86552: [OpenMP] Fix import library installation with MinGW.

I don't have write permission, could somebody commit it for me?
Thanks in advance.

Aug 26 2020, 11:21 AM · Restricted Project

Aug 25 2020

mati865 added a comment to D85210: [OpenMP] Don't use MSVC workaround with MinGW.

@mstorsjo @hans I apologize but we will have to backport https://reviews.llvm.org/D86552 (should affect only MinGW so it's rather low risk) or revert this cherry-pick on LLVM 11 branch.

Aug 25 2020, 10:35 AM · Restricted Project
mati865 requested review of D86552: [OpenMP] Fix import library installation with MinGW.
Aug 25 2020, 10:24 AM · Restricted Project
mati865 requested review of D86512: [LLD][MinGW] Handle allow-multiple-definition flag.
Aug 25 2020, 1:42 AM · lld, Restricted Project
mati865 requested review of D86509: [LLD][MinGW] Cleanup Options.td file.
Aug 25 2020, 12:40 AM · Restricted Project, lld
mati865 updated the diff for D85195: Add Z3 to system libraries list if enabled.

Indeed, hardcoding z3 was stupid oversight from my side.

Aug 25 2020, 12:19 AM · Restricted Project

Aug 24 2020

mati865 added a comment to D86448: [OpenMP] Check if `_MSC_VER` is defined before using it.

Could you commit it for me please? I don't have write permission to the repo.

Aug 24 2020, 7:08 AM · Restricted Project
mati865 added a comment to D85195: Add Z3 to system libraries list if enabled.

Could you commit it for me please? I don't have write permission to the repo.

Aug 24 2020, 5:25 AM · Restricted Project
mati865 updated the diff for D85195: Add Z3 to system libraries list if enabled.

Updated the diff.

Aug 24 2020, 5:21 AM · Restricted Project
mati865 requested review of D86448: [OpenMP] Check if `_MSC_VER` is defined before using it.
Aug 24 2020, 5:15 AM · Restricted Project
mati865 updated the summary of D86405: [Compiler-RT] Fix profiler building with MinGW GCC.
Aug 24 2020, 5:08 AM · Restricted Project
mati865 updated the diff for D86405: [Compiler-RT] Fix profiler building with MinGW GCC.

Updated diff to remove _MSC_VER change.

Aug 24 2020, 4:59 AM · Restricted Project
mati865 accepted D86434: Fix ncurses/zlib in LLVM_SYSTEM_LIBS for Windows GNU.

Thank you, now it works as expected:

$ cat tools/llvm-config/BuildVariables.inc | grep LLVM_SYSTEM_LIBS
#define LLVM_SYSTEM_LIBS "-lpsapi -lshell32 -lole32 -luuid -ladvapi32 -lz"
Aug 24 2020, 1:51 AM · Restricted Project
mati865 added a comment to D86405: [Compiler-RT] Fix profiler building with MinGW GCC.

Only if weak works properly with GCC as well.

Aug 24 2020, 12:18 AM · Restricted Project

Aug 23 2020

mati865 planned changes to D85195: Add Z3 to system libraries list if enabled.

I'll update it soon.

Aug 23 2020, 4:04 PM · Restricted Project
mati865 added a comment to D79219: [CMake] Simplify CMake handling for zlib.

@phosek

Looks like that's an issue introduced by D86134 or D86245.

Indeed, I apologize for bothering you. Should I move the discussion to one of patches created by @haampie?

Aug 23 2020, 4:04 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project

Aug 22 2020

mati865 added a comment to D86405: [Compiler-RT] Fix profiler building with MinGW GCC.

I was using Clang 10 during tests. I can repeat it with Clang 11 tomorrow/next week if you want.

Aug 22 2020, 2:40 PM · Restricted Project
mati865 added a comment to D86405: [Compiler-RT] Fix profiler building with MinGW GCC.

Regarding __attribute__((weak)) it should work fine in Clang 11 now

Aug 22 2020, 2:39 PM · Restricted Project
mati865 retitled D86405: [Compiler-RT] Fix profiler building with MinGW GCC from [Compiler-RT] Fix building with MinGW GCC to [Compiler-RT] Fix profiler building with MinGW GCC.
Aug 22 2020, 1:11 PM · Restricted Project
mati865 requested review of D86405: [Compiler-RT] Fix profiler building with MinGW GCC.
Aug 22 2020, 1:11 PM · Restricted Project
mati865 added a comment to D79219: [CMake] Simplify CMake handling for zlib.

@phosek in MSYS2 (targeting x86_64-w64-windows-gnu) Zlib works properly for LLVM 10 but with master I'm now seeing:

-- Constructing LLVMBuild project information
-- DEBUG zlib_library=D:/msys64/mingw64/lib/libz.dll.a
CMake Error at lib/Support/CMakeLists.txt:9 (string):
  string sub-command REGEX, mode REPLACE: regex "^(lib|)" matched an empty
  string.
Call Stack (most recent call first):
  lib/Support/CMakeLists.txt:226 (get_system_libname)

-- DEBUG zlib_library=D:/msys64/mingw64/lib/libz.dll.a was printed by my change to help debugging it.
FYI zlib_library is set here: https://github.com/llvm/llvm-project/blob/8e06bf6b3a2e8d25e56cd52dca0cf3ff1b37b5d1/llvm/lib/Support/CMakeLists.txt#L218

Aug 22 2020, 8:39 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project

Aug 4 2020

mati865 added a comment to D85210: [OpenMP] Don't use MSVC workaround with MinGW.

Thank you!

Aug 4 2020, 9:05 AM · Restricted Project
mati865 added a comment to D85210: [OpenMP] Don't use MSVC workaround with MinGW.

At MSYS2 we are using older revision of this patch: https://github.com/msys2/MINGW-packages/commit/e071f276d31a8d214c2f30530eb9ac3ed44fffc7#diff-7f8e056c3dca04423132b5e4e1d36813

Aug 4 2020, 8:18 AM · Restricted Project
mati865 added a comment to D85210: [OpenMP] Don't use MSVC workaround with MinGW.

Little background:
Recent CMake versions changed behaviour on MinGW and treat .a as static libs only. Currently CMake creates omp.a as the import library and new CMake doesn't like that.

Aug 4 2020, 7:58 AM · Restricted Project
mati865 added a reviewer for D81776: [OpenMP] support build on msys2/mingw with clang or gcc: mstorsjo.
Aug 4 2020, 7:19 AM · Restricted Project, Restricted Project
mati865 requested review of D85210: [OpenMP] Don't use MSVC workaround with MinGW.
Aug 4 2020, 7:12 AM · Restricted Project
mati865 requested review of D85195: Add Z3 to system libraries list if enabled.
Aug 4 2020, 5:19 AM · Restricted Project

Jun 23 2020

mati865 abandoned D79999: [lldb] [Windows] Provide vasprintf only for MSVC.
Jun 23 2020, 10:10 AM · Restricted Project

Jun 3 2020

mati865 added a comment to D80876: [clang] Default to windows response files when running on windows.

I don't have strong opinion here as I don't know this topic well (things just worked so far).
That said if Clang stops working as a drop-in replacement for GCC with commonly used build systems, MSYS2 will have to carry one more patch to bring back old behaviour.

Jun 3 2020, 3:48 AM · Restricted Project

Jun 1 2020

mati865 added a comment to D80880: [clang] [MinGW] Link kernel32 once after the last instance of msvcrt.

Thanks, sounds good.

Jun 1 2020, 6:55 AM · Restricted Project
mati865 accepted D80880: [clang] [MinGW] Link kernel32 once after the last instance of msvcrt.

I don't know why AddLibGCC has to be called twice but that doesn't really matter for this diff.

Jun 1 2020, 5:51 AM · Restricted Project
mati865 added a comment to D80880: [clang] [MinGW] Link kernel32 once after the last instance of msvcrt.

Wouldn't it better fit in AddLibGCC?

Jun 1 2020, 4:46 AM · Restricted Project

May 28 2020

mati865 added a comment to D79995: [clang] [MinGW] Fix libunwind extension.

No worries.
Mateusz Mikuła <mati865@gmail.com>

May 28 2020, 3:25 PM · Restricted Project
mati865 updated the diff for D79995: [clang] [MinGW] Fix libunwind extension.
May 28 2020, 2:19 PM · Restricted Project
mati865 updated the diff for D79995: [clang] [MinGW] Fix libunwind extension.

Added test.

May 28 2020, 2:18 PM · Restricted Project

May 26 2020

mati865 added a comment to D79995: [clang] [MinGW] Fix libunwind extension.

@mstorsjo @rnk will be away since June

May 26 2020, 3:11 AM · Restricted Project

May 24 2020

mati865 accepted D80493: [CMake]: Properly handle the LTO cache arguments for MinGW.
May 24 2020, 2:24 PM · Restricted Project
mati865 added inline comments to D80493: [CMake]: Properly handle the LTO cache arguments for MinGW.
May 24 2020, 12:16 PM · Restricted Project

May 23 2020

mati865 added inline comments to D80425: Fix LLVM/Clang builds with mingw toolchain.
May 23 2020, 2:19 PM · Restricted Project, Restricted Project
mati865 added inline comments to D80425: Fix LLVM/Clang builds with mingw toolchain.
May 23 2020, 5:15 AM · Restricted Project, Restricted Project

May 22 2020

mati865 added inline comments to D80425: Fix LLVM/Clang builds with mingw toolchain.
May 22 2020, 8:34 AM · Restricted Project, Restricted Project

May 15 2020

mati865 updated the diff for D79999: [lldb] [Windows] Provide vasprintf only for MSVC.

With _GNU_SOURCE removed I was able to successfully build everything without this diff.
I cannot test it today but I believe this updated diff would have fixed the error.

May 15 2020, 2:10 PM · Restricted Project
mati865 added a comment to D79999: [lldb] [Windows] Provide vasprintf only for MSVC.

Indeed, I'll see if I can build all LLVM related packages without _GNU_SOURCE. Otherwise I'll guard it with #ifndef _GNU_SOURCE instead.

May 15 2020, 11:57 AM · Restricted Project