fix(build): a clang that can't read the play profile says which clang it is and where the one that reads it is #1267
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1267
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/pgo-unread-message"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type: fix · Risk: low · Tested on: Linux (parsed only, no checks run) · Needs: Linux with a clang older than 23, any GPU
Why
A Linux build from a checkout with the distro's clang (Ubuntu 24.04's is 18) prints "this compiler cannot read the play profile (<clang's error>): building without it". People read that as an error and ask about it, and it says neither which compiler the build found nor how to get one that reads the profile. Building with an older clang is supported (README: "LLVM 23 or newer reads the play profile; an older one builds without it"): the build goes on, a little slower in play. The line should say that, and where the LLVM that reads the profile is.
How to reproduce
Seen on: Linux, a checkout with no
EMSDKand clang 18 onPATHSettings and switches: defaults
Steps: build with
python -I nx2/make_game.py ...Expected: a line naming the clang, the profile, that the build goes on, and how to get a clang that reads it
Actual: "this compiler cannot read the play profile (error: ...): building without it"
What changed
The line now names the clang and its version, the profile's file name, clang's reason, and that the build goes on a little slower in play. On Linux, when that clang is older than the build tools' LLVM, it adds that
python -I scripts/dev_build.py envinstalls the build tools (tools.lock's LLVM) and prints the variables that point the build at them, or to install clang 23 or newer. For example:profile_unread_message()builds the line andbuild_tools_llvm()reads the build tools' version (LLVM_VERinscripts/linux/deps.sh), both innx2/make_game.py.profile_readable()calls them only after its test compile has failed. Nothing else in the path changes: the same profiles are checked, and a failure still builds without the profile.check_unread_message()intests/test_vk_pgo.py, game-free. It covers clang 18 against 23.1.5 (the advice shows), a clang as new as the build tools' (no advice), Windows (no advice), a clang that names no version, an empty reason, no deps.sh, and that the version comes from deps.sh.Measurements
Nothing to measure: a message printed only after the profile's test compile has failed.
Flags and settings
None
Testing
Tested: both changed files parse (Python's
ast). On the PC this was written on, no checks are run, sotests/test_vk_pgo.pyandtests/run_all.pyhave not run yet.Not tested: a build that hits the line. This PC's clang is 23.1.4, which reads the profile, so its builds never print it. Opened with
--forceat the request of the person I work for.Must be tested:
python -I -B tests/test_vk_pgo.py, expecting "OK" (by hand or CI)PATHandEMSDKunset: build, expecting the line above in the build log and the build finishing (by hand: the build log)Risks
What could break: the line itself.
profile_readable()runsclang --versiononce more, only when the profile check has already failed.Turning it off: revert the commit
Compatibility: Nothing changes: the same profiles are used and the build keys are the same.
Checklist
Everyone
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named): not run on this PC; CI or a reviewerthird_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
Possibly related, for context:
WIP: fix(build): a clang that can't read the play profile says which clang it is and where the one that reads it isto fix(build): a clang that can't read the play profile says which clang it is and where the one that reads it is