Skip to content
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

WoA LLVM bots config update to improve build time #286

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

omjavaid
Copy link
Contributor

Since #252 we have got increased build times on WoA build bots. Also WoA 2 stage bot does not collapse the queue because it is not configured to always do a clean build. This patch tries to fix above issues.

On both single and 2 stage bots:

  • Set LLVM_TARGETS_TO_BUILD to 'ARM;AArch64;X86'. We only care about these targets on windows.

On 2 stage bot:

  • Set stage 1 LLVM_TARGETS_TO_BUILD to AArch64 only.
  • Set extra_stage2_cmake_args which overrides extra_cmake_flags.
  • Disable flang build on stage1 by setting checkout_flang=False.
  • Enabled LLVM_ENABLE_PROJECTS=flang;mlir for stage 2.
  • Switched to a clean build (clean=True) for collapsing queue.
  • Like stage 1 set stage 2 CLANG_DEFAULT_LINKER to lld. This makes sure just built lld is used by just built clang as default linker.

Since llvm#252 we have got increased build times on WoA build bots.
Also WoA 2 stage bot does not collapse the queue because it is
not configured to always do a clean build. This patch tries to
fix above issues.

On both single and 2 stage bots:
- Set `LLVM_TARGETS_TO_BUILD` to 'ARM;AArch64;X86'. We only care
  about these targets on windows.

On 2 stage bot:
- Set stage 1 LLVM_TARGETS_TO_BUILD to AArch64 only.
- Set extra_stage2_cmake_args which overrides extra_cmake_flags.
- Disable flang build on stage1 by setting checkout_flang=False.
- Enabled `LLVM_ENABLE_PROJECTS=flang;mlir` for stage 2.
- Switched to a clean build (`clean=True`) for collapsing queue.
- Like stage 1 set stage 2 CLANG_DEFAULT_LINKER to lld. This makes
  sure just built lld is used by just built clang as default linker.
testStage1=False,
extra_cmake_args=[
"-DLLVM_TARGETS_TO_BUILD=AArch64",
Copy link
Contributor

Choose a reason for hiding this comment

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

It's obvious in hindsight but if we're not testing stage 1, of course it only needs to be able to produce code for the host. Great thinking!

Every saving helps with this particular build.

"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"],
extra_stage2_cmake_args=[
"-DLLVM_TARGETS_TO_BUILD='ARM;AArch64;X86'",
"-DLLVM_ENABLE_PROJECTS=flang;mlir",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this additive or replacing the projects?

I assume we should have clang and maybe lld in this list.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

clang clang-tools-extra and llvm gets automatically added in both configs. Also we have set checkout_lld=True which will include lld automatically.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it will replace -DLLVM_ENABLE_PROJECTS arg to whatever is defined in f.enable_projects (

CmakeCommand.applyRequiredOptions(extra_stage2_cmake_args, [
). But even if it would work as you think it should, then you build projects commits to which do not trigger the build. leading to false blame lists in case of broken flang or mlir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants