Skip to content

[windows][toolchain] Restrict the sanitizer build to x64 and disable the legacy path for builtins #78011

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
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion cmake/caches/Windows-aarch64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ foreach(target ${LLVM_RUNTIME_TARGETS})
set(RUNTIMES_${target}_CMAKE_MT mt CACHE STRING "")
set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Windows CACHE STRING "")
set(RUNTIMES_${target}_CMAKE_BUILD_TYPE Release CACHE STRING "")
set(RUNTIMES_${target}_COMPILER_RT_BUILD_BUILTINS YES CACHE BOOL "")
# Builtins are built separately, this is the legacy path
set(RUNTIMES_${target}_COMPILER_RT_BUILD_BUILTINS NO CACHE BOOL "")
set(RUNTIMES_${target}_COMPILER_RT_BUILD_CRT NO CACHE BOOL "")
set(RUNTIMES_${target}_COMPILER_RT_BUILD_LIBFUZZER NO CACHE BOOL "")
set(RUNTIMES_${target}_COMPILER_RT_BUILD_ORC NO CACHE BOOL "")
Expand Down
3 changes: 2 additions & 1 deletion cmake/caches/Windows-x86_64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ foreach(target ${LLVM_RUNTIME_TARGETS})
set(RUNTIMES_${target}_CMAKE_MT mt CACHE STRING "")
set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Windows CACHE STRING "")
set(RUNTIMES_${target}_CMAKE_BUILD_TYPE Release CACHE STRING "")
set(RUNTIMES_${target}_COMPILER_RT_BUILD_BUILTINS YES CACHE BOOL "")
# Builtins are built separately, this is the legacy path
set(RUNTIMES_${target}_COMPILER_RT_BUILD_BUILTINS NO CACHE BOOL "")
set(RUNTIMES_${target}_COMPILER_RT_BUILD_CRT NO CACHE BOOL "")
set(RUNTIMES_${target}_COMPILER_RT_BUILD_LIBFUZZER NO CACHE BOOL "")
set(RUNTIMES_${target}_COMPILER_RT_BUILD_ORC NO CACHE BOOL "")
Expand Down
4 changes: 3 additions & 1 deletion utils/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2774,7 +2774,9 @@ if (-not $SkipBuild) {

$InstallTo = "$($HostArch.ToolchainInstallRoot)\usr"
foreach ($Arch in $WindowsSDKArchs) {
Invoke-BuildStep Build-Sanitizers Windows $Arch $InstallTo
if ($Arch.ShortName = "x64") {
Copy link
Member

Choose a reason for hiding this comment

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

Can the sanitizers work on x86 as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but we didn't test it and since the arm64 test was negative, it seemed reasonable to stick to what we know works.

Invoke-BuildStep Build-Sanitizers Windows $Arch $InstallTo
}
}
}

Expand Down