-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[CMake] Options to control generation of reproducers #143037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1433,3 +1433,22 @@ if(LLVM_ENABLE_LLVM_LIBC) | |
| message(WARNING "Unable to link against LLVM libc. LLVM will be built without linking against the LLVM libc overlay.") | ||
| endif() | ||
| endif() | ||
|
|
||
| if(LLVM_CRASH_DIAGNOSTICS) | ||
| string(TOLOWER "${LLVM_CRASH_DIAGNOSTICS}" LLVM_CRASH_DIAGNOSTICS) | ||
| check_c_compiler_flag("-fcrash-diagnostics=${LLVM_CRASH_DIAGNOSTICS}" SUPPORTS_FCRASH_DIAGNOSTICS) | ||
| append_if(SUPPORTS_FCRASH_DIAGNOSTICS "-fcrash-diagnostics=${LLVM_CRASH_DIAGNOSTICS}" | ||
| CMAKE_C_FLAGS CMAKE_CXX_FLAGS CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS) | ||
| endif() | ||
|
|
||
| if(LLVM_CRASH_DIAGNOSTICS_DIR) | ||
| check_c_compiler_flag("-fcrash-diagnostics-dir=foo" SUPPORTS_FCRASH_DIAGNOSTICS_DIR) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there value in adding a warning here if this is requested but the host compiler does not support the flag? |
||
| append_if(SUPPORTS_FCRASH_DIAGNOSTICS_DIR "-fcrash-diagnostics-dir=${LLVM_CRASH_DIAGNOSTICS_DIR}" | ||
| CMAKE_C_FLAGS CMAKE_CXX_FLAGS CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS) | ||
| endif() | ||
|
|
||
| if(LLVM_ERROR_REPRODUCERS) | ||
|
||
| check_c_compiler_flag("-gen-reproducer=error" SUPPORTS_GEN_REPRODUCER_ERROR) | ||
| append_if(SUPPORTS_GEN_REPRODUCER_ERROR "-gen-reproducer=error" | ||
| CMAKE_C_FLAGS CMAKE_CXX_FLAGS CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS) | ||
| endif() | ||
Uh oh!
There was an error while loading. Please reload this page.