https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/216667
>From 8de2735926e638233a99031e5bffcd8d67bf158a Mon Sep 17 00:00:00 2001 From: Tom Eccles <[email protected]> Date: Mon, 17 Aug 2026 10:14:54 +0100 Subject: [PATCH 1/3] Revert "workflows/release-binaries: Disable flang on Darwin (#164667)" This reverts commit 6d54a5e5b83ce3502b7a3488fea5afe1c8bf9c5c. Flang Darwin builds were reverted due to #160546. That issue has not been reproducible (at least on my machine) for several months. There was a request for MacOS builds on the most recent flang community call. --- .github/workflows/release-binaries.yml | 7 +++++++ clang/cmake/caches/Release.cmake | 10 ++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml index 36c04523fda06..4460ba5c3f75b 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -157,6 +157,13 @@ jobs: target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_BOOTSTRAP_COMPILER_RT_ENABLE_IOS=OFF" if [ "$RUNNER_ARCH" = "ARM64" ]; then arches=arm64 + else + arches=x86_64 + # Disable Flang builds on macOS x86_64. The FortranLower library takes + # 2-3 hours to build on macOS, much slower than on Linux. + # The long build time causes the release build to time out on x86_64, + # so we need to disable flang there. + target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_PROJECTS='clang;lld;lldb;clang-tools-extra;polly;mlir'" fi target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_BOOTSTRAP_DARWIN_osx_ARCHS=$arches -DBOOTSTRAP_BOOTSTRAP_DARWIN_osx_BUILTIN_ARCHS=$arches" fi diff --git a/clang/cmake/caches/Release.cmake b/clang/cmake/caches/Release.cmake index b0bc3ebfe5cb6..5bea5fa585fce 100644 --- a/clang/cmake/caches/Release.cmake +++ b/clang/cmake/caches/Release.cmake @@ -30,19 +30,13 @@ endfunction() # # cmake -D LLVM_RELEASE_ENABLE_PGO=ON -C Release.cmake -set (DEFAULT_PROJECTS "clang;lld;lldb;clang-tools-extra;polly;mlir") +set (DEFAULT_PROJECTS "clang;lld;lldb;clang-tools-extra;polly;mlir;flang") # bolt only supports ELF, so only enable it for Linux. if (${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux") list(APPEND DEFAULT_PROJECTS "bolt") endif() -set (DEFAULT_RUNTIMES "compiler-rt;libcxx;openmp") -# Don't build flang on Darwin due to: -# https://github.com/llvm/llvm-project/issues/160546 -if (NOT ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Darwin") - list(APPEND DEFAULT_PROJECTS "flang") - list(APPEND DEFAULT_RUNTIMES "flang-rt") -endif() +set (DEFAULT_RUNTIMES "compiler-rt;libcxx;openmp;flang-rt") if (NOT WIN32) list(APPEND DEFAULT_RUNTIMES "libcxxabi" "libunwind") >From 493a7adcbabf15ae724086d1705ce453ad79e070 Mon Sep 17 00:00:00 2001 From: Tom Eccles <[email protected]> Date: Mon, 17 Aug 2026 11:24:54 +0100 Subject: [PATCH 2/3] NOT FOR COMMIT Temporarily enable Flang in macOS precommit Assisted-by: Codex --- .ci/compute_projects.py | 3 --- .ci/compute_projects_test.py | 39 +++++++++++++++++++++++++++++++----- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/.ci/compute_projects.py b/.ci/compute_projects.py index 42d1524d638ed..3bc2a0a42d21b 100644 --- a/.ci/compute_projects.py +++ b/.ci/compute_projects.py @@ -134,11 +134,8 @@ "bolt", "CIR", # Depends on mlir, which is excluded below. "cross-project-tests", - "flang", - "flang-rt", "libc", "mlir", - "openmp", "polly", "libcxx", "libcxxabi", diff --git a/.ci/compute_projects_test.py b/.ci/compute_projects_test.py index c0c9cc100d91b..2056eadae2ce8 100644 --- a/.ci/compute_projects_test.py +++ b/.ci/compute_projects_test.py @@ -62,11 +62,12 @@ def test_llvm_mac(self): ) self.assertEqual( env_variables["projects_to_build"], - "clang;clang-tools-extra;lld;lldb;llvm", + "clang;clang-tools-extra;flang;lld;lldb;llvm", ) self.assertEqual( env_variables["project_check_targets"], - "check-clang check-clang-python check-clang-tools check-lld check-llvm", + "check-clang check-clang-python check-clang-tools check-flang " + "check-lld check-llvm", ) self.assertEqual(env_variables["runtimes_to_build"], "") self.assertEqual( @@ -82,11 +83,13 @@ def test_mlir_mac(self): env_variables = compute_projects.get_env_variables( ["mlir/CMakeLists.txt"], "Darwin" ) - self.assertEqual(env_variables["projects_to_build"], "") - self.assertEqual(env_variables["project_check_targets"], "") + self.assertEqual(env_variables["projects_to_build"], "clang;flang;llvm") + self.assertEqual(env_variables["project_check_targets"], "check-flang") self.assertEqual(env_variables["runtimes_to_build"], "") self.assertEqual(env_variables["runtimes_check_targets"], "") - self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "") + self.assertEqual( + env_variables["runtimes_check_targets_needs_reconfig"], "" + ) self.assertEqual(env_variables["enable_cir"], "OFF") def test_cir_mac(self): @@ -274,6 +277,32 @@ def test_flang(self): self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "") self.assertEqual(env_variables["enable_cir"], "OFF") + def test_flang_mac(self): + env_variables = compute_projects.get_env_variables( + ["flang/CMakeLists.txt"], "Darwin" + ) + self.assertEqual(env_variables["projects_to_build"], "clang;flang;lld;llvm") + self.assertEqual(env_variables["project_check_targets"], "check-flang") + self.assertEqual(env_variables["runtimes_to_build"], "flang-rt;openmp") + self.assertEqual(env_variables["runtimes_check_targets"], "check-flang-rt") + self.assertEqual( + env_variables["runtimes_check_targets_needs_reconfig"], "" + ) + self.assertEqual(env_variables["enable_cir"], "OFF") + + def test_openmp_mac(self): + env_variables = compute_projects.get_env_variables( + ["openmp/CMakeLists.txt"], "Darwin" + ) + self.assertEqual(env_variables["projects_to_build"], "clang;lld") + self.assertEqual(env_variables["project_check_targets"], "") + self.assertEqual(env_variables["runtimes_to_build"], "openmp") + self.assertEqual(env_variables["runtimes_check_targets"], "openmp") + self.assertEqual( + env_variables["runtimes_check_targets_needs_reconfig"], "" + ) + self.assertEqual(env_variables["enable_cir"], "OFF") + def test_invalid_subproject(self): env_variables = compute_projects.get_env_variables( ["llvm-libgcc/CMakeLists.txt"], "Linux" >From 8627337d1361d106ab195ec14169908dd50008d1 Mon Sep 17 00:00:00 2001 From: Tom Eccles <[email protected]> Date: Mon, 17 Aug 2026 13:39:40 +0100 Subject: [PATCH 3/3] Revert "NOT FOR COMMIT Temporarily enable Flang in macOS precommit" This reverts commit 493a7adcbabf15ae724086d1705ce453ad79e070. --- .ci/compute_projects.py | 3 +++ .ci/compute_projects_test.py | 39 +++++------------------------------- 2 files changed, 8 insertions(+), 34 deletions(-) diff --git a/.ci/compute_projects.py b/.ci/compute_projects.py index 3bc2a0a42d21b..42d1524d638ed 100644 --- a/.ci/compute_projects.py +++ b/.ci/compute_projects.py @@ -134,8 +134,11 @@ "bolt", "CIR", # Depends on mlir, which is excluded below. "cross-project-tests", + "flang", + "flang-rt", "libc", "mlir", + "openmp", "polly", "libcxx", "libcxxabi", diff --git a/.ci/compute_projects_test.py b/.ci/compute_projects_test.py index 2056eadae2ce8..c0c9cc100d91b 100644 --- a/.ci/compute_projects_test.py +++ b/.ci/compute_projects_test.py @@ -62,12 +62,11 @@ def test_llvm_mac(self): ) self.assertEqual( env_variables["projects_to_build"], - "clang;clang-tools-extra;flang;lld;lldb;llvm", + "clang;clang-tools-extra;lld;lldb;llvm", ) self.assertEqual( env_variables["project_check_targets"], - "check-clang check-clang-python check-clang-tools check-flang " - "check-lld check-llvm", + "check-clang check-clang-python check-clang-tools check-lld check-llvm", ) self.assertEqual(env_variables["runtimes_to_build"], "") self.assertEqual( @@ -83,13 +82,11 @@ def test_mlir_mac(self): env_variables = compute_projects.get_env_variables( ["mlir/CMakeLists.txt"], "Darwin" ) - self.assertEqual(env_variables["projects_to_build"], "clang;flang;llvm") - self.assertEqual(env_variables["project_check_targets"], "check-flang") + self.assertEqual(env_variables["projects_to_build"], "") + self.assertEqual(env_variables["project_check_targets"], "") self.assertEqual(env_variables["runtimes_to_build"], "") self.assertEqual(env_variables["runtimes_check_targets"], "") - self.assertEqual( - env_variables["runtimes_check_targets_needs_reconfig"], "" - ) + self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "") self.assertEqual(env_variables["enable_cir"], "OFF") def test_cir_mac(self): @@ -277,32 +274,6 @@ def test_flang(self): self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "") self.assertEqual(env_variables["enable_cir"], "OFF") - def test_flang_mac(self): - env_variables = compute_projects.get_env_variables( - ["flang/CMakeLists.txt"], "Darwin" - ) - self.assertEqual(env_variables["projects_to_build"], "clang;flang;lld;llvm") - self.assertEqual(env_variables["project_check_targets"], "check-flang") - self.assertEqual(env_variables["runtimes_to_build"], "flang-rt;openmp") - self.assertEqual(env_variables["runtimes_check_targets"], "check-flang-rt") - self.assertEqual( - env_variables["runtimes_check_targets_needs_reconfig"], "" - ) - self.assertEqual(env_variables["enable_cir"], "OFF") - - def test_openmp_mac(self): - env_variables = compute_projects.get_env_variables( - ["openmp/CMakeLists.txt"], "Darwin" - ) - self.assertEqual(env_variables["projects_to_build"], "clang;lld") - self.assertEqual(env_variables["project_check_targets"], "") - self.assertEqual(env_variables["runtimes_to_build"], "openmp") - self.assertEqual(env_variables["runtimes_check_targets"], "openmp") - self.assertEqual( - env_variables["runtimes_check_targets_needs_reconfig"], "" - ) - self.assertEqual(env_variables["enable_cir"], "OFF") - def test_invalid_subproject(self): env_variables = compute_projects.get_env_variables( ["llvm-libgcc/CMakeLists.txt"], "Linux" _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
