Lines Matching +full:- +full:fsanitize
17 # This is a dummy target which all other targets depend on (manually - see other
23 # Android-NDK CMake files reconfigure the path and so Go and Perl won't be
39 pkg_check_modules(LIBUNWIND libunwind-generic)
41 add_definitions(-DBORINGSSL_HAVE_LIBUNWIND)
59 add_definitions(-DBORINGSSL_ALLOW_CXX_RUNTIME)
66 add_definitions(-DBORINGSSL_DISPATCH_TEST)
68 # command-line, but not add_definitions.
69 set(CMAKE_ASM_NASM_FLAGS "${CMAKE_ASM_NASM_FLAGS} -DBORINGSSL_DISPATCH_TEST")
76 string(REGEX REPLACE "(^| )[/-]DNDEBUG( |$)" " " "${VAR}_RELWITHASSERTS"
81 add_definitions(-DBORINGSSL_PREFIX=${BORINGSSL_PREFIX})
82 # CMake automatically connects include_directories to the NASM command-line,
84 set(CMAKE_ASM_NASM_FLAGS "${CMAKE_ASM_NASM_FLAGS} -DBORINGSSL_PREFIX=${BORINGSSL_PREFIX}")
92 COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/symbol_prefix_include
93 …COMMAND ${GO_EXECUTABLE} run ${CMAKE_CURRENT_SOURCE_DIR}/util/make_prefix_headers.go -out ${CMAKE_…
118 # Note clang-cl is odd and sets both CLANG and MSVC. We base our configuration
120 …set(C_CXX_FLAGS "-Werror -Wformat=2 -Wsign-compare -Wmissing-field-initializers -Wwrite-strings -W…
122 # clang-cl sets different default warnings than clang. It also treats -Wall
123 # as -Weverything, to match MSVC. Instead -W3 is the alias for -Wall.
124 # See http://llvm.org/viewvc/llvm-project?view=revision&revision=319116
125 set(C_CXX_FLAGS "${C_CXX_FLAGS} -W3 -Wno-unused-parameter -fmsc-version=1900")
126 # googletest suppresses warning C4996 via a pragma, but clang-cl does not
128 set(C_CXX_FLAGS "${C_CXX_FLAGS} -Wno-deprecated-declarations")
131 # emscripten's emcc/clang does not accept the "-ggdb" flag.
132 set(C_CXX_FLAGS "${C_CXX_FLAGS} -g")
134 set(C_CXX_FLAGS "${C_CXX_FLAGS} -ggdb")
137 set(C_CXX_FLAGS "${C_CXX_FLAGS} -Wall -fvisibility=hidden -fno-common")
141 set(C_CXX_FLAGS "${C_CXX_FLAGS} -Wnewline-eof -fcolor-diagnostics")
145 set(C_CXX_FLAGS "${C_CXX_FLAGS} -Wno-free-nonheap-object")
149 set(C_CXX_FLAGS "${C_CXX_FLAGS} -Wimplicit-fallthrough")
152 …et(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_CXX_FLAGS} -Wmissing-prototypes -Wold-style-definition -Wst…
153 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${C_CXX_FLAGS} -Wmissing-declarations")
156 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
158 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
161 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti")
165 # In GCC, -Wmissing-declarations is the C++ spelling of -Wmissing-prototypes
166 # and using the wrong one is an error. In Clang, -Wmissing-prototypes is the
167 # spelling for both and -Wmissing-declarations is some other warning.
169 # https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gcc/Warning-Options.html#Warning-Options
170 # https://clang.llvm.org/docs/DiagnosticsReference.html#wmissing-prototypes
171 # https://clang.llvm.org/docs/DiagnosticsReference.html#wmissing-declarations
173 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wmissing-prototypes")
177 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-array-bounds")
187 "C4200" # nonstandard extension used : zero-sized array in
189 "C4204" # nonstandard extension used: non-constant aggregate initializer
210 # side-effect" caused by FD_* macros.
211 "C4610" # struct 'argument' can never be instantiated - user defined
218 "C4628" # digraphs not supported with -Ze
234 …nect.microsoft.com/VisualStudio/feedback/details/1217660/warning-c4265-when-using-functional-header
237 string(REPLACE "C" " -wd" MSVC_DISABLED_WARNINGS_STR
239 string(REPLACE "C" " -w4" MSVC_LEVEL4_WARNINGS_STR
241 set(CMAKE_C_FLAGS "-utf-8 -Wall -WX ${MSVC_DISABLED_WARNINGS_STR} ${MSVC_LEVEL4_WARNINGS_STR}")
242 set(CMAKE_CXX_FLAGS "-utf-8 -Wall -WX ${MSVC_DISABLED_WARNINGS_STR} ${MSVC_LEVEL4_WARNINGS_STR}")
246 add_definitions(-D_HAS_EXCEPTIONS=0)
247 add_definitions(-DWIN32_LEAN_AND_MEAN)
248 add_definitions(-DNOMINMAX)
250 add_definitions(-D_CRT_SECURE_NO_WARNINGS)
251 # VS 2017 and higher supports STL-only warning suppressions.
254 add_definitions("-D_STL_EXTRA_DISABLED_WARNINGS=4774 4987")
259 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wshadow")
260 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow")
265 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
267 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
273 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE=700")
285 add_definitions(-DBORINGSSL_UNSAFE_DETERMINISTIC_MODE)
286 set(RUNNER_ARGS "-deterministic")
289 add_definitions(-DBORINGSSL_UNSAFE_FUZZER_MODE)
290 set(RUNNER_ARGS ${RUNNER_ARGS} "-fuzzer" "-shim-config" "fuzzer_mode.json")
293 …set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address,fuzzer-no-link -fsanitize-coverage=edge,ind…
294 …set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address,fuzzer-no-link -fsanitize-coverage=edge…
297 add_definitions(-DBORINGSSL_IMPLEMENTATION)
300 add_definitions(-DBORINGSSL_SHARED_LIBRARY)
301 # Enable position-independent code globally. This is needed because
315 …set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=memory -fsanitize-memory-track-origins -fno-omit-fr…
316 …set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=memory -fsanitize-memory-track-origins -fno-omi…
317 …set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -fsanitize=memory -fsanitize-memory-track-origins -fno-omi…
325 …set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fsanitize-address-use-after-scope -fno-omi…
326 …set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fsanitize-address-use-after-scope -fno…
334 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=cfi -fno-sanitize-trap=cfi -flto=thin")
335 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=cfi -fno-sanitize-trap=cfi -flto=thin")
336 # We use Chromium's copy of clang, which requires -fuse-ld=lld if building
337 # with -flto. That, in turn, can't handle -ggdb.
338 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld")
339 string(REPLACE "-ggdb" "-g" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
340 string(REPLACE "-ggdb" "-g" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
341 # -flto causes object files to contain LLVM bitcode. Mixing those with
351 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=thread")
352 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread")
353 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=thread")
361 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined")
362 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
363 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=undefined")
366 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-sanitize-recover=undefined")
367 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-sanitize-recover=undefined")
368 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fno-sanitize-recover=undefined")
373 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage")
374 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
378 add_definitions(-DBORINGSSL_FIPS)
380 add_definitions("-DBORINGSSL_FIPS_BREAK_${FIPS_BREAK_TEST}=1")
391 # The Android CMake files set -ffunction-sections and -fdata-sections,
394 "${CMAKE_C_FLAGS} -fno-function-sections -fno-data-sections")
396 "${CMAKE_CXX_FLAGS} -fno-function-sections -fno-data-sections")
401 add_definitions(-DOPENSSL_SMALL)
405 add_definitions(-DBORINGSSL_CONSTANT_TIME_VALIDATION)
407 add_definitions(-DNDEBUG)
417 execute_process(COMMAND ${GO_EXECUTABLE} run ${godeps} -format cmake
418 -pkg ${package}
424 -o ${CMAKE_CURRENT_BINARY_DIR}/${dest} ${package}
432 string(SUBSTRING "${CMAKE_CURRENT_BINARY_DIR}" ${root_dir_length} -1 target)
438 -o ${CMAKE_CURRENT_BINARY_DIR}/${dest} ${package}
439 COMMAND ${GO_EXECUTABLE} run ${godeps} -format depfile
440 -target ${target} -pkg ${package} -out ${depfile}
447 # CMake's iOS support uses Apple's multiple-architecture toolchain. It takes an
449 # alone, and expects all architecture-specific logic to be conditioned within
451 # files, so we fix CMAKE_SYSTEM_PROCESSOR and only support single-architecture
462 add_definitions(-DOPENSSL_NO_ASM)
469 # cmake reports AMD64 on Windows, but we might be building for 32-bit.
500 # The third-party Android-NDK CMake files somehow fail to set the -march flag
503 set(CMAKE_ASM_FLAGS "-march=${CMAKE_SYSTEM_PROCESSOR} ${CMAKE_ASM_FLAGS}")
513 # language-specific compile-only flags.
514 add_compile_options("-nostdinc++")
515 set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -nostdlib++")
528 # This file is meant for exception-less builds.
541 -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
543 …set_target_properties(libcxxabi PROPERTIES COMPILE_FLAGS "-Wno-missing-prototypes -Wno-implicit-fa…
550 -D_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS
555 -D_LIBCPP_BUILDING_LIBRARY
556 -DLIBCXX_BUILDING_LIBCXXABI
561 # Add minimal googletest targets. The provided one has many side-effects, and
563 add_library(boringssl_gtest third_party/googletest/src/gtest-all.cc)
594 # without -fsanitize-coverage options or clang crashes.
595 …perties(Fuzzer PROPERTIES COMPILE_FLAGS "-Wno-shadow -Wno-format-nonliteral -Wno-missing-prototype…
607 set(HANDSHAKER_ARGS "-handshaker-path" $<TARGET_FILE:handshaker>)
612 COMMAND ${GO_EXECUTABLE} run util/all_tests.go -build-dir
615 ${GO_EXECUTABLE} test -shim-path $<TARGET_FILE:bssl_shim>