upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tools/mc_command.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mc_command.py')
-rw-r--r--tools/mc_command.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/mc_command.py b/tools/mc_command.py
index 762008d7a..17fde8437 100644
--- a/tools/mc_command.py
+++ b/tools/mc_command.py
@@ -4,7 +4,7 @@ LLVM_MC may be one executable (a path, spaces and all, with or without its .exe)
4needs the command-line form when llvm-mc runs inside WSL, because the official Windows LLVM build has no AMDGPU 4needs the command-line form when llvm-mc runs inside WSL, because the official Windows LLVM build has no AMDGPU
5target: 5target:
6 6
7 set LLVM_MC=wsl -d Ubuntu -e /usr/lib/llvm-21/bin/llvm-mc 7 set LLVM_MC=wsl -d Ubuntu -e /usr/lib/llvm-23/bin/llvm-mc
8 8
9On Windows, arguments follow the MSVC C runtime's quoting rules. Double a trailing backslash in a quoted 9On Windows, arguments follow the MSVC C runtime's quoting rules. Double a trailing backslash in a quoted
10argument before the closing quote. 10argument before the closing quote.
@@ -116,7 +116,7 @@ def default_command() -> str:
116 116
117 117
118def mc_command(raw: str | None = None) -> list: 118def mc_command(raw: str | None = None) -> list:
119 """LLVM_MC is a path, or a command line: 'wsl -d Ubuntu -e /usr/lib/llvm-21/bin/llvm-mc'. Unset or empty, 119 """LLVM_MC is a path, or a command line: 'wsl -d Ubuntu -e /usr/lib/llvm-23/bin/llvm-mc'. Unset or empty,
120 default_command().""" 120 default_command()."""
121 if raw is None: 121 if raw is None:
122 raw = os.environ.get("LLVM_MC", "") 122 raw = os.environ.get("LLVM_MC", "")
@@ -127,14 +127,14 @@ def install_hint() -> str:
127 """Where to get an llvm-mc with the AMDGPU target on this OS, for the messages that report a missing one.""" 127 """Where to get an llvm-mc with the AMDGPU target on this OS, for the messages that report a missing one."""
128 if os.name == "nt": 128 if os.name == "nt":
129 return ("The official Windows LLVM build has no AMDGPU target: build a native one with " 129 return ("The official Windows LLVM build has no AMDGPU target: build a native one with "
130 "scripts\\build_llvm_mc.ps1 (it sets LLVM_MC), or install llvm-21 in WSL and set LLVM_MC to the " 130 "scripts\\build_llvm_mc.ps1 (it sets LLVM_MC), or install llvm-23 in WSL and set LLVM_MC to the "
131 "whole command, e.g.\n LLVM_MC=wsl -d Ubuntu -e /usr/lib/llvm-21/bin/llvm-mc") 131 "whole command, e.g.\n LLVM_MC=wsl -d Ubuntu -e /usr/lib/llvm-23/bin/llvm-mc")
132 if sys.platform == "darwin": 132 if sys.platform == "darwin":
133 return ("Homebrew's llvm has the AMDGPU target but is keg-only (not on PATH): brew install llvm, then\n" 133 return ("Homebrew's llvm has the AMDGPU target but is keg-only (not on PATH): brew install llvm, then\n"
134 " LLVM_MC=\"$(brew --prefix llvm)/bin/llvm-mc\"") 134 " LLVM_MC=\"$(brew --prefix llvm)/bin/llvm-mc\"")
135 return ("Distribution LLVM packages include the AMDGPU target: on Debian or Ubuntu, sudo apt install llvm-21\n" 135 return ("Distribution LLVM packages include the AMDGPU target: on Debian or Ubuntu, sudo apt install llvm-23\n"
136 "(found as /usr/lib/llvm-21/bin/llvm-mc without further setup); elsewhere install your distribution's\n" 136 "(found as /usr/lib/llvm-23/bin/llvm-mc without further setup); elsewhere install your distribution's\n"
137 "LLVM 21+ package and put llvm-mc on PATH, or set LLVM_MC=/path/to/llvm-mc") 137 "LLVM 23+ package and put llvm-mc on PATH, or set LLVM_MC=/path/to/llvm-mc")
138 138
139 139
140def not_found(exe: str, error: OSError, flag: str | None = None) -> str: 140def not_found(exe: str, error: OSError, flag: str | None = None) -> str: