Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion base/comps/components.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2063,7 +2063,6 @@ includes = ["**/*.comp.toml", "component-check-disablement.toml"]
[components.llhttp]
[components.llvm15]
[components.llvm18]
[components.llvm20]
[components.lm_sensors]
[components.lmdb]
[components.lockdev]
Expand Down
6 changes: 6 additions & 0 deletions base/comps/llvm/llvm.comp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@
# are imported into Azure Linux. MLIR is gated on %{with mlir} in the
# upstream spec and pulls in python3-nanobind-devel which doesn't exist yet.
build.without = ["mlir"]

[[components.llvm.overlays]]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also build llvm15, 18, and 20; are they all impacted too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

20 for sure. Looks like 15 and 18 don't have the config file refrence so I am not sure. I will update the pr at least for llvm20.

description = "Use the Azure Linux GCC toolchain triple in clang's default config so clang can find gcc runtime files in stage2 builds"
type = "spec-search-replace"
regex = '%global cfg_file_content --gcc-triple=%{_target_cpu}-redhat-linux'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an opportunity to use the standard RPM macro %{_target_platform} in place of the whole thing? That's presumably what the upstream spec should have used.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is unfortunately not a match thanks to the "gnu"

<mock-chroot> sh-5.3# rpm --eval '%{_target_platform}'
x86_64-azurelinux-linux-gnu

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know. How about at least using %{_vendor}?

replacement = '%global cfg_file_content --gcc-triple=%{_target_cpu}-azurelinux-linux'
7 changes: 7 additions & 0 deletions base/comps/llvm20/llvm20.comp.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[components.llvm20]

[[components.llvm20.overlays]]
description = "Use the Azure Linux GCC toolchain triple in clang20's default config so clang20 can find gcc runtime files in stage2 builds"
type = "spec-search-replace"
regex = '%global cfg_file_content --gcc-triple=%{_target_cpu}-redhat-linux'
replacement = '%global cfg_file_content --gcc-triple=%{_target_cpu}-azurelinux-linux'
2 changes: 1 addition & 1 deletion locks/llvm.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
version = 1
import-commit = '659c0740e5c29098632207467aa89ce0083d5892'
upstream-commit = '659c0740e5c29098632207467aa89ce0083d5892'
input-fingerprint = 'sha256:22b9f82e2af24b7f06d921f74ac4b076e3ede06d26b66233acaad35a36c342c3'
input-fingerprint = 'sha256:ee89ed5c6013a58c3983ae38af409ce4b53dc6dea3a35e7b666f45f36357c439'
resolution-input-hash = 'sha256:466421704711c4fd3c71f0b2ed715a0e61d49e3e26f3a2637fee755795849c8e'
2 changes: 1 addition & 1 deletion locks/llvm20.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
version = 1
import-commit = '2cecf3d98071e54a6bfc29d9656698c89a07a535'
upstream-commit = '2cecf3d98071e54a6bfc29d9656698c89a07a535'
input-fingerprint = 'sha256:b355b2d8889f156e6c50ccad53ade7e9a6c133e333aeade2921c2291d3e56859'
input-fingerprint = 'sha256:9b2dd4bc6ea4bc46970139d1fe924f2cc18b1c46480ba47c94ca28dc1665bac7'
resolution-input-hash = 'sha256:466421704711c4fd3c71f0b2ed715a0e61d49e3e26f3a2637fee755795849c8e'
7 changes: 5 additions & 2 deletions specs/l/llvm/llvm.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## (rpmautospec version 0.8.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 5;
release_number = 6;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
Expand Down Expand Up @@ -1310,7 +1310,7 @@ sed -i 's/LLDB_ENABLE_PYTHON/TRUE/' lldb/docs/CMakeLists.txt
%global runtimes %{runtimes};offload
%endif

%global cfg_file_content --gcc-triple=%{_target_cpu}-redhat-linux
%global cfg_file_content --gcc-triple=%{_target_cpu}-azurelinux-linux

# We want to use DWARF-5 on all snapshot builds.
%if %{without snapshot_build} && %{defined rhel} && 0%{?rhel} < 10
Expand Down Expand Up @@ -3514,6 +3514,9 @@ fi

%changelog
## START: Generated by rpmautospec
* Fri May 01 2026 Rachel Menge <rachelmenge@microsoft.com> - 21.1.8-6
- fix(llvm): correct clang's default GCC triple for Azure Linux stage2

* Thu Apr 30 2026 Daniel McIlvaney <damcilva@microsoft.com> - 21.1.8-5
- feat: introduce deterministic commit resolution via Azure Linux lock file

Expand Down
2 changes: 1 addition & 1 deletion specs/l/llvm20/llvm20.spec
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ sed -i 's/LLDB_ENABLE_PYTHON/TRUE/' lldb/docs/CMakeLists.txt
%global runtimes %{runtimes};offload
%endif

%global cfg_file_content --gcc-triple=%{_target_cpu}-redhat-linux
%global cfg_file_content --gcc-triple=%{_target_cpu}-azurelinux-linux

# We want to use DWARF-5 on all snapshot builds.
%if %{without snapshot_build} && %{defined rhel} && 0%{?rhel} < 10
Expand Down
Loading