mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Revert "[windows][toolchain] Enable builtins and sanitizers"
Revert https://github.com/swiftlang/swift/pull/77770 To fix CI https://ci-external.swift.org/job/swift-main-windows-toolchain-arm64/785/consoleText
This commit is contained in:
@@ -26,24 +26,9 @@ set(LLVM_DEFAULT_TARGET_TRIPLE aarch64-unknown-windows-msvc CACHE STRING "")
|
||||
set(LLVM_APPEND_VC_REV NO CACHE BOOL "")
|
||||
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR YES CACHE BOOL "")
|
||||
set(LLVM_ENABLE_PYTHON YES CACHE BOOL "")
|
||||
|
||||
set(default_targets
|
||||
x86_64-unknown-windows-msvc
|
||||
set(LLVM_RUNTIME_TARGETS
|
||||
aarch64-unknown-windows-msvc
|
||||
i686-unknown-windows-msvc)
|
||||
set(LLVM_RUNTIME_TARGETS ${default_targets} CACHE STRING "")
|
||||
|
||||
# Build the android builtins if NDK path is provided.
|
||||
if(NOT "$ENV{NDKPATH}" STREQUAL "")
|
||||
list(APPEND default_targets
|
||||
aarch64-unknown-linux-android
|
||||
x86_64-unknown-linux-android
|
||||
i686-unknown-linux-android
|
||||
armv7-unknown-linux-androideabi)
|
||||
endif()
|
||||
|
||||
set(LLVM_BUILTIN_TARGETS ${default_targets} CACHE STRING "")
|
||||
|
||||
CACHE STRING "")
|
||||
foreach(target ${LLVM_RUNTIME_TARGETS})
|
||||
set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES
|
||||
compiler-rt
|
||||
@@ -51,40 +36,11 @@ 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 "")
|
||||
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 "")
|
||||
set(RUNTIMES_${target}_COMPILER_RT_BUILD_PROFILE YES CACHE BOOL "")
|
||||
set(RUNTIMES_${target}_COMPILER_RT_BUILD_XRAY NO CACHE BOOL "")
|
||||
# Sanitizers will be configured, but not built. We have separate build
|
||||
# steps for that, because we need a different shell for each target.
|
||||
set(RUNTIMES_${target}_COMPILER_RT_BUILD_SANITIZERS NO CACHE BOOL "")
|
||||
endforeach()
|
||||
|
||||
foreach(target ${LLVM_BUILTIN_TARGETS})
|
||||
set(BUILTINS_${target}_CMAKE_MT mt CACHE STRING "")
|
||||
if(${target} MATCHES windows-msvc)
|
||||
set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Windows CACHE STRING "")
|
||||
elseif(${target} MATCHES linux-android)
|
||||
# Use a single 'linux' directory and arch-based lib names on Android.
|
||||
set(BUILTINS_${target}_LLVM_ENABLE_PER_TARGET_RUNTIME_DIR NO CACHE BOOL "")
|
||||
set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Android CACHE STRING "")
|
||||
if(${target} MATCHES aarch64)
|
||||
set(BUILTINS_${target}_CMAKE_ANDROID_ARCH_ABI arm64-v8a CACHE STRING "")
|
||||
elseif(${target} MATCHES armv7)
|
||||
set(BUILTINS_${target}_CMAKE_ANDROID_ARCH_ABI armeabi-v7a CACHE STRING "")
|
||||
elseif(${target} MATCHES i686)
|
||||
set(BUILTINS_${target}_CMAKE_ANDROID_ARCH_ABI x86 CACHE STRING "")
|
||||
else()
|
||||
set(BUILTINS_${target}_CMAKE_ANDROID_ARCH_ABI x86_64 CACHE STRING "")
|
||||
endif()
|
||||
set(BUILTINS_${target}_CMAKE_ANDROID_NDK $ENV{NDKPATH} CACHE PATH "")
|
||||
set(BUILTINS_${target}_CMAKE_ANDROID_API 21 CACHE STRING "")
|
||||
set(BUILTINS_${target}_CMAKE_C_COMPILER_TARGET "${target}21" CACHE STRING "")
|
||||
set(BUILTINS_${target}_CMAKE_CXX_COMPILER_TARGET "${target}21" CACHE STRING "")
|
||||
endif()
|
||||
set(BUILTINS_${target}_CMAKE_BUILD_TYPE Release CACHE STRING "")
|
||||
set(RUNTIMES_${target}_COMPILER_RT_BUILD_XRAY NO CACHE BOOL "")
|
||||
endforeach()
|
||||
|
||||
set(LLVM_TARGETS_TO_BUILD AArch64 ARM WebAssembly X86 CACHE STRING "")
|
||||
@@ -211,7 +167,6 @@ set(LLVM_DISTRIBUTION_COMPONENTS
|
||||
libclang
|
||||
libclang-headers
|
||||
LTO
|
||||
builtins
|
||||
runtimes
|
||||
${LLVM_TOOLCHAIN_TOOLS}
|
||||
${CLANG_TOOLS}
|
||||
|
||||
@@ -27,22 +27,24 @@ set(LLVM_APPEND_VC_REV NO CACHE BOOL "")
|
||||
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR YES CACHE BOOL "")
|
||||
set(LLVM_ENABLE_PYTHON YES CACHE BOOL "")
|
||||
|
||||
set(default_targets
|
||||
set(DEFAULT_BUILTIN_TARGETS
|
||||
x86_64-unknown-windows-msvc
|
||||
aarch64-unknown-windows-msvc
|
||||
i686-unknown-windows-msvc)
|
||||
set(LLVM_RUNTIME_TARGETS ${default_targets} CACHE STRING "")
|
||||
|
||||
aarch64-unknown-windows-msvc)
|
||||
# Build the android builtins if NDK path is provided.
|
||||
if(NOT "$ENV{NDKPATH}" STREQUAL "")
|
||||
list(APPEND default_targets
|
||||
list(APPEND DEFAULT_BUILTIN_TARGETS
|
||||
aarch64-unknown-linux-android
|
||||
x86_64-unknown-linux-android
|
||||
i686-unknown-linux-android
|
||||
armv7-unknown-linux-androideabi)
|
||||
x86_64-unknown-linux-android)
|
||||
endif()
|
||||
|
||||
set(LLVM_BUILTIN_TARGETS ${default_targets} CACHE STRING "")
|
||||
# The builtin targets are used to build the compiler-rt builtins.
|
||||
set(LLVM_BUILTIN_TARGETS ${DEFAULT_BUILTIN_TARGETS} CACHE STRING "")
|
||||
|
||||
# The runtime targets are used to build the compiler-rt profile library.
|
||||
set(LLVM_RUNTIME_TARGETS
|
||||
x86_64-unknown-windows-msvc
|
||||
aarch64-unknown-windows-msvc
|
||||
CACHE STRING "")
|
||||
|
||||
foreach(target ${LLVM_RUNTIME_TARGETS})
|
||||
set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES
|
||||
@@ -51,15 +53,13 @@ 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 "")
|
||||
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 "")
|
||||
set(RUNTIMES_${target}_COMPILER_RT_BUILD_PROFILE YES CACHE BOOL "")
|
||||
set(RUNTIMES_${target}_COMPILER_RT_BUILD_XRAY NO CACHE BOOL "")
|
||||
# Sanitizers will be configured, but not built. We have separate build
|
||||
# steps for that, because we need a different shell for each target.
|
||||
set(RUNTIMES_${target}_COMPILER_RT_BUILD_SANITIZERS NO CACHE BOOL "")
|
||||
set(RUNTIMES_${target}_COMPILER_RT_BUILD_XRAY NO CACHE BOOL "")
|
||||
endforeach()
|
||||
|
||||
foreach(target ${LLVM_BUILTIN_TARGETS})
|
||||
@@ -72,10 +72,6 @@ foreach(target ${LLVM_BUILTIN_TARGETS})
|
||||
set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Android CACHE STRING "")
|
||||
if(${target} MATCHES aarch64)
|
||||
set(BUILTINS_${target}_CMAKE_ANDROID_ARCH_ABI arm64-v8a CACHE STRING "")
|
||||
elseif(${target} MATCHES armv7)
|
||||
set(BUILTINS_${target}_CMAKE_ANDROID_ARCH_ABI armeabi-v7a CACHE STRING "")
|
||||
elseif(${target} MATCHES i686)
|
||||
set(BUILTINS_${target}_CMAKE_ANDROID_ARCH_ABI x86 CACHE STRING "")
|
||||
else()
|
||||
set(BUILTINS_${target}_CMAKE_ANDROID_ARCH_ABI x86_64 CACHE STRING "")
|
||||
endif()
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// UNSUPPORTED: OS=windows-msvc
|
||||
|
||||
// Different sanitizer coverage types
|
||||
// RUN: %swiftc_driver -driver-print-jobs -sanitize-coverage=func -sanitize=address %s | %FileCheck -check-prefix=SANCOV_FUNC %s
|
||||
// RUN: %swiftc_driver -driver-print-jobs -sanitize-coverage=bb -sanitize=address %s | %FileCheck -check-prefix=SANCOV_BB %s
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// UNSUPPORTED: OS=windows-msvc
|
||||
// REQUIRES: asan_runtime
|
||||
|
||||
// Default instrumentation that does not use ODR indicators
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// UNSUPPORTED: OS=windows-msvc
|
||||
|
||||
// RUN: %target-swiftc_driver %s -g -sanitize=address -o %t_asan-binary
|
||||
// RUN: %target-codesign %t_asan-binary
|
||||
// RUN: env ASAN_OPTIONS=detect_leaks=0 %target-run %t_asan-binary
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// UNSUPPORTED: OS=linux-gnu && CPU=aarch64
|
||||
// UNSUPPORTED: OS=windows-msvc
|
||||
|
||||
// rdar://100805115
|
||||
// UNSUPPORTED: CPU=arm64e
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// UNSUPPORTED: OS=windows-msvc
|
||||
|
||||
// RUN: %target-swiftc_driver %s -g -sanitize=address -o %t_asan-binary
|
||||
// RUN: %target-codesign %t_asan-binary
|
||||
// RUN: env %env-ASAN_OPTIONS=abort_on_error=0 not %target-run %t_asan-binary 2>&1 | %FileCheck %s
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
// For now restrict this test to platforms where we know this test will pass
|
||||
// REQUIRES: CPU=x86_64
|
||||
// UNSUPPORTED: remote_run
|
||||
// UNSUPPORTED: OS=windows-msvc
|
||||
|
||||
func sayHello() {
|
||||
print("Hello")
|
||||
|
||||
@@ -1834,21 +1834,6 @@ function Build-CURL([Platform]$Platform, $Arch) {
|
||||
})
|
||||
}
|
||||
|
||||
function Build-Sanitizers([Platform]$Platform, $Arch, $InstallTo) {
|
||||
Isolate-EnvVars {
|
||||
# Use configured compilers
|
||||
Build-CMakeProject `
|
||||
-Src $SourceCache\llvm-project\runtimes `
|
||||
-Bin "$(Get-HostProjectBinaryCache Compilers)\runtimes\runtimes-$($Arch.LLVMTarget)-bins" `
|
||||
-InstallTo $InstallTo `
|
||||
-Arch $Arch `
|
||||
-Platform $Platform `
|
||||
-Defines (@{
|
||||
COMPILER_RT_BUILD_SANITIZERS = "YES"
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function Build-Runtime([Platform]$Platform, $Arch) {
|
||||
$PlatformDefines = @{}
|
||||
if ($Platform -eq [Platform]::Android) {
|
||||
@@ -2856,11 +2841,6 @@ if (-not $SkipBuild) {
|
||||
Invoke-BuildStep Build-CMark $HostArch
|
||||
Invoke-BuildStep Build-XML2 Windows $HostArch
|
||||
Invoke-BuildStep Build-Compilers $HostArch
|
||||
|
||||
$InstallTo = "$($HostArch.ToolchainInstallRoot)\usr"
|
||||
foreach ($Arch in $WindowsSDKArchs) {
|
||||
Invoke-BuildStep Build-Sanitizers Windows $Arch $InstallTo
|
||||
}
|
||||
}
|
||||
|
||||
if ($Clean) {
|
||||
|
||||
Reference in New Issue
Block a user