Skip to content

Commit 8927576

Browse files
authored
workflows/release-binaries: Enable flang builds on Windows (#101344)
Flang for Windows depends on compiler-rt, so we need to enable it for the stage1 builds. This also fixes failures building the flang tests on macOS. Fixes #100202.
1 parent 3a5c578 commit 8927576

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

.github/workflows/release-binaries.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,16 +135,8 @@ jobs:
135135
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_DARWIN_osx_ARCHS=$arches -DBOOTSTRAP_DARWIN_osx_BUILTIN_ARCHS=$arches"
136136
fi
137137
138-
# x86 macOS and x86 Windows have trouble building flang, so disable it.
139-
# Windows: https://github.com/llvm/llvm-project/issues/100202
140-
# macOS: 'rebase opcodes terminated early at offset 1 of 80016' when building __fortran_builtins.mod
141138
build_flang="true"
142139
143-
if [ "$target" = "Windows-X64" ]; then
144-
target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_PROJECTS=\"clang;lld;lldb;clang-tools-extra;bolt;polly;mlir\""
145-
build_flang="false"
146-
fi
147-
148140
if [ "${{ runner.os }}" = "Windows" ]; then
149141
# The build times out on Windows, so we need to disable LTO.
150142
target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF"

clang/cmake/caches/Release.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,14 @@ set(LLVM_TARGETS_TO_BUILD Native CACHE STRING "")
4747
set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "")
4848

4949
set(STAGE1_PROJECTS "clang")
50-
set(STAGE1_RUNTIMES "")
50+
51+
# Building Flang on Windows requires compiler-rt, so we need to build it in
52+
# stage1. compiler-rt is also required for building the Flang tests on
53+
# macOS.
54+
set(STAGE1_RUNTIMES "compiler-rt")
5155

5256
if (LLVM_RELEASE_ENABLE_PGO)
5357
list(APPEND STAGE1_PROJECTS "lld")
54-
list(APPEND STAGE1_RUNTIMES "compiler-rt")
5558
set(CLANG_BOOTSTRAP_TARGETS
5659
generate-profdata
5760
stage2-package

0 commit comments

Comments
 (0)