Refactor OS_LINUX preprocessor directive for LaCrOS effort.

Currently, ChromeOS defines the OS_LINUX directive as well as
OS_CHROMEOS.  We're working to separate these two, so we're
making the fact that OS_LINUX == OS_LINUX || OS_CHROMEOS
explicit.

Bug: 1110266
Change-Id: I7d5724c1cd9720e917ca71d3af4eda1a6959fdfe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2352433
Commit-Queue: Sean McAllister <smcallis@google.com>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Reviewed-by: Evgenii Stepanov <eugenis@chromium.org>
Reviewed-by: manuk hovanesian <manukh@chromium.org>
Reviewed-by: Ben Greenstein <bengr@chromium.org>
Reviewed-by: Ovidio de Jesús Ruiz-Henríquez <odejesush@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: Parastoo Geranmayeh <parastoog@google.com>
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799206}
GitOrigin-RevId: 0005e88efc57a6d907f6f69fe043829dfea4aa94
This commit is contained in:
Sean McAllister 2020-08-18 18:15:11 +00:00 коммит произвёл Copybara-Service
Родитель c96d6ef579
Коммит 649e26a3a6
1 изменённых файлов: 9 добавлений и 6 удалений

Просмотреть файл

@ -42,7 +42,7 @@ void _sanitizer_options_link_helper() { }
// detect_stack_use_after_return=1 - use fake stack to delay the reuse of
// stack allocations and detect stack-use-after-return errors.
// symbolize=1 - enable in-process symbolization.
#if defined(OS_LINUX)
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
const char kAsanDefaultOptions[] =
"check_printf=1 use_sigaltstack=1 strip_path_prefix=/../../ "
"fast_unwind_on_fatal=1 detect_stack_use_after_return=1 "
@ -57,9 +57,10 @@ const char* kAsanDefaultOptions =
const char* kAsanDefaultOptions =
"check_printf=1 use_sigaltstack=1 strip_path_prefix=\\..\\..\\ "
"fast_unwind_on_fatal=1 detect_stack_use_after_return=1 ";
#endif // OS_LINUX
#endif // defined(OS_LINUX) || defined(OS_CHROMEOS)
#if defined(OS_LINUX) || defined(OS_APPLE) || defined(OS_WIN)
#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_APPLE) || \
defined(OS_WIN)
// Allow NaCl to override the default asan options.
extern const char* kAsanDefaultOptionsNaCl;
__attribute__((weak)) const char* kAsanDefaultOptionsNaCl = nullptr;
@ -75,10 +76,11 @@ extern char kASanDefaultSuppressions[];
SANITIZER_HOOK_ATTRIBUTE const char *__asan_default_suppressions() {
return kASanDefaultSuppressions;
}
#endif // OS_LINUX || OS_APPLE || OS_WIN
#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_APPLE) ||
// defined(OS_WIN)
#endif // ADDRESS_SANITIZER
#if defined(THREAD_SANITIZER) && defined(OS_LINUX)
#if defined(THREAD_SANITIZER) && (defined(OS_LINUX) || defined(OS_CHROMEOS))
// Default options for ThreadSanitizer in various configurations:
// detect_deadlocks=1 - enable deadlock (lock inversion) detection.
// second_deadlock_stack=1 - more verbose deadlock reports.
@ -106,7 +108,8 @@ SANITIZER_HOOK_ATTRIBUTE const char *__tsan_default_suppressions() {
return kTSanDefaultSuppressions;
}
#endif // THREAD_SANITIZER && OS_LINUX
#endif // defined(THREAD_SANITIZER) && (defined(OS_LINUX) ||
// defined(OS_CHROMEOS))
#if defined(MEMORY_SANITIZER)
// Default options for MemorySanitizer: