Skip to content

[build.ps1] Support llvm-lit tests with REQUIRES: native condition on Windows #77005

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

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions utils/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1432,6 +1432,15 @@ function Build-Compilers() {
$SwiftFlags += @("-Xcc", "-D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH");
}

if (-not $IsCrossCompiling) {
# We hardcode LLVM_DEFAULT_TARGET_TRIPLE to x86_64-unknown-windows-msvc,
# but the host triple might be inferred as x86_64-pc-windows-msvc, which
# causes llvm-lit to skip `REQUIRES: native` tests.
$TestingDefines += @{
LLVM_HOST_TRIPLE = $Arch.LLVMTarget
}
}

Build-CMakeProject `
-Src $SourceCache\llvm-project\llvm `
-Bin $CompilersBinaryCache `
Expand Down