astral-sh / astral-sh/python-build-standalone

LLVM System Config Variable

Open
#1,073 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4.4k
Forks
314
Avg merge
1d 9h
Merged PRs (30d)
27

Description

I noticed that running the following from the standalone python:

``` python
import sysconfig
for k in ("AR", "CC", "CXX"):
print(k, "=", sysconfig.get_config_var(AR))
```

produces:
```
AR = /tools/llvm/bin/llvm-ar
CC = clang
CXX = clang++
```

clang and clang++ are correct but `AR` should be coded to `llvm-ar` without hard coding the path. This causes some issues during building some libraries as it expects llvm-ar to be in a very specific location.

Python version: 3.12.11 [Clang 20.1.4] on Linux

EDIT:
Adding the documentation note about this issue:
https://gregoryszorc.com/docs/python-build-standalone/main/quirks.html#references-to-build-time-paths

It looks like it is a known general issue. `CC` and `CXX` are handled correctly as suggested by the documentation but not `AR`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.