annotate projects/compiler-rt/cmake/config-ix.cmake @ 131:f476a9ba4795

http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
author mir3636
date Fri, 16 Feb 2018 21:02:11 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
131
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
1 include(CMakePushCheckState)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
2 include(CheckCCompilerFlag)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
3 include(CheckCXXCompilerFlag)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
4 include(CheckLibraryExists)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
5 include(CheckSymbolExists)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
6 include(TestBigEndian)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
7
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
8 function(check_linker_flag flag out_var)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
9 cmake_push_check_state()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
10 set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${flag}")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
11 check_cxx_compiler_flag("" ${out_var})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
12 cmake_pop_check_state()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
13 endfunction()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
14
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
15 check_library_exists(c fopen "" COMPILER_RT_HAS_LIBC)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
16 if (NOT SANITIZER_USE_COMPILER_RT)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
17 if (ANDROID)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
18 check_library_exists(gcc __gcc_personality_v0 "" COMPILER_RT_HAS_GCC_LIB)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
19 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
20 check_library_exists(gcc_s __gcc_personality_v0 "" COMPILER_RT_HAS_GCC_S_LIB)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
21 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
22 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
23
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
24 check_c_compiler_flag(-nodefaultlibs COMPILER_RT_HAS_NODEFAULTLIBS_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
25 if (COMPILER_RT_HAS_NODEFAULTLIBS_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
26 set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -nodefaultlibs")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
27 if (COMPILER_RT_HAS_LIBC)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
28 list(APPEND CMAKE_REQUIRED_LIBRARIES c)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
29 endif ()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
30 if (SANITIZER_USE_COMPILER_RT)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
31 list(APPEND CMAKE_REQUIRED_FLAGS -rtlib=compiler-rt)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
32 find_compiler_rt_library(builtins COMPILER_RT_BUILTINS_LIBRARY)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
33 list(APPEND CMAKE_REQUIRED_LIBRARIES "${COMPILER_RT_BUILTINS_LIBRARY}")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
34 elseif (COMPILER_RT_HAS_GCC_S_LIB)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
35 list(APPEND CMAKE_REQUIRED_LIBRARIES gcc_s)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
36 elseif (COMPILER_RT_HAS_GCC_LIB)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
37 list(APPEND CMAKE_REQUIRED_LIBRARIES gcc)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
38 endif ()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
39 endif ()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
40
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
41 # CodeGen options.
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
42 check_cxx_compiler_flag(-fPIC COMPILER_RT_HAS_FPIC_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
43 check_cxx_compiler_flag(-fPIE COMPILER_RT_HAS_FPIE_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
44 check_cxx_compiler_flag(-fno-builtin COMPILER_RT_HAS_FNO_BUILTIN_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
45 check_cxx_compiler_flag(-fno-exceptions COMPILER_RT_HAS_FNO_EXCEPTIONS_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
46 check_cxx_compiler_flag(-fomit-frame-pointer COMPILER_RT_HAS_FOMIT_FRAME_POINTER_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
47 check_cxx_compiler_flag(-funwind-tables COMPILER_RT_HAS_FUNWIND_TABLES_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
48 check_cxx_compiler_flag(-fno-stack-protector COMPILER_RT_HAS_FNO_STACK_PROTECTOR_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
49 check_cxx_compiler_flag(-fno-sanitize=safe-stack COMPILER_RT_HAS_FNO_SANITIZE_SAFE_STACK_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
50 check_cxx_compiler_flag(-fvisibility=hidden COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
51 check_cxx_compiler_flag(-frtti COMPILER_RT_HAS_FRTTI_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
52 check_cxx_compiler_flag(-fno-rtti COMPILER_RT_HAS_FNO_RTTI_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
53 check_cxx_compiler_flag(-ffreestanding COMPILER_RT_HAS_FFREESTANDING_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
54 check_cxx_compiler_flag("-Werror -fno-function-sections" COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
55 check_cxx_compiler_flag(-std=c++11 COMPILER_RT_HAS_STD_CXX11_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
56 check_cxx_compiler_flag(-ftls-model=initial-exec COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
57 check_cxx_compiler_flag(-fno-lto COMPILER_RT_HAS_FNO_LTO_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
58 check_cxx_compiler_flag("-Werror -msse3" COMPILER_RT_HAS_MSSE3_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
59 check_cxx_compiler_flag("-Werror -msse4.2" COMPILER_RT_HAS_MSSE4_2_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
60 check_cxx_compiler_flag(--sysroot=. COMPILER_RT_HAS_SYSROOT_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
61 check_cxx_compiler_flag("-Werror -mcrc" COMPILER_RT_HAS_MCRC_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
62
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
63 if(NOT WIN32 AND NOT CYGWIN)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
64 # MinGW warns if -fvisibility-inlines-hidden is used.
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
65 check_cxx_compiler_flag("-fvisibility-inlines-hidden" COMPILER_RT_HAS_FVISIBILITY_INLINES_HIDDEN_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
66 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
67
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
68 check_cxx_compiler_flag(/GR COMPILER_RT_HAS_GR_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
69 check_cxx_compiler_flag(/GS COMPILER_RT_HAS_GS_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
70 check_cxx_compiler_flag(/MT COMPILER_RT_HAS_MT_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
71 check_cxx_compiler_flag(/Oy COMPILER_RT_HAS_Oy_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
72
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
73 # Debug info flags.
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
74 check_cxx_compiler_flag(-gline-tables-only COMPILER_RT_HAS_GLINE_TABLES_ONLY_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
75 check_cxx_compiler_flag(-g COMPILER_RT_HAS_G_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
76 check_cxx_compiler_flag(/Zi COMPILER_RT_HAS_Zi_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
77
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
78 # Warnings.
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
79 check_cxx_compiler_flag(-Wall COMPILER_RT_HAS_WALL_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
80 check_cxx_compiler_flag(-Werror COMPILER_RT_HAS_WERROR_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
81 check_cxx_compiler_flag("-Werror -Wframe-larger-than=512" COMPILER_RT_HAS_WFRAME_LARGER_THAN_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
82 check_cxx_compiler_flag("-Werror -Wglobal-constructors" COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
83 check_cxx_compiler_flag("-Werror -Wc99-extensions" COMPILER_RT_HAS_WC99_EXTENSIONS_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
84 check_cxx_compiler_flag("-Werror -Wgnu" COMPILER_RT_HAS_WGNU_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
85 check_cxx_compiler_flag("-Werror -Wnon-virtual-dtor" COMPILER_RT_HAS_WNON_VIRTUAL_DTOR_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
86 check_cxx_compiler_flag("-Werror -Wvariadic-macros" COMPILER_RT_HAS_WVARIADIC_MACROS_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
87 check_cxx_compiler_flag("-Werror -Wunused-parameter" COMPILER_RT_HAS_WUNUSED_PARAMETER_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
88 check_cxx_compiler_flag("-Werror -Wcovered-switch-default" COMPILER_RT_HAS_WCOVERED_SWITCH_DEFAULT_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
89
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
90 check_cxx_compiler_flag(/W4 COMPILER_RT_HAS_W4_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
91 check_cxx_compiler_flag(/WX COMPILER_RT_HAS_WX_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
92 check_cxx_compiler_flag(/wd4146 COMPILER_RT_HAS_WD4146_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
93 check_cxx_compiler_flag(/wd4291 COMPILER_RT_HAS_WD4291_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
94 check_cxx_compiler_flag(/wd4221 COMPILER_RT_HAS_WD4221_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
95 check_cxx_compiler_flag(/wd4391 COMPILER_RT_HAS_WD4391_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
96 check_cxx_compiler_flag(/wd4722 COMPILER_RT_HAS_WD4722_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
97 check_cxx_compiler_flag(/wd4800 COMPILER_RT_HAS_WD4800_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
98
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
99 # Symbols.
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
100 check_symbol_exists(__func__ "" COMPILER_RT_HAS_FUNC_SYMBOL)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
101
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
102 # Libraries.
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
103 check_library_exists(dl dlopen "" COMPILER_RT_HAS_LIBDL)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
104 check_library_exists(rt shm_open "" COMPILER_RT_HAS_LIBRT)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
105 check_library_exists(m pow "" COMPILER_RT_HAS_LIBM)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
106 check_library_exists(pthread pthread_create "" COMPILER_RT_HAS_LIBPTHREAD)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
107 if (ANDROID AND COMPILER_RT_HAS_LIBDL)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
108 # Android's libstdc++ has a dependency on libdl.
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
109 list(APPEND CMAKE_REQUIRED_LIBRARIES dl)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
110 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
111 check_library_exists(stdc++ __cxa_throw "" COMPILER_RT_HAS_LIBSTDCXX)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
112
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
113 # Linker flags.
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
114 if(ANDROID)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
115 check_linker_flag("-Wl,-z,global" COMPILER_RT_HAS_Z_GLOBAL)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
116 check_library_exists(log __android_log_write "" COMPILER_RT_HAS_LIBLOG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
117 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
118
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
119 # Architectures.
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
120
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
121 # List of all architectures we can target.
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
122 set(COMPILER_RT_SUPPORTED_ARCH)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
123
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
124 # Try to compile a very simple source file to ensure we can target the given
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
125 # platform. We use the results of these tests to build only the various target
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
126 # runtime libraries supported by our current compilers cross-compiling
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
127 # abilities.
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
128 set(SIMPLE_SOURCE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple.cc)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
129 file(WRITE ${SIMPLE_SOURCE} "#include <stdlib.h>\n#include <stdio.h>\nint main() { printf(\"hello, world\"); }\n")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
130
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
131 # Detect whether the current target platform is 32-bit or 64-bit, and setup
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
132 # the correct commandline flags needed to attempt to target 32-bit and 64-bit.
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
133 if (NOT CMAKE_SIZEOF_VOID_P EQUAL 4 AND
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
134 NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
135 message(FATAL_ERROR "Please use architecture with 4 or 8 byte pointers.")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
136 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
137
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
138 test_targets()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
139
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
140 # Returns a list of architecture specific target cflags in @out_var list.
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
141 function(get_target_flags_for_arch arch out_var)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
142 list(FIND COMPILER_RT_SUPPORTED_ARCH ${arch} ARCH_INDEX)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
143 if(ARCH_INDEX EQUAL -1)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
144 message(FATAL_ERROR "Unsupported architecture: ${arch}")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
145 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
146 if (NOT APPLE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
147 set(${out_var} ${TARGET_${arch}_CFLAGS} PARENT_SCOPE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
148 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
149 # This is only called in constructing cflags for tests executing on the
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
150 # host. This will need to all be cleaned up to support building tests
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
151 # for cross-targeted hardware (i.e. iOS).
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
152 set(${out_var} -arch ${arch} PARENT_SCOPE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
153 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
154 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
155 endfunction()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
156
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
157 # Returns a compiler and CFLAGS that should be used to run tests for the
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
158 # specific architecture. When cross-compiling, this is controled via
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
159 # COMPILER_RT_TEST_COMPILER and COMPILER_RT_TEST_COMPILER_CFLAGS.
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
160 macro(get_test_cc_for_arch arch cc_out cflags_out)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
161 if(ANDROID OR ${arch} MATCHES "arm|aarch64")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
162 # This is only true if we are cross-compiling.
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
163 # Build all tests with host compiler and use host tools.
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
164 set(${cc_out} ${COMPILER_RT_TEST_COMPILER})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
165 set(${cflags_out} ${COMPILER_RT_TEST_COMPILER_CFLAGS})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
166 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
167 get_target_flags_for_arch(${arch} ${cflags_out})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
168 if(APPLE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
169 list(APPEND ${cflags_out} ${DARWIN_osx_CFLAGS})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
170 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
171 string(REPLACE ";" " " ${cflags_out} "${${cflags_out}}")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
172 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
173 endmacro()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
174
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
175 set(ARM64 aarch64)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
176 set(ARM32 arm armhf)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
177 set(X86 i386)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
178 set(X86_64 x86_64)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
179 set(MIPS32 mips mipsel)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
180 set(MIPS64 mips64 mips64el)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
181 set(PPC64 powerpc64 powerpc64le)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
182 set(S390X s390x)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
183 set(WASM32 wasm32)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
184 set(WASM64 wasm64)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
185
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
186 if(APPLE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
187 set(ARM64 arm64)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
188 set(ARM32 armv7 armv7s armv7k)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
189 set(X86_64 x86_64 x86_64h)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
190 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
191
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
192 set(ALL_SANITIZER_COMMON_SUPPORTED_ARCH ${X86} ${X86_64} ${PPC64}
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
193 ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} ${S390X})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
194 set(ALL_ASAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
195 ${MIPS32} ${MIPS64} ${PPC64} ${S390X})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
196 set(ALL_DFSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
197 set(ALL_FUZZER_SUPPORTED_ARCH x86_64)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
198
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
199 if(APPLE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
200 set(ALL_LSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${MIPS64} ${ARM64})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
201 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
202 set(ALL_LSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${MIPS64} ${ARM64} ${ARM32} ${PPC64})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
203 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
204 set(ALL_MSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64} ${PPC64})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
205 set(ALL_HWASAN_SUPPORTED_ARCH ${ARM64})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
206 set(ALL_PROFILE_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${PPC64}
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
207 ${MIPS32} ${MIPS64} ${S390X})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
208 set(ALL_TSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64} ${PPC64})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
209 set(ALL_UBSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
210 ${MIPS32} ${MIPS64} ${PPC64} ${S390X})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
211 set(ALL_SAFESTACK_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM64} ${MIPS32} ${MIPS64})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
212 set(ALL_CFI_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${MIPS64})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
213 set(ALL_ESAN_SUPPORTED_ARCH ${X86_64} ${MIPS64})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
214 set(ALL_SCUDO_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
215 if(APPLE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
216 set(ALL_XRAY_SUPPORTED_ARCH ${X86_64})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
217 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
218 set(ALL_XRAY_SUPPORTED_ARCH ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} powerpc64le)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
219 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
220
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
221 if(APPLE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
222 include(CompilerRTDarwinUtils)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
223
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
224 find_darwin_sdk_dir(DARWIN_osx_SYSROOT macosx)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
225 find_darwin_sdk_dir(DARWIN_iossim_SYSROOT iphonesimulator)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
226 find_darwin_sdk_dir(DARWIN_ios_SYSROOT iphoneos)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
227 find_darwin_sdk_dir(DARWIN_watchossim_SYSROOT watchsimulator)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
228 find_darwin_sdk_dir(DARWIN_watchos_SYSROOT watchos)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
229 find_darwin_sdk_dir(DARWIN_tvossim_SYSROOT appletvsimulator)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
230 find_darwin_sdk_dir(DARWIN_tvos_SYSROOT appletvos)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
231
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
232 if(NOT DARWIN_osx_SYSROOT)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
233 if(EXISTS /usr/include)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
234 set(DARWIN_osx_SYSROOT /)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
235 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
236 message(ERROR "Could not detect OS X Sysroot. Either install Xcode or the Apple Command Line Tools")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
237 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
238 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
239
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
240 if(COMPILER_RT_ENABLE_IOS)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
241 list(APPEND DARWIN_EMBEDDED_PLATFORMS ios)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
242 set(DARWIN_ios_MIN_VER_FLAG -miphoneos-version-min)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
243 set(DARWIN_ios_SANITIZER_MIN_VER_FLAG
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
244 ${DARWIN_ios_MIN_VER_FLAG}=8.0)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
245 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
246 if(COMPILER_RT_ENABLE_WATCHOS)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
247 list(APPEND DARWIN_EMBEDDED_PLATFORMS watchos)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
248 set(DARWIN_watchos_MIN_VER_FLAG -mwatchos-version-min)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
249 set(DARWIN_watchos_SANITIZER_MIN_VER_FLAG
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
250 ${DARWIN_watchos_MIN_VER_FLAG}=2.0)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
251 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
252 if(COMPILER_RT_ENABLE_TVOS)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
253 list(APPEND DARWIN_EMBEDDED_PLATFORMS tvos)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
254 set(DARWIN_tvos_MIN_VER_FLAG -mtvos-version-min)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
255 set(DARWIN_tvos_SANITIZER_MIN_VER_FLAG
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
256 ${DARWIN_tvos_MIN_VER_FLAG}=9.0)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
257 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
258
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
259 # Note: In order to target x86_64h on OS X the minimum deployment target must
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
260 # be 10.8 or higher.
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
261 set(SANITIZER_COMMON_SUPPORTED_OS osx)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
262 set(PROFILE_SUPPORTED_OS osx)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
263 set(TSAN_SUPPORTED_OS osx)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
264 set(XRAY_SUPPORTED_OS osx)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
265 if(NOT SANITIZER_MIN_OSX_VERSION)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
266 string(REGEX MATCH "-mmacosx-version-min=([.0-9]+)"
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
267 MACOSX_VERSION_MIN_FLAG "${CMAKE_CXX_FLAGS}")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
268 if(MACOSX_VERSION_MIN_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
269 set(SANITIZER_MIN_OSX_VERSION "${CMAKE_MATCH_1}")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
270 elseif(CMAKE_OSX_DEPLOYMENT_TARGET)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
271 set(SANITIZER_MIN_OSX_VERSION ${CMAKE_OSX_DEPLOYMENT_TARGET})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
272 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
273 set(SANITIZER_MIN_OSX_VERSION 10.9)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
274 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
275 if(SANITIZER_MIN_OSX_VERSION VERSION_LESS "10.7")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
276 message(FATAL_ERROR "macOS deployment target '${SANITIZER_MIN_OSX_VERSION}' is too old.")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
277 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
278 if(SANITIZER_MIN_OSX_VERSION VERSION_GREATER "10.9")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
279 message(WARNING "macOS deployment target '${SANITIZER_MIN_OSX_VERSION}' is too new, setting to '10.9' instead.")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
280 set(SANITIZER_MIN_OSX_VERSION 10.9)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
281 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
282 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
283
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
284 # We're setting the flag manually for each target OS
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
285 set(CMAKE_OSX_DEPLOYMENT_TARGET "")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
286
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
287 set(DARWIN_COMMON_CFLAGS -stdlib=libc++)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
288 set(DARWIN_COMMON_LINK_FLAGS
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
289 -stdlib=libc++
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
290 -lc++
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
291 -lc++abi)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
292
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
293 check_linker_flag("-fapplication-extension" COMPILER_RT_HAS_APP_EXTENSION)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
294 if(COMPILER_RT_HAS_APP_EXTENSION)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
295 list(APPEND DARWIN_COMMON_LINK_FLAGS "-fapplication-extension")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
296 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
297
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
298 set(DARWIN_osx_CFLAGS
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
299 ${DARWIN_COMMON_CFLAGS}
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
300 -mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
301 set(DARWIN_osx_LINK_FLAGS
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
302 ${DARWIN_COMMON_LINK_FLAGS}
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
303 -mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
304
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
305 if(DARWIN_osx_SYSROOT)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
306 list(APPEND DARWIN_osx_CFLAGS -isysroot ${DARWIN_osx_SYSROOT})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
307 list(APPEND DARWIN_osx_LINK_FLAGS -isysroot ${DARWIN_osx_SYSROOT})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
308 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
309
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
310 # Figure out which arches to use for each OS
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
311 darwin_get_toolchain_supported_archs(toolchain_arches)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
312 message(STATUS "Toolchain supported arches: ${toolchain_arches}")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
313
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
314 if(NOT MACOSX_VERSION_MIN_FLAG)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
315 darwin_test_archs(osx
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
316 DARWIN_osx_ARCHS
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
317 ${toolchain_arches})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
318 message(STATUS "OSX supported arches: ${DARWIN_osx_ARCHS}")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
319 foreach(arch ${DARWIN_osx_ARCHS})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
320 list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
321 set(CAN_TARGET_${arch} 1)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
322 endforeach()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
323
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
324 foreach(platform ${DARWIN_EMBEDDED_PLATFORMS})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
325 if(DARWIN_${platform}sim_SYSROOT)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
326 set(DARWIN_${platform}sim_CFLAGS
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
327 ${DARWIN_COMMON_CFLAGS}
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
328 ${DARWIN_${platform}_SANITIZER_MIN_VER_FLAG}
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
329 -isysroot ${DARWIN_${platform}sim_SYSROOT})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
330 set(DARWIN_${platform}sim_LINK_FLAGS
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
331 ${DARWIN_COMMON_LINK_FLAGS}
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
332 ${DARWIN_${platform}_SANITIZER_MIN_VER_FLAG}
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
333 -isysroot ${DARWIN_${platform}sim_SYSROOT})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
334
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
335 set(DARWIN_${platform}sim_SKIP_CC_KEXT On)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
336 darwin_test_archs(${platform}sim
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
337 DARWIN_${platform}sim_ARCHS
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
338 ${toolchain_arches})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
339 message(STATUS "${platform} Simulator supported arches: ${DARWIN_${platform}sim_ARCHS}")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
340 if(DARWIN_${platform}sim_ARCHS)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
341 list(APPEND SANITIZER_COMMON_SUPPORTED_OS ${platform}sim)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
342 list(APPEND PROFILE_SUPPORTED_OS ${platform}sim)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
343 list(APPEND TSAN_SUPPORTED_OS ${platform}sim)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
344 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
345 foreach(arch ${DARWIN_${platform}sim_ARCHS})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
346 list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
347 set(CAN_TARGET_${arch} 1)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
348 endforeach()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
349 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
350
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
351 if(DARWIN_${platform}_SYSROOT)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
352 set(DARWIN_${platform}_CFLAGS
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
353 ${DARWIN_COMMON_CFLAGS}
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
354 ${DARWIN_${platform}_SANITIZER_MIN_VER_FLAG}
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
355 -isysroot ${DARWIN_${platform}_SYSROOT})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
356 set(DARWIN_${platform}_LINK_FLAGS
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
357 ${DARWIN_COMMON_LINK_FLAGS}
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
358 ${DARWIN_${platform}_SANITIZER_MIN_VER_FLAG}
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
359 -isysroot ${DARWIN_${platform}_SYSROOT})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
360
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
361 darwin_test_archs(${platform}
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
362 DARWIN_${platform}_ARCHS
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
363 ${toolchain_arches})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
364 message(STATUS "${platform} supported arches: ${DARWIN_${platform}_ARCHS}")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
365 if(DARWIN_${platform}_ARCHS)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
366 list(APPEND SANITIZER_COMMON_SUPPORTED_OS ${platform})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
367 list(APPEND PROFILE_SUPPORTED_OS ${platform})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
368 list(APPEND TSAN_SUPPORTED_OS ${platform})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
369 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
370 foreach(arch ${DARWIN_${platform}_ARCHS})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
371 list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
372 set(CAN_TARGET_${arch} 1)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
373 endforeach()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
374 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
375 endforeach()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
376 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
377
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
378 # for list_intersect
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
379 include(CompilerRTUtils)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
380
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
381
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
382 list_intersect(SANITIZER_COMMON_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
383 ALL_SANITIZER_COMMON_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
384 COMPILER_RT_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
385 )
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
386 set(LSAN_COMMON_SUPPORTED_ARCH ${SANITIZER_COMMON_SUPPORTED_ARCH})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
387 set(UBSAN_COMMON_SUPPORTED_ARCH ${SANITIZER_COMMON_SUPPORTED_ARCH})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
388 list_intersect(ASAN_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
389 ALL_ASAN_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
390 SANITIZER_COMMON_SUPPORTED_ARCH)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
391 list_intersect(DFSAN_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
392 ALL_DFSAN_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
393 SANITIZER_COMMON_SUPPORTED_ARCH)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
394 list_intersect(LSAN_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
395 ALL_LSAN_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
396 SANITIZER_COMMON_SUPPORTED_ARCH)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
397 list_intersect(MSAN_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
398 ALL_MSAN_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
399 SANITIZER_COMMON_SUPPORTED_ARCH)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
400 list_intersect(HWASAN_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
401 ALL_HWASAN_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
402 SANITIZER_COMMON_SUPPORTED_ARCH)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
403 list_intersect(PROFILE_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
404 ALL_PROFILE_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
405 SANITIZER_COMMON_SUPPORTED_ARCH)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
406 list_intersect(TSAN_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
407 ALL_TSAN_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
408 SANITIZER_COMMON_SUPPORTED_ARCH)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
409 list_intersect(UBSAN_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
410 ALL_UBSAN_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
411 SANITIZER_COMMON_SUPPORTED_ARCH)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
412 list_intersect(SAFESTACK_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
413 ALL_SAFESTACK_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
414 SANITIZER_COMMON_SUPPORTED_ARCH)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
415 list_intersect(CFI_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
416 ALL_CFI_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
417 SANITIZER_COMMON_SUPPORTED_ARCH)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
418 list_intersect(ESAN_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
419 ALL_ESAN_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
420 SANITIZER_COMMON_SUPPORTED_ARCH)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
421 list_intersect(SCUDO_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
422 ALL_SCUDO_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
423 SANITIZER_COMMON_SUPPORTED_ARCH)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
424 list_intersect(FUZZER_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
425 ALL_FUZZER_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
426 ALL_SANITIZER_COMMON_SUPPORTED_ARCH)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
427 list_intersect(XRAY_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
428 ALL_XRAY_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
429 SANITIZER_COMMON_SUPPORTED_ARCH)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
430
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
431 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
432 # Architectures supported by compiler-rt libraries.
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
433 filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
434 ${ALL_SANITIZER_COMMON_SUPPORTED_ARCH})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
435 # LSan and UBSan common files should be available on all architectures
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
436 # supported by other sanitizers (even if they build into dummy object files).
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
437 filter_available_targets(LSAN_COMMON_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
438 ${SANITIZER_COMMON_SUPPORTED_ARCH})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
439 filter_available_targets(UBSAN_COMMON_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
440 ${SANITIZER_COMMON_SUPPORTED_ARCH})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
441 filter_available_targets(ASAN_SUPPORTED_ARCH ${ALL_ASAN_SUPPORTED_ARCH})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
442 filter_available_targets(FUZZER_SUPPORTED_ARCH ${ALL_FUZZER_SUPPORTED_ARCH})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
443 filter_available_targets(DFSAN_SUPPORTED_ARCH ${ALL_DFSAN_SUPPORTED_ARCH})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
444 filter_available_targets(LSAN_SUPPORTED_ARCH ${ALL_LSAN_SUPPORTED_ARCH})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
445 filter_available_targets(MSAN_SUPPORTED_ARCH ${ALL_MSAN_SUPPORTED_ARCH})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
446 filter_available_targets(HWASAN_SUPPORTED_ARCH ${ALL_HWASAN_SUPPORTED_ARCH})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
447 filter_available_targets(PROFILE_SUPPORTED_ARCH ${ALL_PROFILE_SUPPORTED_ARCH})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
448 filter_available_targets(TSAN_SUPPORTED_ARCH ${ALL_TSAN_SUPPORTED_ARCH})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
449 filter_available_targets(UBSAN_SUPPORTED_ARCH ${ALL_UBSAN_SUPPORTED_ARCH})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
450 filter_available_targets(SAFESTACK_SUPPORTED_ARCH
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
451 ${ALL_SAFESTACK_SUPPORTED_ARCH})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
452 filter_available_targets(CFI_SUPPORTED_ARCH ${ALL_CFI_SUPPORTED_ARCH})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
453 filter_available_targets(ESAN_SUPPORTED_ARCH ${ALL_ESAN_SUPPORTED_ARCH})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
454 filter_available_targets(SCUDO_SUPPORTED_ARCH ${ALL_SCUDO_SUPPORTED_ARCH})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
455 filter_available_targets(XRAY_SUPPORTED_ARCH ${ALL_XRAY_SUPPORTED_ARCH})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
456 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
457
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
458 if (MSVC)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
459 # See if the DIA SDK is available and usable.
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
460 set(MSVC_DIA_SDK_DIR "$ENV{VSINSTALLDIR}DIA SDK")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
461 if (IS_DIRECTORY ${MSVC_DIA_SDK_DIR})
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
462 set(CAN_SYMBOLIZE 1)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
463 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
464 set(CAN_SYMBOLIZE 0)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
465 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
466 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
467 set(CAN_SYMBOLIZE 1)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
468 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
469
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
470 find_program(GOLD_EXECUTABLE NAMES ${LLVM_DEFAULT_TARGET_TRIPLE}-ld.gold ld.gold ${LLVM_DEFAULT_TARGET_TRIPLE}-ld ld DOC "The gold linker")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
471
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
472 if(COMPILER_RT_SUPPORTED_ARCH)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
473 list(REMOVE_DUPLICATES COMPILER_RT_SUPPORTED_ARCH)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
474 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
475 message(STATUS "Compiler-RT supported architectures: ${COMPILER_RT_SUPPORTED_ARCH}")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
476
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
477 if(ANDROID)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
478 set(OS_NAME "Android")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
479 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
480 set(OS_NAME "${CMAKE_SYSTEM_NAME}")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
481 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
482
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
483 set(ALL_SANITIZERS asan;dfsan;msan;hwasan;tsan;safestack;cfi;esan;scudo;ubsan_minimal)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
484 set(COMPILER_RT_SANITIZERS_TO_BUILD all CACHE STRING
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
485 "sanitizers to build if supported on the target (all;${ALL_SANITIZERS})")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
486 list_replace(COMPILER_RT_SANITIZERS_TO_BUILD all "${ALL_SANITIZERS}")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
487
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
488 if (SANITIZER_COMMON_SUPPORTED_ARCH AND NOT LLVM_USE_SANITIZER AND
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
489 (OS_NAME MATCHES "Android|Darwin|Linux|FreeBSD|NetBSD|Fuchsia|SunOS" OR
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
490 (OS_NAME MATCHES "Windows" AND (NOT MINGW AND NOT CYGWIN))))
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
491 set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
492 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
493 set(COMPILER_RT_HAS_SANITIZER_COMMON FALSE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
494 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
495
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
496 if (COMPILER_RT_HAS_SANITIZER_COMMON)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
497 set(COMPILER_RT_HAS_INTERCEPTION TRUE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
498 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
499 set(COMPILER_RT_HAS_INTERCEPTION FALSE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
500 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
501
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
502 if (COMPILER_RT_HAS_SANITIZER_COMMON AND ASAN_SUPPORTED_ARCH)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
503 set(COMPILER_RT_HAS_ASAN TRUE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
504 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
505 set(COMPILER_RT_HAS_ASAN FALSE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
506 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
507
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
508 if (OS_NAME MATCHES "Linux|FreeBSD|Windows|NetBSD|SunOS")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
509 set(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME TRUE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
510 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
511 set(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME FALSE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
512 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
513
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
514 # TODO: Add builtins support.
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
515
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
516 if (COMPILER_RT_HAS_SANITIZER_COMMON AND DFSAN_SUPPORTED_ARCH AND
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
517 OS_NAME MATCHES "Linux")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
518 set(COMPILER_RT_HAS_DFSAN TRUE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
519 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
520 set(COMPILER_RT_HAS_DFSAN FALSE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
521 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
522
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
523 if (COMPILER_RT_HAS_SANITIZER_COMMON AND LSAN_SUPPORTED_ARCH AND
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
524 OS_NAME MATCHES "Darwin|Linux|FreeBSD|NetBSD")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
525 set(COMPILER_RT_HAS_LSAN TRUE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
526 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
527 set(COMPILER_RT_HAS_LSAN FALSE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
528 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
529
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
530 if (COMPILER_RT_HAS_SANITIZER_COMMON AND MSAN_SUPPORTED_ARCH AND
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
531 OS_NAME MATCHES "Linux|NetBSD")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
532 set(COMPILER_RT_HAS_MSAN TRUE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
533 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
534 set(COMPILER_RT_HAS_MSAN FALSE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
535 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
536
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
537 if (COMPILER_RT_HAS_SANITIZER_COMMON AND HWASAN_SUPPORTED_ARCH AND
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
538 OS_NAME MATCHES "Linux|Android")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
539 set(COMPILER_RT_HAS_HWASAN TRUE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
540 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
541 set(COMPILER_RT_HAS_HWASAN FALSE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
542 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
543
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
544 if (PROFILE_SUPPORTED_ARCH AND NOT LLVM_USE_SANITIZER AND
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
545 OS_NAME MATCHES "Darwin|Linux|FreeBSD|Windows|Android|SunOS")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
546 set(COMPILER_RT_HAS_PROFILE TRUE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
547 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
548 set(COMPILER_RT_HAS_PROFILE FALSE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
549 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
550
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
551 if (COMPILER_RT_HAS_SANITIZER_COMMON AND TSAN_SUPPORTED_ARCH AND
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
552 OS_NAME MATCHES "Darwin|Linux|FreeBSD|Android|NetBSD")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
553 set(COMPILER_RT_HAS_TSAN TRUE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
554 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
555 set(COMPILER_RT_HAS_TSAN FALSE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
556 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
557
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
558 if (COMPILER_RT_HAS_SANITIZER_COMMON AND UBSAN_SUPPORTED_ARCH AND
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
559 OS_NAME MATCHES "Darwin|Linux|FreeBSD|NetBSD|Windows|Android|Fuchsia|SunOS")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
560 set(COMPILER_RT_HAS_UBSAN TRUE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
561 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
562 set(COMPILER_RT_HAS_UBSAN FALSE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
563 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
564
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
565 if (COMPILER_RT_HAS_SANITIZER_COMMON AND UBSAN_SUPPORTED_ARCH AND
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
566 OS_NAME MATCHES "Linux|FreeBSD|NetBSD|Android|Darwin")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
567 set(COMPILER_RT_HAS_UBSAN_MINIMAL TRUE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
568 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
569 set(COMPILER_RT_HAS_UBSAN_MINIMAL FALSE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
570 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
571
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
572 if (COMPILER_RT_HAS_SANITIZER_COMMON AND SAFESTACK_SUPPORTED_ARCH AND
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
573 OS_NAME MATCHES "Darwin|Linux|FreeBSD|NetBSD")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
574 set(COMPILER_RT_HAS_SAFESTACK TRUE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
575 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
576 set(COMPILER_RT_HAS_SAFESTACK FALSE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
577 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
578
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
579 if (COMPILER_RT_HAS_SANITIZER_COMMON AND CFI_SUPPORTED_ARCH)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
580 set(COMPILER_RT_HAS_CFI TRUE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
581 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
582 set(COMPILER_RT_HAS_CFI FALSE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
583 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
584
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
585 if (COMPILER_RT_HAS_SANITIZER_COMMON AND ESAN_SUPPORTED_ARCH AND
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
586 OS_NAME MATCHES "Linux")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
587 set(COMPILER_RT_HAS_ESAN TRUE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
588 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
589 set(COMPILER_RT_HAS_ESAN FALSE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
590 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
591
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
592 if (COMPILER_RT_HAS_SANITIZER_COMMON AND SCUDO_SUPPORTED_ARCH AND
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
593 OS_NAME MATCHES "Linux|Android|Fuchsia")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
594 set(COMPILER_RT_HAS_SCUDO TRUE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
595 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
596 set(COMPILER_RT_HAS_SCUDO FALSE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
597 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
598
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
599 if (COMPILER_RT_HAS_SANITIZER_COMMON AND XRAY_SUPPORTED_ARCH AND
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
600 OS_NAME MATCHES "Darwin|Linux|FreeBSD")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
601 set(COMPILER_RT_HAS_XRAY TRUE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
602 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
603 set(COMPILER_RT_HAS_XRAY FALSE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
604 endif()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
605
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
606 if (COMPILER_RT_HAS_SANITIZER_COMMON AND FUZZER_SUPPORTED_ARCH AND
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
607 OS_NAME MATCHES "Android|Darwin|Linux|NetBSD|FreeBSD|Fuchsia")
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
608 set(COMPILER_RT_HAS_FUZZER TRUE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
609 else()
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
610 set(COMPILER_RT_HAS_FUZZER FALSE)
f476a9ba4795 http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
mir3636
parents:
diff changeset
611 endif()