This is the tinycc repo. When compiling a C program using tinycc, does it automatically find the include folder relative to the tcc binary, or at some other paths?
Assistant
When you compile a C program using TinyCC (tcc), the way it locates its include directory depends primarily on your operating system and how tcc was configured, but it revolves around an internal base path known as {B} (the "tcc directory").
Here is exactly how tcc resolves its include paths:
1. On Windows
Yes, it automatically finds the include folder relative to the binary.
If CONFIG_TCCDIR is not hardcoded at build time, tcc dynamically calls GetModuleFileNameA when it starts to find the exact location of the tcc.exe executable. It sets its internal base path {B} to the folder containing the executable.
It then looks for:
{B}/include
{B}/include/winapi
2. On Linux, macOS, and other Unix-like systems
No, by default it does not look relative to the binary.
Instead, the base path {B} is hardcoded during the build process (via the ./configure script). The default is usually /usr/local/lib/tcc (or /usr/lib/tcc).
Because the tcc binary is typically installed in /usr/local/bin or /usr/bin, it relies on the hardcoded CONFIG_TCCDIR path. It will automatically search:
{B}/include (e.g., /usr/local/lib/tcc/include for tcc's own headers like <stdarg.h>)
/usr/local/include (Standard system headers)
/usr/include (Standard system headers)
3. Overriding the Path (All Platforms)
Regardless of the platform, you can manually override the base directory path {B} using the -B command-line option:
bash
tcc -B /path/to/custom/tccdir main.c
When you do this, tcc will use /path/to/custom/tccdir/include as its primary include directory.
Additionally, tcc will always respect standard environment variables for resolving include paths, specifically:
The user in issue #26 experienced a compilation failure (specifically around headers needed for _Py_USE_GCC_BUILTIN_ATOMICS or standard includes) and had to explicitly append -I flags pointing to tcc's include and include\winapi directories:
This proves that tcc.exe (as shipped in the triton-windows package) did not automatically find its own include folders relative to its executable, even though it normally should on Windows.
Why did this happen?
Given how tcc's path resolution is implemented in its source code, this failure is highly likely caused by how triton-windows builds and ships tcc.exe.
In libtcc.c, dynamic resolution on Windows is guarded by an #ifndef:
c
#ifndef CONFIG_TCCDIR
/* on win32, we suppose the lib and includes are at the location of 'tcc.exe' */
static inline char *config_tccdir_w32(char *path) {
GetModuleFileNameA(tcc_module, path, MAX_PATH);
// ... resolves relative path
}
#define CONFIG_TCCDIR config_tccdir_w32(alloca(MAX_PATH))
#endif
If triton-windows builds tcc.exe using a cross-compiler or a standard configure/make setup, the build script might be explicitly hardcoding CONFIG_TCCDIR (e.g., to a temporary CI build path). Once CONFIG_TCCDIR is hardcoded at compile time, the config_tccdir_w32 function is ignored entirely.
When installed later on an end-user's machine inside a Python .venv (as seen in the user's paths E:\Python\PyStable\.venv\...), tcc looks for the original hardcoded build path instead of its actual location, fails to find the includes, and crashes unless the user manually overrides it with -I flags.
User
But the tcc in triton-windows 3.6.0post26 is compiled exactly from this commit in this repo. Can you explain why it failed to find the includes folder? What factors on the user's machine may affect this?
User
You may use C:\Python312\Lib\site-packages\triton\runtime\tcc\tcc.exe . By the way, if you compile tcc from this commit in this repo, it should be bitwise identical to that one.
User
Use tcc rather than gcc for debugging whenever possible.
User
You're running in PowerShell. Do not use bash syntax. If you need gcc or MSVC cl , stop and ask me.
User
You may read the sourec code in C:\triton\ , and check the tag v3.6.0-windows.post26 in that repo.
User
Stop and explain: Do you have any idea why the user need to manually add the include paths? What hypotheses do you have? To collect more information on the user's computer, what should we ask the user?
Assistant
I have thoroughly analyzed the setup and behavior of tcc inside triton-windows. This is a classic, deeply hidden Windows API edge case regarding long paths.
My Primary Hypothesis: The MAX_PATH (260 characters) Limitation
In the user's issue, look very closely at the path where their virtual environment is installed:
E:\Python\PyStable\.venv\Lib\site-packages\triton\runtime\tcc\tcc.exe
Now, let's look at how tcc resolves its own directory dynamically on Windows. In libtcc.c:
c
/* on win32, we suppose the lib and includes are at the location of 'tcc.exe' */
static inline char *config_tccdir_w32(char *path)
{
char *p;
GetModuleFileNameA(tcc_module, path, MAX_PATH);
p = tcc_basename(normalize_slashes(strlwr(path)));
if (p > path)
--p;
*p = 0;
return path;
}
#define CONFIG_TCCDIR config_tccdir_w32(alloca(MAX_PATH))
MAX_PATH on Windows is 260 characters.
GetModuleFileNameA will populate the path buffer with the full path to tcc.exe.
However, notice the compilation command in the user's report:
In Triton's build.py (which we inspected), if the compiler is MSVC, they convert \\?\ UNC paths to 8.3 short paths. But for tcc (which falls into the else branch in _build), they pass the raw \\?\C:\TEMP\... long path syntax directly to tcc.exe.
When Windows processes are invoked in certain ways involving long UNC paths (\\?\), or when Python starts a subprocess with a very long environment or pathing setup, standard Win32 ANSI APIs like GetModuleFileNameA can sometimes silently fail, truncate the result, or return paths with \\?\ prefixes that tcc's simple string manipulation (normalize_slashes, strlwr) mishandles.
User
When tcc is used, there is nothing involving 8.3 short names.
The user reports
The two venvs are installed with PyCharm. dir E:\Python /al /s shows no symlinks or junctions. Is there anything notable with PyCharm? Can you explain why it's needed to manually add the include folder?
Assistant
Based on a deep dive into the TinyCC source code and the Triton build.py behavior, I have formulated three main hypotheses for why this compilation is failing and why explicitly adding the -I paths fixed it.
My Hypotheses
1. The "Case-Sensitive Filesystem" Hypothesis (Most Likely)
In TinyCC's Windows path resolution (libtcc.c), tcc determines its base directory by getting the executable's path and passing it through strlwr() (lowercasing the entire string).
We can see this in the -vv output the user provided:
install: e:/python/pystable/.venv/lib/site-packages/triton/runtime/tcc
However, the actual path on the user's disk is E:\Python\PyStable\.venv\Lib\...
While Windows NTFS is case-insensitive by default, if the user's E: drive is a Dev Drive (ReFS), a mapped WSL/Linux drive, or if they have Per-directory case sensitivity enabled in Windows 10/11, the OS will reject the lowercased path when tcc tries to open() the header files.
By manually adding the -I flags using sysconfig.get_paths(), the user implicitly passed the exact, case-preserved path to the compiler, bypassing the lowercased system include paths entirely and allowing the OS to find the files.
2. The "Header Shadowing" Hypothesistcc searches its internal system includes (sysinclude_paths) after all user-provided -I directories.
The user's command line passes -I for CUDA 13.1 and Python 3.12. If either of these directories contains a C header (like stdbool.h, stddef.h, or a heavily MSVC-specific wrapper) that shares a name with a standard C header, tcc might be finding that conflicting header first and crashing on syntax it doesn't understand.
By appending the -I flags for TCC's includes to cc_cmd, the user injected TCC's include paths before the Triton/CUDA ones in the search order. This forces tcc to find its own standard headers first, avoiding the conflict.
3. The is_tcc() Detection Failure
Looking closely at the user's "BEFORE" compiler command, it includes the flag -D_Py_USE_GCC_BUILTIN_ATOMICS and is missing -nostdlib.
According to Triton's build.py, -D_Py_USE_GCC_BUILTIN_ATOMICS is only added in the else block if is_tcc(cc) evaluates to . For some reason, Triton did not recognize as . This misconfiguration might have subtly altered the compilation environment, relying on GCC-style atomic fallbacks that trigger cascades for headers that TCC doesn't natively supply without its own includes prioritized.
User
Read the post again:
Describe the bug
Solution to a problem I had even after making a new, clean environment:
While trying "unsloth" on Windows (vs. Ubuntu WSL2 -- worked fine there), I found the "triton-windows" tcc.exe call was failing because of missing include files:
My fix was to add two includes to .../triton/runtime/build.py "_cc_cmd()" as follows:
def _cc_cmd(...):
if is_msvc(cc) or is_clang_cl(cc):
...
else:
...
cc_cmd += [f"-L{dir}" for dir in library_dirs]
code
cc_cmd += [f'-I{os.path.join(sysconfig.get_paths()['purelib'], 'triton\\runtime\\tcc\\include\\winapi')}']
cc_cmd += [f'-I{os.path.join(sysconfig.get_paths()['purelib'], 'triton\\runtime\\tcc\\include')}']
cc_cmd += [f"-I{dir}" for dir in include_dirs if dir is not None]
...
...
Thank you for catching that. You are completely right. I misread the logic in build.py: Triton explicitly adds-D_Py_USE_GCC_BUILTIN_ATOMICS when is_tcc(cc) evaluates to True. Because it appears in all three command lines, Triton is correctly detecting TCC.
With that corrected, and looking at the exact tcc -vv output you provided, I have formulated two highly probable hypotheses for why TCC is failing to find its own headers internally, yet succeeds when they are manually added.
Hypothesis 1: Case-Sensitive Filesystems (e.g., Windows Dev Drives) destroying strlwr
Look extremely closely at the output from tcc -vv:
install: e:/python/pystable/.venv/lib/site-packages/triton/runtime/tcc
Notice that the path is completely lowercased. The actual path on the user's disk is E:\Python\PyStable\.venv\Lib....
In TinyCC's Windows implementation (libtcc.c), when TCC dynamically resolves its own location to find its system includes, it intentionally lowercases the entire string:
c
/* on win32, we suppose the lib and includes are at the location of 'tcc.exe' */
static inline char *config_tccdir_w32(char *path) {
GetModuleFileNameA(tcc_module, path, MAX_PATH);
p = tcc_basename(normalize_slashes(strlwr(path))); // <--- strlwr() lowercases the path
// ...
Windows NTFS is generally case-insensitive, so open("e:/python/pystable/.../include/stddef.h") normally works. However, if the E: drive is a Windows Dev Drive (ReFS) or if the user enabled Windows 10/11 per-directory case sensitivity (which is common for developers using Linux tools like unsloth via WSL), the OS will strictly reject the lowercased path, resulting in a "missing include file" error internally.
Why the user's fix worked: By explicitly using sysconfig.get_paths(), the user passed the exact, case-preserved path as an -I flag. TCC's -I parser does not lowercase paths. Because the explicit path matched the real filesystem casing exactly, TCC could finally open the files.
TCC searches user-provided -I paths its own internal .
The BEFORE command included paths for Python 3.12 and CUDA 13.1:
User
Check C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\include\ and C:\Python312\include\ on this machine. They are the standard headers installed with CUDA and Python. Is there anything that may shadow tcc's headers?
Assistant
Based on a deep dive into the TinyCC source code and the specific commands in the bug report, I have narrowed it down to one highly probable hypothesis. It perfectly explains why TCC fails internally but succeeds when the paths are manually provided.
The "Case-Sensitive Filesystem (Dev Drive)" Hypothesis
Notice the tcc -vv output the user posted:
install: e:/python/pystable/.venv/lib/site-packages/triton/runtime/tcc
Compare this to the actual path in their bug report:
E:\Python\PyStable\.venv\Lib\site-packages\triton\runtime\tcc
The path resolved by TCC is entirely lowercased.
In TinyCC's Windows implementation (libtcc.c), when TCC dynamically resolves its own executable path to find its system includes, it intentionally lowercases the entire string:
c
/* on win32, we suppose the lib and includes are at the location of 'tcc.exe' */
static inline char *config_tccdir_w32(char *path) {
GetModuleFileNameA(tcc_module, path, MAX_PATH);
p = tcc_basename(normalize_slashes(strlwr(path))); // <--- strlwr() lowercases the path
// ...
Normally, Windows NTFS is case-insensitive, so fopen("e:/python/pystable.../include/stdio.h") works perfectly fine, even if the real folders have capital letters.
However, the user is likely running this on a Windows "Dev Drive" (ReFS).
Microsoft highly recommends developers (especially AI/Python/CUDA developers) use a "Dev Drive" for their code to drastically improve disk performance. Dev Drives use the ReFS file system and are often case-sensitive by default. Alternatively, the user might have manually enabled Windows 10/11 "Per-directory case sensitivity" on their E:\Python folder to play nicely with WSL tools.
If the file system is case-sensitive, fopen strictly rejects the lowercased path, resulting in a "missing include file" error internally within TCC when it tries to load <stdio.h> or <stddef.h>.
Why the user's fix worked:
By modifying build.py to use sysconfig.get_paths()['purelib'], the user implicitly passed the exact, case-preserved path as an explicit -I flag. TCC does not lowercase user-provided -I paths. Because the explicitly provided path matched the real filesystem casing exactly, TCC's could finally find the headers, bypassing the lowercased internal entirely.
User
Is there any downside if we remove the strlwr there? We're maintaining a fork of tinycc to support boarder Windows usage.
Assistant
There should be no downside to removing strlwr(path) from config_tccdir_w32 in libtcc.c. In fact, removing it is the correct and modern fix for exactly the issue your user experienced.
Here is a breakdown of why it is safe and highly recommended to remove it:
1. Internal String Comparisons are already Case-Insensitive on Windows
If you look at tcc.h, TinyCC defines a macro called PATHCMP which handles all path equality checks (such as determining if a header has already been included for #pragma once caching, or checking if an include directory is already in the list):
Because it uses stricmp natively on Windows, having the CONFIG_TCCDIR string preserve its exact uppercase/lowercase formatting will not break any of TinyCC's internal tracking mechanisms.
2. File Systems Expect the Exact Casing When Case-Sensitivity is Enabled
Historically, Windows FAT32/NTFS ignores case entirely when you call fopen(), so early TinyCC developers likely threw strlwr() in just for visual cleanliness in debug outputs (like tcc -vv), assuming the filesystem wouldn't care.
However, modern Windows environments frequently break this assumption:
Dev Drives (ReFS): Microsoft strongly pushes developers to put their code on ReFS "Dev Drives" which often enable case-sensitivity by default for massive speed boosts.
WSL Interoperability: Users frequently enable Windows "per-directory case-sensitivity" (via fsutil file setCaseSensitiveInfo) on their Python/C development folders to ensure git repos shared with WSL behave identically.
When a user runs a tool from one of these case-sensitive directories, Windows strictly enforces the casing. Passing a strlwr path to fopen or open will result in a hard FileNotFound error.
The Fix
You can safely modify libtcc.c to just preserve the case:
This single change will allow tcc to inherit the exact path returned by the OS, which will transparently fix the "missing headers" compilation crashes for Windows users running triton-windows or unsloth on Dev Drives or WSL-shared folders without requiring them to patch Python build scripts with manual -I flags.
User
Are there other places in this repo that incorrectly assumes Windows = case-insensitive file system?
Assistant
Yes, there are a few other deeply embedded places in the TinyCC codebase where Windows is fundamentally assumed to be a case-insensitive file system.
If you are maintaining a fork to natively support Windows Dev Drives and WSL-interop (case-sensitive by default), you should be aware of these. All of them relate to file caching and #pragma once tracking.
1. PATHCMP macro uses stricmp (tcc.h)
In tcc.h (around line 123), PATHCMP is defined differently based on the OS:
Because of this, any path equivalence checks in TinyCC use case-insensitive string matching on Windows.
2. Include Cache Hashing uses toup() (tccpp.c)
In tccpp.c, there is a function called search_cached_include which is responsible for keeping track of all included headers so that #pragma once and #ifndef include-guards can be optimized out.
It explicitly hashes filenames using toup() (to upper) on Windows:
c
s = basename = tcc_basename(filename);
h = TOK_HASH_INIT;
while ((c = (unsigned char)*s) != 0) {
#ifdef _WIN32
h = TOK_HASH_FUNC(h, toup(c)); // <---- Forces uppercase hashing
#else
h = TOK_HASH_FUNC(h, c);
#endif
s++;
}
Later in that same function, it verifies the cache hit using the PATHCMP and normalized_PATHCMP macros.
Should you change these?
User
Now read C:\triton\ . We've added Windows support there. Are there any places that incorrectly assume Windows = case-insensitive file system?
Assistant
Yes, I have reviewed the C:\triton\ codebase (specifically Triton's newly added Windows support in triton/python/triton/windows_utils.py), and there are a couple of places that suffer from "case-sensitivity bugs".
Because Windows is a case-insensitive OS, it allows paths and environment variables to exist in any mix of upper/lowercase. However, Python's string and regex matching are strictly case-sensitive. In a few places, Triton incorrectly assumes that Windows paths will magically match exact Title Case strings, failing to account for the OS's case-insensitivity.
Here are the two places in windows_utils.py that will silently break if the paths don't have the exact casing:
1. Missing re.IGNORECASE in find_msvc_envpath()
In C:\triton\python\triton\windows_utils.py, Triton searches the PATH environment variable for the MSVC compiler:
python
def find_msvc_envpath() -> tuple[Optional[Path], Optional[str]]:
paths = os.getenv("PATH", "").split(os.pathsep)
for path in paths:
path = path.replace("/", "\\")
match = re.compile(r".*\\VC\\Tools\\MSVC\\").match(path) # <--- BUG
The Bug: Python's re.compile is strictly case-sensitive by default. Windows PATH variables are case-preserving. If a user manually added MSVC to their path, or if a third-party tool lowercased their environment variables (resulting in \vc\tools\msvc\), this regex will silently fail to find MSVC.
The Fix: This needs to explicitly account for Windows case-insensitivity:
re.compile(r".*\\VC\\Tools\\MSVC\\", re.IGNORECASE).match(path)
2. Case-sensitive UNC Prefix Stripping in get_8dot3_short_path()
In the same file, to fix the 260-character path limit, Triton converts paths to 8.3 short paths and then strips the Windows long-path prefix:
These are actually well under 260 characters (around 70 characters).
Secondary Hypothesis: Symlinks/Junctions in .venv
Python virtual environments (.venv) on Windows often use NTFS junctions or symlinks for the Scripts directory and sometimes for libraries, depending on how they were created (e.g., python -m venv vs conda vs uv).
If tcc.exe is being invoked through a symlink, GetModuleFileNameA might be returning the path to the symlink, not the resolved target path. If the symlink is in a different directory structure (e.g., a centralized cache like uv or pnpm uses), tcc will truncate the filename and look for include relative to the symlink's directory, which won't exist.
Tertiary Hypothesis: 8.3 Short Names Disabled or registry settings
Sometimes Python virtual environments or specific drives (like E:\ in the user's case) have 8.3 short name creation disabled. While tcc doesn't strictly require 8.3, interactions between Python's subprocess, the E:\ drive configuration, and GetModuleFileNameA might be returning a path format tcc doesn't expect.
What we should ask the user to collect more information:
To pinpoint exactly why config_tccdir_w32 is failing to resolve the correct include path on their specific machine, we should ask them to run a few diagnostic commands.
Ask them to run tcc.exe with verbose flags directly from their .venv:
Ask the user to run this exact command in their command prompt or PowerShell:
Why: The -vv flag forces tcc to print out its resolved install: directory and include: directories. This will instantly tell us what GetModuleFileNameA is evaluating to on their machine.
Ask about how the environment was created:
"How did you create your .venv environment? Did you use standard python -m venv, conda, uv, or another tool? Are there any symlinks or directory junctions involved in your E:\Python\PyStable folder?"
Ask them to test a temporary standard path:
"If you copy the entire tcc folder (E:\Python\PyStable\.venv\Lib\site-packages\triton\runtime\tcc) directly to C:\tcc_test and run C:\tcc_test\tcc.exe -vv, does the include path resolve correctly?"
Why: This isolates whether the issue is tied specifically to the .venv structure/drive E:\ or if it's a global system configuration issue.
What we should ask the user to collect more information:
To conclusively prove which hypothesis is correct, we should ask the user for the following:
The Exact Compiler Output:
Python's subprocess.check_call throws an exception but doesn't print the compiler's stderr. We need to ask them to run the failing "BEFORE" command manually in their command prompt to see exactly which header is failing:
(We should also tell them to add -vv to this command so we can see the exact search order TCC uses right before it crashes).
Check for Case Sensitivity:
Ask them to run this command in an administrator PowerShell to check if their filesystem has case sensitivity enabled for that Python folder:
Also ask: "Is your E: drive a Windows Dev Drive, or a mapped network/WSL drive?"
Environment details
GPU: RTX 5070 Ti
CUDA 13.1
Python 3.12.10
triton-windows==3.6.0post26
latest versions of all packages 'cept pydantic-core==2.41.5 (last one unsloth likes)
MSVC 2022 though triton-windows seems to pick tcc.exe over cl.exe
-D_Py_USE_GCC_BUILTIN_ATOMICS appears in all 3 command lines.
It is highly likely that either the Python or CUDA include directories contain standard-looking C headers (like <float.h>, <limits.h>, etc.) that shadow TCC's internal standard headers. TCC picks up the Python/CUDA version first, but those headers often contain MSVC-specific syntax or #include directives for other files that TCC doesn't have, crashing the compilation with a secondary "missing include file".
Why the user's fix worked: In the user's patched build.py, they appended TCC's includes to cc_cmdbefore the Python and CUDA includes were appended. This forced TCC to search its own winapi and include folders first, successfully prioritizing TCC's standard headers over the conflicting Python/CUDA ones.
What we should ask the user to collect more information:
To conclusively prove which of these two issues is occurring, we should ask the user for two things:
Ask for the exact compiler error output:
Python's subprocess.check_call hides the actual stderr of the compiler. We should ask them to run the failing "BEFORE" command manually in their terminal:
If the error is include file 'stddef.h' not found, it's Hypothesis 1 (Case Sensitivity). If it's a failure inside a CUDA/Python header like Python.h:45: include file 'corecrt.h' not found, it's Hypothesis 2 (Shadowing).
Ask about their E:\ Drive Configuration:
"Is your E:\ drive formatted as a Windows Dev Drive (ReFS), or have you ever enabled Windows case-sensitivity on the E:\Python folder (e.g., using fsutil file setCaseSensitiveInfo) to work with WSL?"
fopen
sysinclude_paths
(Note: I also investigated header shadowing from Python/CUDA, but neither C:\Python312\include nor the CUDA include directory contain standard C headers like stdio.h or math.h that would conflict with TCC's headers.)
What we should ask the user to collect more information:
To conclusively prove this is the issue, we should ask the user two questions:
Check for Case-Sensitivity / Dev Drive:"Is your E: drive formatted as a Windows Dev Drive (ReFS)? Alternatively, have you ever enabled Windows case-sensitivity on the E:\Python folder (e.g., using fsutil file setCaseSensitiveInfo)?"
Verify with a quick Python script:
Ask them to run this quick test in their environment to see if the OS rejects the lowercased path:
python
import os
# The exact case path
path1 = r"E:\Python\PyStable\.venv\Lib\site-packages\triton\runtime\tcc\include\stdbool.h"
# The lowercased path TCC is trying to use
path2 = r"e:\python\pystable\.venv\lib\site-packages\triton\runtime\tcc\include\stdbool.h"
print("Original exists:", os.path.exists(path1))
print("Lowercased exists:", os.path.exists(path2))
If Lowercased exists prints False, we have absolute proof that TCC's strlwr() is breaking path resolution on their machine.
For the strlwr() bug you encountered:
You absolutely must remove strlwr(path) from libtcc.c's config_tccdir_w32(). That is what is causing hard filesystem fopen errors on Dev Drives. The OS will strictly reject opening a file if you feed it the wrong casing on a case-sensitive drive.
For PATHCMP and search_cached_include:
You do not necessarily have to change these, but you should know what they do.
Because they only affect internal deduplication, it means if a user has two totally different files named Header.h and header.h in the exact same case-sensitive folder, TinyCC will incorrectly treat them as the same file. If one has #pragma once, the other won't be evaluated.
However, leaving them case-insensitive provides a big benefit on Windows: if a user types #include <Windows.h> in one file and #include <windows.h> in another, TCC correctly realizes they are the same file and caches it properly.
If you want pure, POSIX-level strictness for Windows in your fork, you can remove #define PATHCMP stricmp and remove the #ifdef _WIN32 block in search_cached_include. But for most real-world Dev Drive usage, simply removing the strlwr path mutation is the perfect sweet spot.
The Bug:.startswith() is strictly case-sensitive. If path is passed into this function (or returned by the Windows API) with a lowercased prefix like \\?\unc\server\share, the first if statement evaluates to False. It then falls through to the second if statement, which strips exactly 4 characters (\\?\), resulting in:
unc\server\share
This creates a corrupted relative path that will completely break compilation when passed to subprocess.check_call().
The Fix:
python
if path.upper().startswith("\\\\?\\UNC\\"):
return "\\\\" + path[8:]
(Note: In contrast, Triton's triton/runtime/build.py handles case-insensitivity perfectly by explicitly using .lower() before checking compiler basenames: cc = os.path.basename(cc).lower(); return cc == "cl.exe").