Skip to content

workflows/release-binaries: Enable flang builds on Windows #101344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 29, 2024

Conversation

tstellar
Copy link
Collaborator

@tstellar tstellar commented Jul 31, 2024

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.

@llvmbot
Copy link
Member

llvmbot commented Jul 31, 2024

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-github-workflow

Author: Tom Stellard (tstellar)

Changes

This was fixed in 73d862e.

Fixes #100202.


Full diff: https://github.com/llvm/llvm-project/pull/101344.diff

1 Files Affected:

  • (modified) .github/workflows/release-binaries.yml (-8)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index b1b046dbad5f8..2c6f4da8facd2 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -124,16 +124,8 @@ jobs:
           target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_DARWIN_osx_ARCHS=$arches -DBOOTSTRAP_DARWIN_osx_BUILTIN_ARCHS=$arches"
         fi
 
-        # x86 macOS and x86 Windows have trouble building flang, so disable it.
-        # Windows: https://github.com/llvm/llvm-project/issues/100202
-        # macOS: 'rebase opcodes terminated early at offset 1 of 80016' when building __fortran_builtins.mod
         build_flang="true"
 
-        if [ "$target" = "Windows-X64" ]; then
-          target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_PROJECTS=\"clang;lld;lldb;clang-tools-extra;bolt;polly;mlir\""
-          build_flang="false"
-        fi
-
         if [ "${{ runner.os }}" = "Windows" ]; then
           # The build times out on Windows, so we need to disable LTO.
           target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF"

It looks like flang has a dependecy on compiler-rt.

Fixes llvm#100202.
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Aug 7, 2024
@tstellar
Copy link
Collaborator Author

tstellar commented Aug 8, 2024

It looks like this change also fixed some build failures on macOS too.

list(APPEND STAGE1_RUNTIMES "compiler-rt")
if (NOT "compiler-rt" IN_LIST STAGE1_RUNTIMES)
list(APPEND STAGE1_PROJECTS "compiler-rt")
endif()
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this bit needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's probably not needed any more. I was planning to conditionally add compiler-rt to stage1 targets based on if flang was enabled or not, but now I think that is too complicated.

@tstellar
Copy link
Collaborator Author

I'm going to push this tomorrow so it has a chance to land before -rc3.

@tstellar tstellar merged commit 8927576 into llvm:main Aug 29, 2024
37 of 41 checks passed
@tstellar tstellar added this to the LLVM 19.X Release milestone Aug 29, 2024
@tstellar
Copy link
Collaborator Author

/cherry-pick 8927576

llvmbot pushed a commit to llvmbot/llvm-project that referenced this pull request Aug 29, 2024
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 llvm#100202.

(cherry picked from commit 8927576)
@llvmbot
Copy link
Member

llvmbot commented Aug 29, 2024

/pull-request #106480

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 29, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux running on sanitizer-buildbot2 while building .github,clang at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/3193

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[378/384] Generating FuzzerUtils-x86_64-Test
[379/384] Generating MSAN_INST_GTEST.gtest-all.cc.x86_64.o
[380/384] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.x86_64-with-call.o
[381/384] Generating Msan-x86_64-with-call-Test
[382/384] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.x86_64.o
[383/384] Generating Msan-x86_64-Test
[383/384] Running compiler_rt regression tests
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 4592 of 10298 tests, 88 workers --
Testing:  0
FAIL: LeakSanitizer-Standalone-i386 :: TestCases/suppressions_file.cpp (180 of 4592)
******************** TEST 'LeakSanitizer-Standalone-i386 :: TestCases/suppressions_file.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
/home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp

--
Command Output (stderr):
--
RUN: at line 1: /home/b/sanitizer-x86_64-linux/build/build_default/./bin/clang  --driver-mode=g++ -O0  -m32  -gline-tables-only -fsanitize=leak -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/../ /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/suppressions_file.cpp -o /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp
+ /home/b/sanitizer-x86_64-linux/build/build_default/./bin/clang --driver-mode=g++ -O0 -m32 -gline-tables-only -fsanitize=leak -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/../ /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/suppressions_file.cpp -o /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp
RUN: at line 3: rm -f /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp
+ rm -f /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp
RUN: at line 4: touch /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp
+ touch /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp
RUN: at line 5: echo  /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp
+ echo /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp
RUN: at line 6: env LSAN_OPTIONS=:detect_leaks=1:"use_registers=0:use_stacks=0:suppressions='/home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp'" not  /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp 2>&1 | FileCheck /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/suppressions_file.cpp --check-prefix=NOSUPP
+ env 'LSAN_OPTIONS=:detect_leaks=1:use_registers=0:use_stacks=0:suppressions='\''/home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp'\''' not /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp
+ FileCheck /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/suppressions_file.cpp --check-prefix=NOSUPP
/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/suppressions_file.cpp:44:12: error: NOSUPP: expected string not found in input
// NOSUPP: SUMMARY: {{.*}}Sanitizer: 2780 byte(s) leaked in 3 allocation(s).
           ^
<stdin>:1:1: note: scanning from here
Test alloc: 0xee003c00.
^
<stdin>:13:1: note: possible intended match here
SUMMARY: LeakSanitizer: 1337 byte(s) leaked in 1 allocation(s).
^

Input file: <stdin>
Check file: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/suppressions_file.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
Step 11 (test compiler-rt debug) failure: test compiler-rt debug (failure)
...
[378/384] Generating FuzzerUtils-x86_64-Test
[379/384] Generating MSAN_INST_GTEST.gtest-all.cc.x86_64.o
[380/384] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.x86_64-with-call.o
[381/384] Generating Msan-x86_64-with-call-Test
[382/384] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.x86_64.o
[383/384] Generating Msan-x86_64-Test
[383/384] Running compiler_rt regression tests
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 4592 of 10298 tests, 88 workers --
Testing:  0
FAIL: LeakSanitizer-Standalone-i386 :: TestCases/suppressions_file.cpp (180 of 4592)
******************** TEST 'LeakSanitizer-Standalone-i386 :: TestCases/suppressions_file.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
/home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp

--
Command Output (stderr):
--
RUN: at line 1: /home/b/sanitizer-x86_64-linux/build/build_default/./bin/clang  --driver-mode=g++ -O0  -m32  -gline-tables-only -fsanitize=leak -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/../ /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/suppressions_file.cpp -o /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp
+ /home/b/sanitizer-x86_64-linux/build/build_default/./bin/clang --driver-mode=g++ -O0 -m32 -gline-tables-only -fsanitize=leak -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/../ /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/suppressions_file.cpp -o /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp
RUN: at line 3: rm -f /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp
+ rm -f /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp
RUN: at line 4: touch /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp
+ touch /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp
RUN: at line 5: echo  /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp
+ echo /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp
RUN: at line 6: env LSAN_OPTIONS=:detect_leaks=1:"use_registers=0:use_stacks=0:suppressions='/home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp'" not  /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp 2>&1 | FileCheck /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/suppressions_file.cpp --check-prefix=NOSUPP
+ env 'LSAN_OPTIONS=:detect_leaks=1:use_registers=0:use_stacks=0:suppressions='\''/home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp.supp'\''' not /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386LsanConfig/TestCases/Output/suppressions_file.cpp.tmp
+ FileCheck /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/suppressions_file.cpp --check-prefix=NOSUPP
/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/suppressions_file.cpp:44:12: error: NOSUPP: expected string not found in input
// NOSUPP: SUMMARY: {{.*}}Sanitizer: 2780 byte(s) leaked in 3 allocation(s).
           ^
<stdin>:1:1: note: scanning from here
Test alloc: 0xee003c00.
^
<stdin>:13:1: note: possible intended match here
SUMMARY: LeakSanitizer: 1337 byte(s) leaked in 1 allocation(s).
^

Input file: <stdin>
Check file: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/suppressions_file.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<

tru pushed a commit to llvmbot/llvm-project that referenced this pull request Sep 1, 2024
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 llvm#100202.

(cherry picked from commit 8927576)
tru pushed a commit to llvmbot/llvm-project that referenced this pull request Sep 24, 2024
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 llvm#100202.

(cherry picked from commit 8927576)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category github:workflow
Projects
Development

Successfully merging this pull request may close these issues.

Flang build fails on GitHub Action Windows runners
5 participants