Page MenuHomePhabricator

mstorsjo (Martin Storsjö)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 25 2016, 12:54 PM (309 w, 3 d)

Recent Activity

Tue, Jun 28

mstorsjo added a comment to D128678: [LLDB] Add PDB/calling-conventions.test for Arm/Windows.

Thanks, this looks more complete and consistent to me now!

Tue, Jun 28, 1:16 PM · Restricted Project, Restricted Project
mstorsjo added a comment to D128268: [lldb] Fix reading i686-windows executables with GNU environment.

The odd thing about the second one is the added hardcoded AddArch(ArchSpec("i686-pc-windows")); and AddArch(ArchSpec("i386-pc-windows")); at the top of PlatformWindows.cpp.

Anyway, it does seem to work fine in my quick test to get rid of this duality, so I'll post a patch that does that.

I think those hardcoded lines are there precisely because of the duality (i.e. wanting to support both i386 and i686 regardless of what the host layer reports).

Tue, Jun 28, 1:12 PM · Restricted Project, Restricted Project

Mon, Jun 27

mstorsjo added a comment to D128678: [LLDB] Add PDB/calling-conventions.test for Arm/Windows.

There's consistent typos about the test name in the commit subject and description.

Mon, Jun 27, 1:22 PM · Restricted Project, Restricted Project
mstorsjo accepted D128668: [LLDB] Fix PDB/pointers.test for 32bit Arm/Windows.
Mon, Jun 27, 1:20 PM · Restricted Project, Restricted Project
mstorsjo added a comment to D128560: An upcoming patch to LLDB will require the ability to decode base64. This patch adds support for decoding base64 and adds tests..

FWIW, llvm/lib/Object/COFFObjectFile.cpp also contains a decodeBase64StringEntry function that probably should be refactored into using this, if we make a more proper toplevel API for it.

Mon, Jun 27, 11:50 AM · Restricted Project, Restricted Project
mstorsjo added a comment to D128668: [LLDB] Fix PDB/pointers.test for 32bit Arm/Windows.

I presume this is ok - if the main intent of this test is to test handling of pointers and the size thereof in PDBs.

Mon, Jun 27, 11:44 AM · Restricted Project, Restricted Project
mstorsjo added a comment to D128600: [libc++][mingw] Remove setlocale from snprintf_l.

I guess the more complete/proper way forward would make a mingw-w64 specific implementation of these (or some similar) functions too, if __USE_MINGW_ANSI_STDIO is set to 1. (No idea offhand how hard that would be though...)

Hypothetically, if this means implementing custom formatting routines, wouldn't it be better to just use the same implementation for both msvc and mingw-w64?

Mon, Jun 27, 3:37 AM · Restricted Project, Restricted Project

Sun, Jun 26

mstorsjo requested review of D128617: [lldb] Stop passing both i386 and i686 in parallel as architectures on Windows.
Sun, Jun 26, 2:05 PM · Restricted Project, Restricted Project
mstorsjo added a comment to D128268: [lldb] Fix reading i686-windows executables with GNU environment.

I found that this duality was introduced in 5e6f45201f0b62c1e7a24fc396f3ea6e10dc880d / D7120 and ad587ae4ca143d388c0ec4ef2faa1b5eddedbf67 / D4658 (CC @zturner), what do you make out of the reasonings in those commits?

The first patch seems like it's just working around some mismatches in the windows dynamic loader plugin. I think a better approach would be to have the dynamic loader claim both architectures, though I don't think that is necessary if we're just consistent about what we use. I don't see anything wrong with the second patch (the darwin platform does something similar for arm architectures, even though I'm not convinced it's necessary (the reason it's necessary for darwin is because there they actually make a distinction between armv6XX and armv7YY and treat those as different architectures).

Sun, Jun 26, 2:00 PM · Restricted Project, Restricted Project
mstorsjo added a comment to D128600: [libc++][mingw] Remove setlocale from snprintf_l.

long double is an issue though...

Sun, Jun 26, 1:45 PM · Restricted Project, Restricted Project

Fri, Jun 24

mstorsjo added a comment to D128410: [lldb] Add a testcase for nested exceptions on Windows.

It may be possible to stuff a pointer to an EXCEPTION_RECORD into another EXCEPTION_RECORD and use RtlRaiseException to generate the exception, but you'll have to test how it actually works.

That would be pretty cool.

Fri, Jun 24, 1:08 PM · Restricted Project, Restricted Project

Thu, Jun 23

mstorsjo committed rG9f1d90bf9157: [compiler-rt] Fix false positive detection of a target in compile-only mode (authored by skosukhin).
[compiler-rt] Fix false positive detection of a target in compile-only mode
Thu, Jun 23, 5:13 AM · Restricted Project, Restricted Project
mstorsjo closed D127975: [compiler-rt] Fix false positive detection of a target in compile-only mode.
Thu, Jun 23, 5:12 AM · Restricted Project, Restricted Project
mstorsjo updated subscribers of D128268: [lldb] Fix reading i686-windows executables with GNU environment.

If we'd just set this to the baseline, i386, would that have any effect for how lldb e.g. is able to disassemble/interpret instructions that don't exist in the i386 baseline architecture?

It should not have any effect (if it does, that's a separate fix). In the disassembler, we explicitly enable the latest instruction set, and I can't think of anything else that would be impacted by it.

Thu, Jun 23, 4:52 AM · Restricted Project, Restricted Project
mstorsjo added a comment to D128410: [lldb] Add a testcase for nested exceptions on Windows.

I'm not all that familiar with exactly what happens in these APIs here that makes this a nested exception and what other non-GUI APIs would produce the same effect. Maybe any API where Windows system code calls back to a user provided callback? Does @stella.stamenova know?

Thu, Jun 23, 3:55 AM · Restricted Project, Restricted Project
mstorsjo added inline comments to D128410: [lldb] Add a testcase for nested exceptions on Windows.
Thu, Jun 23, 2:42 AM · Restricted Project, Restricted Project
mstorsjo updated subscribers of D128410: [lldb] Add a testcase for nested exceptions on Windows.

For this testcase to work, it needs to be able to open a window - so it can't run entirely in headless mode. But I guess that a bunch of other tests in LLDB also already do that, since running the LLDB tests on Windows pops up a dozen of windows temporarily.

I think those just come from the tests (or more like test runners) which forget to suppress a console window from opening (see LLDB_LAUNCH_INFERIORS_WITHOUT_CONSOLE) -- this is probably the first "gui" application. This isn't necessarily a showstopper, but I am surprised that it is necessary. I'm hardly a windows expert, but I would expect that it should be possible to generate an exception (even nested exception, which to me sounds like the equivalent of getting a signal inside a signal handler) in a "regular" text-mode application. Are you sure that is not possible?

Thu, Jun 23, 2:11 AM · Restricted Project, Restricted Project
mstorsjo added a comment to D128268: [lldb] Fix reading i686-windows executables with GNU environment.

As a separate path forward, one could also consider to stop returning
two architecture specs from ObjectFilePECOFF::GetModuleSpecifications
for i386 files.

I think that would be much more preferable. I think the current implementation GetModuleSpecifications is based on a misconception about what the multiple results of that function mean (a fat binary -- as you've discovered).

We wouldn't want to return armv6-*-* (or armv7, v8, ...) for a file that claims it can be run on armv5. Elf files also return just a single result for i386 file.

Thu, Jun 23, 2:03 AM · Restricted Project, Restricted Project
mstorsjo added a comment to D128410: [lldb] Add a testcase for nested exceptions on Windows.

For this testcase to work, it needs to be able to open a window - so it can't run entirely in headless mode. But I guess that a bunch of other tests in LLDB also already do that, since running the LLDB tests on Windows pops up a dozen of windows temporarily.

Thu, Jun 23, 1:51 AM · Restricted Project, Restricted Project
mstorsjo requested review of D128410: [lldb] Add a testcase for nested exceptions on Windows.
Thu, Jun 23, 1:48 AM · Restricted Project, Restricted Project
mstorsjo added a comment to D128268: [lldb] Fix reading i686-windows executables with GNU environment.

As a separate path forward, one could also consider to stop returning
two architecture specs from ObjectFilePECOFF::GetModuleSpecifications
for i386 files.

I think that would be much more preferable. I think the current implementation GetModuleSpecifications is based on a misconception about what the multiple results of that function mean (a fat binary -- as you've discovered).

We wouldn't want to return armv6-*-* (or armv7, v8, ...) for a file that claims it can be run on armv5. Elf files also return just a single result for i386 file.

Thu, Jun 23, 1:05 AM · Restricted Project, Restricted Project

Wed, Jun 22

mstorsjo updated subscribers of D126513: Add -b (--continue-to-breakpoint) option to the "process continue" command.

I think this might have broken a bunch of testcases on the lldb-x64-windows-ninja buildbot too, e.g. https://lab.llvm.org/buildbot/#/builders/83/builds/20304 (CC @stella.stamenova)

Wed, Jun 22, 11:15 AM · Restricted Project, Restricted Project
mstorsjo added a comment to D127436: [lldb] Resolve exe location for `target create`.
Wed, Jun 22, 11:13 AM · Restricted Project, Restricted Project
mstorsjo committed rGa1ee0b947d46: [lldb] Second attempt at fixing command-target-create-resolve-exe.test on the… (authored by alvinhochun).
[lldb] Second attempt at fixing command-target-create-resolve-exe.test on the…
Wed, Jun 22, 10:49 AM · Restricted Project
mstorsjo added a comment to D127436: [lldb] Resolve exe location for `target create`.
Wed, Jun 22, 10:08 AM · Restricted Project, Restricted Project
mstorsjo committed rG0bc7105cd144: [lldb] Tentative attempt to fix command-target-create-resolve-exe.test on… (authored by mstorsjo).
[lldb] Tentative attempt to fix command-target-create-resolve-exe.test on…
Wed, Jun 22, 8:49 AM · Restricted Project
mstorsjo committed rG3c867898c7be: [lldb] Add setting to override PE/COFF ABI by module name (authored by alvinhochun).
[lldb] Add setting to override PE/COFF ABI by module name
Wed, Jun 22, 7:17 AM · Restricted Project
mstorsjo committed rG4d123783957e: [lldb][windows] Fix crash on getting nested exception (authored by alvinhochun).
[lldb][windows] Fix crash on getting nested exception
Wed, Jun 22, 7:17 AM · Restricted Project
mstorsjo committed rG2bae95605753: [lldb] Resolve exe location for `target create` (authored by alvinhochun).
[lldb] Resolve exe location for `target create`
Wed, Jun 22, 7:17 AM · Restricted Project
mstorsjo committed rG8a64dd5b0614: [lldb] Fix reading i686-windows executables with GNU environment (authored by mstorsjo).
[lldb] Fix reading i686-windows executables with GNU environment
Wed, Jun 22, 7:17 AM · Restricted Project
mstorsjo closed D127234: [lldb] Add setting to override PE/COFF ABI by module name.
Wed, Jun 22, 7:17 AM · Restricted Project, Restricted Project
mstorsjo closed D128201: [lldb][windows] Fix crash on getting nested exception.
Wed, Jun 22, 7:17 AM · Restricted Project, Restricted Project
mstorsjo closed D127436: [lldb] Resolve exe location for `target create`.
Wed, Jun 22, 7:17 AM · Restricted Project, Restricted Project
mstorsjo closed D128268: [lldb] Fix reading i686-windows executables with GNU environment.
Wed, Jun 22, 7:17 AM · Restricted Project, Restricted Project
mstorsjo committed rG9846a1f2d472: [lldb] Remove an outdated comment. NFC. (authored by mstorsjo).
[lldb] Remove an outdated comment. NFC.
Wed, Jun 22, 6:12 AM · Restricted Project
mstorsjo closed D128226: [lldb] Remove an outdated comment. NFC..
Wed, Jun 22, 6:12 AM · Restricted Project, Restricted Project
mstorsjo accepted D127975: [compiler-rt] Fix false positive detection of a target in compile-only mode.

Thanks, this looks reasonable to me!

Wed, Jun 22, 6:11 AM · Restricted Project, Restricted Project
mstorsjo updated the diff for D128268: [lldb] Fix reading i686-windows executables with GNU environment.

Refactored the code to add the both_windows variable as suggested (which turned out much nicer, thanks!).

Wed, Jun 22, 2:36 AM · Restricted Project, Restricted Project
mstorsjo added a comment to D128268: [lldb] Fix reading i686-windows executables with GNU environment.

LGTM. I like the ifs the way I suggested but up to you, either way it's not the easiest logic to parse.

Wed, Jun 22, 2:14 AM · Restricted Project, Restricted Project

Tue, Jun 21

mstorsjo committed rG93010544a813: [CMake] Don't pass CMAKE_C(XX)_COMPILER to the nested NATIVE build when cross… (authored by mstorsjo).
[CMake] Don't pass CMAKE_C(XX)_COMPILER to the nested NATIVE build when cross…
Tue, Jun 21, 11:35 PM · Restricted Project, Restricted Project
mstorsjo closed D126313: [CMake] Don't pass CMAKE_C(XX)_COMPILER to the nested NATIVE build.
Tue, Jun 21, 11:34 PM · Restricted Project, Restricted Project
mstorsjo added a comment to D126313: [CMake] Don't pass CMAKE_C(XX)_COMPILER to the nested NATIVE build.

LGTM.

Tue, Jun 21, 12:49 PM · Restricted Project, Restricted Project
mstorsjo updated the diff for D126313: [CMake] Don't pass CMAKE_C(XX)_COMPILER to the nested NATIVE build.

Use elseif (NOT CMAKE_CROSSCOMPILING), skipping the dummy empty initialization.

Tue, Jun 21, 12:42 PM · Restricted Project, Restricted Project
mstorsjo added a comment to D128294: [ADT] [lld-macho] Check for end iterator deref in filter_iterator_base.

oops, no

missing a REQUIRES line

Tue, Jun 21, 12:03 PM · Restricted Project, Restricted Project, Restricted Project
mstorsjo updated the diff for D126313: [CMake] Don't pass CMAKE_C(XX)_COMPILER to the nested NATIVE build.

Keep passing the compiler to the nested cmake when not cross compiling.

Tue, Jun 21, 12:00 PM · Restricted Project, Restricted Project
mstorsjo added a comment to D126313: [CMake] Don't pass CMAKE_C(XX)_COMPILER to the nested NATIVE build.

I think this behavior change should only be made if CMAKE_CROSSCOMPILING=True. There are common cases where people configure LLVM targeting the host using a compiler that isn't the default host compiler (think compiling on Linux using clang). Since the Native toolchain is also used for using optimized tablegen when building a debug configuration, this code isn't strictly for cross-compilation.

Tue, Jun 21, 11:57 AM · Restricted Project, Restricted Project
mstorsjo added a comment to D126313: [CMake] Don't pass CMAKE_C(XX)_COMPILER to the nested NATIVE build.

@phosek - Can you follow up on this one?

Tue, Jun 21, 11:38 AM · Restricted Project, Restricted Project
mstorsjo added inline comments to D128294: [ADT] [lld-macho] Check for end iterator deref in filter_iterator_base.
Tue, Jun 21, 11:31 AM · Restricted Project, Restricted Project, Restricted Project
mstorsjo updated the summary of D128268: [lldb] Fix reading i686-windows executables with GNU environment.
Tue, Jun 21, 9:14 AM · Restricted Project, Restricted Project
mstorsjo updated the diff for D128268: [lldb] Fix reading i686-windows executables with GNU environment.

Added a comment to the testcase.

Tue, Jun 21, 9:13 AM · Restricted Project, Restricted Project
mstorsjo added inline comments to D127975: [compiler-rt] Fix false positive detection of a target in compile-only mode.
Tue, Jun 21, 9:00 AM · Restricted Project, Restricted Project
mstorsjo added a comment to D128268: [lldb] Fix reading i686-windows executables with GNU environment.

However, after this commit, if the object file is advertised with the different environment (either when built in a mingw environment, or if that setting is set), the fat binary validation won't accept the file any longer.

Is "this commit" referring to https://reviews.llvm.org/rG25c8a061c5739677d2fc0af29a8cc9520207b923 or to the change we're reviewing here?

Tue, Jun 21, 7:32 AM · Restricted Project, Restricted Project
mstorsjo requested review of D128268: [lldb] Fix reading i686-windows executables with GNU environment.
Tue, Jun 21, 5:51 AM · Restricted Project, Restricted Project
mstorsjo added a reverting change for rG9ffeaaa0ea54: [LLD] [COFF] Use StringTableBuilder to optimize the string table: rG4d2eda2bb315: Revert "[LLD] [COFF] Use StringTableBuilder to optimize the string table".
Tue, Jun 21, 3:25 AM
mstorsjo committed rG4d2eda2bb315: Revert "[LLD] [COFF] Use StringTableBuilder to optimize the string table" (authored by mstorsjo).
Revert "[LLD] [COFF] Use StringTableBuilder to optimize the string table"
Tue, Jun 21, 3:25 AM · Restricted Project
mstorsjo added a reverting change for D120677: [LLD] [COFF] Use StringTableBuilder to optimize the string table: rG4d2eda2bb315: Revert "[LLD] [COFF] Use StringTableBuilder to optimize the string table".
Tue, Jun 21, 3:25 AM · Restricted Project

Mon, Jun 20

mstorsjo added a comment to D128144: [AArch64] Known bits for AArch64ISD::DUP.

This breaks compilation for me, causing hangs when compiling some source files. Repro with https://martin.st/temp/rdopt-preproc.c, built with clang -target aarch64-w64-mingw32 -w -c -O3 rdopt-preproc.c. Previously this completed in ~5 seconds, now it doesn't terminate.

Mon, Jun 20, 11:32 PM · Restricted Project, Restricted Project
mstorsjo requested review of D128226: [lldb] Remove an outdated comment. NFC..
Mon, Jun 20, 2:23 PM · Restricted Project, Restricted Project
mstorsjo committed rGc9fc4336d4b3: [lldb] Fix building with GCC 7 (authored by mstorsjo).
[lldb] Fix building with GCC 7
Mon, Jun 20, 2:21 PM · Restricted Project
mstorsjo added a comment to D127436: [lldb] Resolve exe location for `target create`.

Does this test look good:

Mon, Jun 20, 10:31 AM · Restricted Project, Restricted Project
mstorsjo accepted D128132: [Support/BLAKE3] Enable the SIMD implementations for macOS universal builds.

This LGTM, it seems to build correctly for me in all my test environments!

Mon, Jun 20, 8:00 AM · Restricted Project, Restricted Project

Fri, Jun 17

mstorsjo added inline comments to D127975: [compiler-rt] Fix false positive detection of a target in compile-only mode.
Fri, Jun 17, 1:43 PM · Restricted Project, Restricted Project
mstorsjo added a comment to D127975: [compiler-rt] Fix false positive detection of a target in compile-only mode.

If the issue is that compiling with -m32 generally seems to work, but fails in practice due to some header missing, perhaps the cmake test should be extended to try compiling a file that includes that header?

Fri, Jun 17, 8:40 AM · Restricted Project, Restricted Project
mstorsjo added a comment to D127975: [compiler-rt] Fix false positive detection of a target in compile-only mode.

If the issue is that compiling with -m32 generally seems to work, but fails in practice due to some header missing, perhaps the cmake test should be extended to try compiling a file that includes that header?

Fri, Jun 17, 8:36 AM · Restricted Project, Restricted Project
mstorsjo accepted D128036: [CMake] Option to select C++ library for runtimes that use it.

LGTM

Fri, Jun 17, 2:20 AM · Restricted Project, Restricted Project, Restricted Project
mstorsjo added inline comments to D128036: [CMake] Option to select C++ library for runtimes that use it.
Fri, Jun 17, 2:06 AM · Restricted Project, Restricted Project, Restricted Project
mstorsjo accepted D126905: [CMake][compiler-rt] Clean up the use of libcxx and libcxxabi.

Looks reasonable!

Fri, Jun 17, 1:31 AM · Restricted Project, Restricted Project
mstorsjo accepted D128035: [CMake] Use explicit header path when using in-tree libc++ for tests.

This looks reasonable to me!

Fri, Jun 17, 1:31 AM · Restricted Project, Restricted Project
mstorsjo added a comment to D128035: [CMake] Use explicit header path when using in-tree libc++ for tests.

(Side question: What's the correct -commits list for discussing compiler-rt patches? They don't get autoassigned any, but probably should, for visibility.)

Fri, Jun 17, 1:17 AM · Restricted Project, Restricted Project
mstorsjo added inline comments to D126291: [flang][Driver] Update link job on windows.
Fri, Jun 17, 1:15 AM · Restricted Project, Restricted Project, Restricted Project

Thu, Jun 16

mstorsjo added a comment to D126291: [flang][Driver] Update link job on windows.

Looks good to me in general, one general question though.

Thu, Jun 16, 2:13 PM · Restricted Project, Restricted Project, Restricted Project

Wed, Jun 15

mstorsjo added a comment to D126676: [clang] Disallow differences in defines used for creating and using PCH.

I don't have a great answer here, but yes, dllexport macro norms sort of run directly counter to the normal ways that people use PCH. It seems like projects will need to have a library module / PCH file for building a DLL and then a PCH / module for consuming the DLL.

Wed, Jun 15, 9:52 PM · Restricted Project, Restricted Project
mstorsjo added inline comments to D126657: [lldb] Fix loading DLL from some ramdisk on Windows.
Wed, Jun 15, 7:20 AM · Restricted Project, Restricted Project
mstorsjo committed rG87a2dba14ec8: [lldb] Fix loading DLL from some ramdisk on Windows (authored by alvinhochun).
[lldb] Fix loading DLL from some ramdisk on Windows
Wed, Jun 15, 7:03 AM · Restricted Project
mstorsjo closed D126657: [lldb] Fix loading DLL from some ramdisk on Windows.
Wed, Jun 15, 7:03 AM · Restricted Project, Restricted Project
mstorsjo committed rGaefa11166f20: [LLD] [MinGW] Implement --disable-reloc-section, mapped to /fixed (authored by mstorsjo).
[LLD] [MinGW] Implement --disable-reloc-section, mapped to /fixed
Wed, Jun 15, 6:52 AM · Restricted Project
mstorsjo committed rGb209b9e11c26: [COFF] Don't reject executables with data directories pointing outside of… (authored by mstorsjo).
[COFF] Don't reject executables with data directories pointing outside of…
Wed, Jun 15, 6:52 AM · Restricted Project, Restricted Project
mstorsjo closed D127478: [LLD] [MinGW] Implement --disable-reloc-section, mapped to /fixed.
Wed, Jun 15, 6:52 AM · Restricted Project, Restricted Project
mstorsjo closed D127345: [COFF] Don't reject executables with data directories pointing outside of provided data.
Wed, Jun 15, 6:52 AM · Restricted Project, Restricted Project

Mon, Jun 13

mstorsjo accepted D115674: [CMake][compiler-rt] Provide a dedicated option for LLVM unwinder.

The changes left in this patch seem fine to me now!

Mon, Jun 13, 11:34 PM · Restricted Project, Restricted Project, Restricted Project
mstorsjo added a reviewer for D127528: [Clang] Let the linker choose shared or static libunwind unless specified: mstorsjo.

LGTM in general, but I'd leave it to the others to formally approve.

Mon, Jun 13, 11:32 PM · Restricted Project, Restricted Project
mstorsjo added a comment to D127345: [COFF] Don't reject executables with data directories pointing outside of provided data.

@rnk - What do you think about this? See the later discussion in D126898.

Mon, Jun 13, 2:10 PM · Restricted Project, Restricted Project
mstorsjo added inline comments to D115674: [CMake][compiler-rt] Provide a dedicated option for LLVM unwinder.
Mon, Jun 13, 1:59 PM · Restricted Project, Restricted Project, Restricted Project
mstorsjo added inline comments to D127645: [docs] Adding table of object file formats.
Mon, Jun 13, 1:40 PM · Restricted Project, Restricted Project
mstorsjo added a comment to D127657: [libc++] Remove mention of official support for FreeBSD.

It’s also worth pointing out that being off this list doesn’t mean that code for the platforms is ripped out - there’s many platforms that are supported on a best effort basis.

Mon, Jun 13, 9:52 AM · Restricted Project, Restricted Project
mstorsjo added a comment to D126291: [flang][Driver] Update link job on windows.

I had the same idea about switching the tests to using target triples instead of having separate files for it, but initially I had some issues getting that to work properly. When specifying a triple, we need to provide an architecture. Leaving the triple as unkown-linux-gnu or just linux-gnu gives us an error along the lines of flang-new: error: unknown target triple 'unknown-unknown-linux-gnu', please use -triple or -arch. OTOH, hardcoding an architecture like x86 or aarch64 fails if we're not building that specific backend.

Mon, Jun 13, 2:16 AM · Restricted Project, Restricted Project, Restricted Project

Sat, Jun 11

mstorsjo added inline comments to D127369: [Object][COFF] Fix section name parsing error when the name field is not null-padded.
Sat, Jun 11, 1:15 AM · Restricted Project, Restricted Project

Fri, Jun 10

mstorsjo added a comment to D126291: [flang][Driver] Update link job on windows.

Ah ok. So instead of having ! REQUIRES: lines, those tests should add -target x86_64-windows-msvc to the flang invocation?

Fri, Jun 10, 10:06 AM · Restricted Project, Restricted Project, Restricted Project
mstorsjo added a comment to D126291: [flang][Driver] Update link job on windows.

FWIW, something very similar was added just a couple days ago in an lldb specific lit.cfg.py: https://reviews.llvm.org/D127048#change-KJ7QgKPHtN1S

Thank you for pointing this out.
Those feature definitions for the lldb subproject probably stem from around here:
https://github.com/llvm/llvm-project/blob/main/lldb/test/Shell/lit.cfg.py#L65

Instead of every subproject adding their own conditions for similar features, would it make sense to move these definitions to somewhere where all subprojects could use those same lit features? Would that be in /llvm/utils/lit/lit/llvm/config.py?

Fri, Jun 10, 9:18 AM · Restricted Project, Restricted Project, Restricted Project
mstorsjo added a comment to D126291: [flang][Driver] Update link job on windows.

Not sure if this is the right place to add this. But maybe something like this could be used to add 'windows-msvc' and 'windows-gnu' features that could be used to run tests conditionally on Windows with MSVC or MinGW toolchains:

diff --git a/llvm/utils/lit/lit/llvm/config.py b/llvm/utils/lit/lit/llvm/config.py
index b65316128146..8b911997a876 100644
--- a/llvm/utils/lit/lit/llvm/config.py
+++ b/llvm/utils/lit/lit/llvm/config.py
@@ -134,6 +134,10 @@ class LLVMConfig(object):
                 features.add('target-aarch64')
             elif re.match(r'^arm.*', target_triple):
                 features.add('target-arm')
+            if re.match(r'.*-windows-msvc', target_triple):
+                features.add('windows-msvc')
+            elif re.match(r'.*-windows-gnu', target_triple):
+                features.add('windows-gnu')
 
         use_gmalloc = lit_config.params.get('use_gmalloc', None)
         if lit.util.pythonize_bool(use_gmalloc):`
Fri, Jun 10, 8:37 AM · Restricted Project, Restricted Project, Restricted Project
mstorsjo added inline comments to D126291: [flang][Driver] Update link job on windows.
Fri, Jun 10, 2:42 AM · Restricted Project, Restricted Project, Restricted Project
mstorsjo requested review of D127478: [LLD] [MinGW] Implement --disable-reloc-section, mapped to /fixed.
Fri, Jun 10, 1:00 AM · Restricted Project, Restricted Project
mstorsjo added a comment to D126898: [COFF] Check table ptr more thoroughly and ignore empty sections.

So, looking a little bit deeper, the resource editor in NSIS doesn't handle relocations, and the .reloc section is right after the .rsrc section that the resource editor will grow... So they actually have a build rule to pass /FIXED to link.exe when building their stubs with MSVC. I suppose mingw-binutils defaults to non-relocatable .exes (because the problem doesn't appear when building with mingw-gcc/mingw-binutils), and we only end up with relocatable .exes because we're building with mingw-clang/lld and lld defaults to relocatable .exes.

Fri, Jun 10, 12:48 AM · Restricted Project, Restricted Project
mstorsjo added a comment to D123408: [InstCombine] Limit folding of cast into PHI.

Oh nevermind, please ignore above comment, I see what you are saying now! That we can add a transformation which can convert:

Right - see if the motivating example looks better with:
afa192cfb604

Fri, Jun 10, 12:05 AM · Restricted Project, Restricted Project

Thu, Jun 9

mstorsjo added a comment to D126898: [COFF] Check table ptr more thoroughly and ignore empty sections.

The base relocation table usually resides in the .reloc section, and as the exact size (0xB68) matches, it looks like it just has got the wrong RVA in the header. With the new, more thorough checks, libObject notices that the RVA points into the .ndata section (within 0x40000 - 0x5C000) but there's only raw data covering 0x40000 - 0x40200, and 0x43000 is outside of that. Previously we'd just set up a pointer into bogus/out of range data in these cases, now we error out.

From a cursory look, it seems to come from NSIS itself not handing BaseRelocationTableRVA. Its prebuild binaries come with stubs that actually have it set to 0 and thus don't have a .reloc section. The stubs we're using in the case of that helper.exe were compiled with mingw-clang and linked with mingw-lld, and do contain a .reloc section. The helper.exe binary ends up having the same BaseRelocationTableRVA as the stub, but NSIS moved the .reloc section, so it's not correct anymore.

Thu, Jun 9, 9:18 PM · Restricted Project, Restricted Project
mstorsjo committed rG25c8a061c573: [lldb] Set COFF module ABI from default triple and make it an option (authored by alvinhochun).
[lldb] Set COFF module ABI from default triple and make it an option
Thu, Jun 9, 12:44 PM · Restricted Project
mstorsjo closed D127048: [lldb] Set COFF module ABI from default triple and make it an option.
Thu, Jun 9, 12:44 PM · Restricted Project, Restricted Project
mstorsjo added a reviewer for D127436: [lldb] Resolve exe location for `target create`: omjavaid.
Thu, Jun 9, 12:40 PM · Restricted Project, Restricted Project
mstorsjo committed rG9617ffce0d37: [LLD] [ELF] Add parentheses to silence a GCC warning. NFC. (authored by mstorsjo).
[LLD] [ELF] Add parentheses to silence a GCC warning. NFC.
Thu, Jun 9, 12:32 PM · Restricted Project
mstorsjo committed rG8ab2c384b8ad: [libcxx] [doc] Add a release note for distributors about MinGW builds and… (authored by mstorsjo).
[libcxx] [doc] Add a release note for distributors about MinGW builds and…
Thu, Jun 9, 12:32 PM · Restricted Project, Restricted Project