|
147 | 147 | # Runtime Sanitizers |
148 | 148 | if [[ $apply_sanitizers -eq 1 ]]; then |
149 | 149 | if [ "${ENABLE_ADDRESS_SANITIZER:-}" == "YES" ]; then |
150 | | - build_pre_config_flags+=( |
151 | | - --copt=-fno-omit-frame-pointer |
152 | | - --copt=-fno-sanitize-recover=all |
153 | | - --copt=-fsanitize=address |
154 | | - --linkopt=-fsanitize=address |
155 | | - --%swiftcopt%=-sanitize=address |
156 | | - --copt=-Wno-macro-redefined |
157 | | - --copt=-D_FORTIFY_SOURCE=0 |
158 | | - ) |
| 150 | + build_pre_config_flags+=(--features=asan --host_features=-asan) |
159 | 151 | fi |
160 | 152 | if [ "${ENABLE_THREAD_SANITIZER:-}" == "YES" ]; then |
161 | | - build_pre_config_flags+=( |
162 | | - --copt=-fno-omit-frame-pointer |
163 | | - --copt=-fno-sanitize-recover=all |
164 | | - --copt=-fsanitize=thread |
165 | | - --linkopt=-fsanitize=thread |
166 | | - --%swiftcopt%=-sanitize=thread |
167 | | - ) |
| 153 | + build_pre_config_flags+=(--features=tsan --host_features=-tsan) |
168 | 154 | fi |
169 | 155 | if [ "${ENABLE_UNDEFINED_BEHAVIOR_SANITIZER:-}" == "YES" ]; then |
170 | | - build_pre_config_flags+=( |
171 | | - --copt=-fno-omit-frame-pointer |
172 | | - --copt=-fno-sanitize-recover=all |
173 | | - --copt=-fsanitize=undefined |
174 | | - --linkopt=-fsanitize=undefined |
175 | | - ) |
| 156 | + build_pre_config_flags+=(--features=ubsan --host_features=-ubsan) |
176 | 157 | fi |
177 | 158 | fi |
178 | 159 | readonly build_pre_config_flags |
|
0 commit comments