Skip to content

Build llvm, without arm#11

Closed
hughperkins wants to merge 54 commits into
mainfrom
hp/llvm-build-no-arm
Closed

Build llvm, without arm#11
hughperkins wants to merge 54 commits into
mainfrom
hp/llvm-build-no-arm

Conversation

@hughperkins
Copy link
Copy Markdown
Collaborator

No description provided.

@johnnynunez
Copy link
Copy Markdown
Contributor

@hughperkins close this

@hughperkins
Copy link
Copy Markdown
Collaborator Author

I need it to build 17.

One option I was thinking is to parametrize the main build, to be able to choose to not build arm.

But until I do that, I need this particular builder.

@johnnynunez
Copy link
Copy Markdown
Contributor

I need it to build 17.

One option I was thinking is to parametrize the main build, to be able to choose to not build arm.

But until I do that, I need this particular builder.

you can add the things that we fixed, maybe now builds for arm

@hughperkins
Copy link
Copy Markdown
Collaborator Author

There's a build of 17.0.6 here: https://github.com/Genesis-Embodied-AI/gstaichi-sdk-builds/actions/runs/18036925400 It is failing for ARM.

@johnnynunez
Copy link
Copy Markdown
Contributor

johnnynunez commented Sep 26, 2025

There's a build of 17.0.6 here: https://github.com/Genesis-Embodied-AI/gstaichi-sdk-builds/actions/runs/18036925400 It is failing for ARM.

it is ok! Not change the script. It is a bug: llvm/llvm-project#78691

Why the build fails

GCC 14 on ARM introduces new predefined macros for SME/ACLE attributes, such as __arm_streaming, which expand into C++11 attributes like [[arm::streaming]].

LLVM 17’s Clang headers generate keyword tokens using macros like kw_##X.

When X is a macro (e.g. _arm_streaming) that expands into [[...]], the preprocessor tries to paste kw with [. That produces an invalid token and triggers errors like:

error: pasting "kw_" and "[" does not give a valid preprocessing token

Why only LLVM 17 is affected

LLVM 15/16: too old to run into these new GCC 14 ARM attributes.

LLVM 18 and newer: already include the upstream fix that prevents premature macro expansion (they use the EMPTY ## X trick).

LLVM 17.x: the fix was never backported, so builds break specifically there with GCC 14 on ARM.

@hughperkins hughperkins closed this Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants