Skip to content

fix: update Clang architecture glob#2

Open
m-fol wants to merge 2 commits intobitsorg:mainfrom
m-fol:clang_arch
Open

fix: update Clang architecture glob#2
m-fol wants to merge 2 commits intobitsorg:mainfrom
m-fol:clang_arch

Conversation

@m-fol
Copy link
Copy Markdown

@m-fol m-fol commented Mar 17, 2026

Suggested change (in clang.sh):

case "$ARCHITECTURE" in
  *x86_64*) LLVM_TARGETS_TO_BUILD=X86 ;;
  *x86-64*) LLVM_TARGETS_TO_BUILD=X86 ;;
  *arm64*) LLVM_TARGETS_TO_BUILD=AArch64 ;;
  *aarch64*) LLVM_TARGETS_TO_BUILD=AArch64 ;;
  *) echo "Unknown LLVM target for architecture" >&2; exit 1 ;;
esac

Building Clang leads to this error:
Corresponding Error Log

2026-03-16@17:20:16:DEBUG:LCG:Clang:0: ++ echo 'Arch: '\''x86_64-el10-gcc15-opt'\'''
2026-03-16@17:20:16:DEBUG:LCG:Clang:0: ++ case $ARCHITECTURE in
2026-03-16@17:20:16:DEBUG:LCG:Clang:0: ++ DEFAULT_SYSROOT=
2026-03-16@17:20:16:DEBUG:LCG:Clang:0: ++ case $ARCHITECTURE in
2026-03-16@17:20:16:DEBUG:LCG:Clang:0: ++ echo 'Unknown LLVM target for architecture'
2026-03-16@17:20:16:DEBUG:LCG:Clang:0: Unknown LLVM target for architecture
2026-03-16@17:20:16:DEBUG:LCG:Clang:0: ++ exit 1
2026-03-16@17:20:16:DEBUG:LCG:Clang:0: + exit 1
2026-03-16@17:20:16:DEBUG:LCG:Clang:0: + cleanup
2026-03-16@17:20:16:DEBUG:LCG:Clang:0: + local exit_code=1
2026-03-16@17:20:16:DEBUG:LCG:Clang:0: ++ date +%s
2026-03-16@17:20:16:DEBUG:LCG:Clang:0: + BITS_END_TIMESTAMP=1773678016
2026-03-16@17:20:16:DEBUG:LCG:Clang:0: + BITS_DELTA_TIME=0
2026-03-16@17:20:16:DEBUG:LCG:Clang:0: + echo 'bits: done building Clang-v20.1.7-local1 at 1773678016 (0 s)'
2026-03-16@17:20:16:DEBUG:LCG:Clang:0: bits: done building Clang-v20.1.7-local1 at 1773678016 (0 s)
2026-03-16@17:20:16:DEBUG:LCG:Clang:0: + exit 1
2026-03-16@17:20:16:ERROR:LCG:Clang:0: BUILD FAILED: Clang@v20.1.7
2026-03-16@17:20:16:ERROR:LCG:Clang:0: ======================================================================
2026-03-16@17:20:16:ERROR:LCG:Clang:0: 
2026-03-16@17:20:16:ERROR:LCG:Clang:0: Log File:
2026-03-16@17:20:16:ERROR:LCG:Clang:0:   ../sw/BUILD/Clang-latest/log
2026-03-16@17:20:16:ERROR:LCG:Clang:0: 
2026-03-16@17:20:16:ERROR:LCG:Clang:0: Build Directory:
2026-03-16@17:20:16:ERROR:LCG:Clang:0:   ../sw/BUILD/Clang-latest/Clang
2026-03-16@17:20:16:ERROR:LCG:Clang:0: 
2026-03-16@17:20:16:ERROR:LCG:Clang:0: Environment:
2026-03-16@17:20:16:ERROR:LCG:Clang:0:   OS: slc10_x86-64
2026-03-16@17:20:16:ERROR:LCG:Clang:0:   bits: 0.1.2.dev20+gc3b2285f4 (bits@0f04558898)

In this part of the error log, we can see that:

++ echo 'Arch: '\''x86_64-el10-gcc15-opt'\'''
++ case $ARCHITECTURE in

$ARCHITECTURE doesn't end in *_x86-64, but it begins with that, judging from the echo printout. Leading to the last case (echo 'Unknown LLVM target for architecture' >&2; exit 1 ;;).
Thus:

case "$ARCHITECTURE" in
  *_x86_64) LLVM_TARGETS_TO_BUILD=X86 ;;

Is updated with:

case "$ARCHITECTURE" in
  *x86_64*) LLVM_TARGETS_TO_BUILD=X86 ;;

Comment thread clang.sh Outdated
m-fol pushed a commit to m-fol/common.bits that referenced this pull request Mar 18, 2026
Add packages and defaults to mimic current LCG nightlies
@m-fol m-fol force-pushed the clang_arch branch 3 times, most recently from 7d31909 to 0885c83 Compare March 19, 2026 08:30
Comment thread clang.sh
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