[PATCH] D84380: [lit] Support running tests on Windows without GnuWin32.

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 3 13:49:49 PDT 2020


zturner added a comment.

I went ahead and committed this.  Let's see if I break anything, it's been a long time since I've committed a patch and I haven't committed anything since the git switchover :D



================
Comment at: llvm/utils/lit/lit/llvm/config.py:131
+        masks = [winreg.KEY_WOW64_32KEY, winreg.KEY_WOW64_64KEY]
+        hives = [winreg.HKEY_LOCAL_MACHINE, winreg.HKEY_CURRENT_USER]
+        for mask, hive in itertools.product(masks, hives):
----------------
amccarth wrote:
> zturner wrote:
> > amccarth wrote:
> > > I'd probably switch these to check HKCU first, as that's the one that would usually take precedence, and it's also the one the user has easier control over (if they decide to install Git).
> > I've left this as is.  On my local installation, which I installed using all defaults and without explicitly trying to elevate when double clicking the installer, It's under HKLM.  
> tl;dr:  Not a big deal, since this would be rare and unusual.
> 
> In the rare case that one version is installed for all users (HKLM), but another version is installed for this user (HKCU), then ideally the HKCU version would be selected.  Searching HKLM won't.
> 
> (If you managed to install to HKLM, then the installer process was running as Administrator.  Maybe you kicked it off from an already-elevated command console.)
Ok, you convinced me.  I switched the order to check HKCU first.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84380/new/

https://reviews.llvm.org/D84380



More information about the llvm-commits mailing list