Skip to content

[flang][cmake] Separate FLANG_INCLUDE_TOOLS from FLANG_BUILD_TOOLS #145005

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 2 commits into from
Jul 3, 2025

Conversation

parabola94
Copy link
Contributor

@parabola94 parabola94 commented Jun 20, 2025

If we disable FLANG_BUILD_TOOLS, not only building the tools but also generating the targets for them is skipped now. On the other hand, llvm separates them into LLVM_BUILD_TOOLS and LLVM_INCLUDE_TOOLS.
This patch introduces FLANG_INCLUDE_TOOLS for the distinction.

Copy link

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

@llvmbot llvmbot added the flang Flang issues not falling into any other category label Jun 20, 2025
@parabola94
Copy link
Contributor Author

@Meinersbur @vzakhari @mgorny
Could you review this PR or assign anybody else to reviewers? I cannot add reviewers by myself because I do not have write permissions.

@mgorny mgorny requested review from Meinersbur and vzakhari June 24, 2025 12:13
@mgorny
Copy link
Member

mgorny commented Jun 24, 2025

At a first glance, it looks good, but I'll defer to maintainers.

Copy link
Contributor

@vzakhari vzakhari left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you!

@parabola94
Copy link
Contributor Author

Thank you for the review! Could you merge this PR? It seems that I'm not granted to do that.

@parabola94
Copy link
Contributor Author

Thank you for the review! Could you merge this PR? It seems that I'm not granted to do that.

@mgorny @vzakhari would you mind if I ask you to do this?

@mgorny
Copy link
Member

mgorny commented Jul 3, 2025

Sure, sorry. I've started the workflows now, and will merge when they're done.

@mgorny mgorny merged commit 2b49d36 into llvm:main Jul 3, 2025
7 checks passed
Copy link

github-actions bot commented Jul 3, 2025

@parabola94 Congratulations on having your first Pull Request (PR) merged into the LLVM Project!

Your changes will be combined with recent changes from other authors, then tested by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR.

Please check whether problems have been caused by your change specifically, as the builds can include changes from many authors. It is not uncommon for your change to be included in a build that fails due to someone else's changes, or infrastructure issues.

How to do this, and the rest of the post-merge process, is covered in detail here.

If your change does cause a problem, it may be reverted, or you can revert it yourself. This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again.

If you don't get any reports, no action is required from you. Your changes are working as expected, well done!

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 3, 2025

LLVM Buildbot has detected a new failure on builder flang-arm64-windows-msvc running on linaro-armv8-windows-msvc-01 while building flang at step 7 "test-build-unified-tree-check-flang".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-flang) failure: test (failure)
******************** TEST 'Flang :: Lower/OpenMP/wsloop-reduction-logical-kinds.f90' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 1
c:\users\tcwg\llvm-worker\flang-arm64-windows-msvc\build\bin\flang.exe -fc1 -emit-hlfir -fopenmp -o - C:\Users\tcwg\llvm-worker\flang-arm64-windows-msvc\llvm-project\flang\test\Lower\OpenMP\wsloop-reduction-logical-kinds.f90 | c:\users\tcwg\llvm-worker\flang-arm64-windows-msvc\build\bin\filecheck.exe C:\Users\tcwg\llvm-worker\flang-arm64-windows-msvc\llvm-project\flang\test\Lower\OpenMP\wsloop-reduction-logical-kinds.f90
# executed command: 'c:\users\tcwg\llvm-worker\flang-arm64-windows-msvc\build\bin\flang.exe' -fc1 -emit-hlfir -fopenmp -o - 'C:\Users\tcwg\llvm-worker\flang-arm64-windows-msvc\llvm-project\flang\test\Lower\OpenMP\wsloop-reduction-logical-kinds.f90'
# .---command stderr------------
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | Stack dump:
# | 0.	Program arguments: c:\\users\\tcwg\\llvm-worker\\flang-arm64-windows-msvc\\build\\bin\\flang.exe -fc1 -emit-hlfir -fopenmp -o - C:\\Users\\tcwg\\llvm-worker\\flang-arm64-windows-msvc\\llvm-project\\flang\\test\\Lower\\OpenMP\\wsloop-reduction-logical-kinds.f90
# | Exception Code: 0xC0000005
# |  #0 0x00007ff6849f1d3c (c:\users\tcwg\llvm-worker\flang-arm64-windows-msvc\build\bin\flang.exe+0x1a91d3c)
# |  #1 0x00007ff6849efa24 (c:\users\tcwg\llvm-worker\flang-arm64-windows-msvc\build\bin\flang.exe+0x1a8fa24)
# |  #2 0x00007ff6849ed8b8 (c:\users\tcwg\llvm-worker\flang-arm64-windows-msvc\build\bin\flang.exe+0x1a8d8b8)
# |  #3 0x00007ff6849f35cc (c:\users\tcwg\llvm-worker\flang-arm64-windows-msvc\build\bin\flang.exe+0x1a935cc)
# |  #4 0x00007ff6849ed420 (c:\users\tcwg\llvm-worker\flang-arm64-windows-msvc\build\bin\flang.exe+0x1a8d420)
# |  #5 0x00007ff68380c7a8 (c:\users\tcwg\llvm-worker\flang-arm64-windows-msvc\build\bin\flang.exe+0x8ac7a8)
# |  #6 0x00007ff683855c08 (c:\users\tcwg\llvm-worker\flang-arm64-windows-msvc\build\bin\flang.exe+0x8f5c08)
# |  #7 0x00007ff6838ff04c (c:\users\tcwg\llvm-worker\flang-arm64-windows-msvc\build\bin\flang.exe+0x99f04c)
# |  #8 0x00007ff683855044 (c:\users\tcwg\llvm-worker\flang-arm64-windows-msvc\build\bin\flang.exe+0x8f5044)
# |  #9 0x00007ff682ff8ac0 (c:\users\tcwg\llvm-worker\flang-arm64-windows-msvc\build\bin\flang.exe+0x98ac0)
# | #10 0x00007ff68300ea88 (c:\users\tcwg\llvm-worker\flang-arm64-windows-msvc\build\bin\flang.exe+0xaea88)
# | #11 0x00007ff682f634e8 (c:\users\tcwg\llvm-worker\flang-arm64-windows-msvc\build\bin\flang.exe+0x34e8)
# | #12 0x00007ff682f620a4 (c:\users\tcwg\llvm-worker\flang-arm64-windows-msvc\build\bin\flang.exe+0x20a4)
# | #13 0x00007ff687c1dc30 mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\users\tcwg\llvm-worker\flang-arm64-windows-msvc\build\bin\flang.exe+0x4cbdc30)
# | #14 0x2b08fff687c1dccc
# `-----------------------------
# error: command failed with exit status: 0xc0000005
# executed command: 'c:\users\tcwg\llvm-worker\flang-arm64-windows-msvc\build\bin\filecheck.exe' 'C:\Users\tcwg\llvm-worker\flang-arm64-windows-msvc\llvm-project\flang\test\Lower\OpenMP\wsloop-reduction-logical-kinds.f90'
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  c:\users\tcwg\llvm-worker\flang-arm64-windows-msvc\build\bin\filecheck.exe C:\Users\tcwg\llvm-worker\flang-arm64-windows-msvc\llvm-project\flang\test\Lower\OpenMP\wsloop-reduction-logical-kinds.f90
# `-----------------------------
# error: command failed with exit status: 2

--

********************


@parabola94 parabola94 deleted the flang-include-tools branch July 3, 2025 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants