-
Notifications
You must be signed in to change notification settings - Fork 754
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge from 'main' to 'sycl-web' (35 commits)
CONFLICT (content): Merge conflict in llvm/docs/requirements-hashed.txt
- Loading branch information
Showing
336 changed files
with
14,276 additions
and
5,460 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
include_directories(..) | ||
|
||
# Runtime library sources and build flags. | ||
set(TYSAN_SOURCES | ||
tysan.cpp | ||
tysan_interceptors.cpp) | ||
set(TYSAN_COMMON_CFLAGS ${SANITIZER_COMMON_CFLAGS}) | ||
append_rtti_flag(OFF TYSAN_COMMON_CFLAGS) | ||
# Prevent clang from generating libc calls. | ||
append_list_if(COMPILER_RT_HAS_FFREESTANDING_FLAG -ffreestanding TYSAN_COMMON_CFLAGS) | ||
|
||
add_compiler_rt_object_libraries(RTTysan_dynamic | ||
OS ${SANITIZER_COMMON_SUPPORTED_OS} | ||
ARCHS ${TYSAN_SUPPORTED_ARCH} | ||
SOURCES ${TYSAN_SOURCES} | ||
ADDITIONAL_HEADERS ${TYSAN_HEADERS} | ||
CFLAGS ${TYSAN_DYNAMIC_CFLAGS} | ||
DEFS ${TYSAN_DYNAMIC_DEFINITIONS}) | ||
|
||
|
||
# Static runtime library. | ||
add_compiler_rt_component(tysan) | ||
|
||
|
||
if(APPLE) | ||
add_weak_symbols("sanitizer_common" WEAK_SYMBOL_LINK_FLAGS) | ||
|
||
add_compiler_rt_runtime(clang_rt.tysan | ||
SHARED | ||
OS ${SANITIZER_COMMON_SUPPORTED_OS} | ||
ARCHS ${TYSAN_SUPPORTED_ARCH} | ||
OBJECT_LIBS RTTysan_dynamic | ||
RTInterception | ||
RTSanitizerCommon | ||
RTSanitizerCommonLibc | ||
RTSanitizerCommonSymbolizer | ||
CFLAGS ${TYSAN_DYNAMIC_CFLAGS} | ||
LINK_FLAGS ${WEAK_SYMBOL_LINK_FLAGS} | ||
DEFS ${TYSAN_DYNAMIC_DEFINITIONS} | ||
PARENT_TARGET tysan) | ||
|
||
add_compiler_rt_runtime(clang_rt.tysan_static | ||
STATIC | ||
ARCHS ${TYSAN_SUPPORTED_ARCH} | ||
OBJECT_LIBS RTTysan_static | ||
CFLAGS ${TYSAN_CFLAGS} | ||
DEFS ${TYSAN_COMMON_DEFINITIONS} | ||
PARENT_TARGET tysan) | ||
else() | ||
foreach(arch ${TYSAN_SUPPORTED_ARCH}) | ||
set(TYSAN_CFLAGS ${TYSAN_COMMON_CFLAGS}) | ||
append_list_if(COMPILER_RT_HAS_FPIE_FLAG -fPIE TYSAN_CFLAGS) | ||
add_compiler_rt_runtime(clang_rt.tysan | ||
STATIC | ||
ARCHS ${arch} | ||
SOURCES ${TYSAN_SOURCES} | ||
$<TARGET_OBJECTS:RTInterception.${arch}> | ||
$<TARGET_OBJECTS:RTSanitizerCommon.${arch}> | ||
$<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}> | ||
$<TARGET_OBJECTS:RTSanitizerCommonSymbolizer.${arch}> | ||
CFLAGS ${TYSAN_CFLAGS} | ||
PARENT_TARGET tysan) | ||
endforeach() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# -*- Python -*- | ||
|
||
import os | ||
|
||
# Setup config name. | ||
config.name = 'TypeSanitizer' + getattr(config, 'name_suffix', 'default') | ||
|
||
# Setup source root. | ||
config.test_source_root = os.path.dirname(__file__) | ||
|
||
# Setup default compiler flags used with -fsanitize=type option. | ||
clang_tysan_cflags = (["-fsanitize=type", | ||
"-mno-omit-leaf-frame-pointer", | ||
"-fno-omit-frame-pointer", | ||
"-fno-optimize-sibling-calls"] + | ||
config.target_cflags + | ||
config.debug_info_flags) | ||
clang_tysan_cxxflags = config.cxx_mode_flags + clang_tysan_cflags | ||
|
||
def build_invocation(compile_flags): | ||
return " " + " ".join([config.clang] + compile_flags) + " " | ||
|
||
config.substitutions.append( ("%clang_tysan ", build_invocation(clang_tysan_cflags)) ) | ||
config.substitutions.append( ("%clangxx_tysan ", build_invocation(clang_tysan_cxxflags)) ) | ||
|
||
# Default test suffixes. | ||
config.suffixes = ['.c', '.cc', '.cpp'] | ||
|
||
# TypeSanitizer tests are currently supported on Linux only. | ||
if config.host_os not in ['Linux']: | ||
config.unsupported = True | ||
|
||
if config.target_arch != 'aarch64': | ||
config.available_features.add('stable-runtime') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@LIT_SITE_CFG_IN_HEADER@ | ||
|
||
# Tool-specific config options. | ||
config.name_suffix = "@TYSAN_TEST_CONFIG_SUFFIX@" | ||
config.target_cflags = "@TYSAN_TEST_TARGET_CFLAGS@" | ||
config.target_arch = "@TYSAN_TEST_TARGET_ARCH@" | ||
|
||
# Load common config for all compiler-rt lit tests. | ||
lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured") | ||
|
||
# Load tool-specific config that would do the real work. | ||
lit_config.load_config(config, "@TYSAN_LIT_SOURCE_DIR@/lit.cfg") |
Oops, something went wrong.