[compiler-rt] [llvm] [compiler-rt][rtsan] Introduce RTSAN_OPTIONS and flags (PR #107174)
Chris Apple via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 6 08:32:24 PDT 2024
================
@@ -0,0 +1,66 @@
+//===--- rtsan_flags.cpp - Realtime Sanitizer -------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of RealtimeSanitizer.
+//
+//===----------------------------------------------------------------------===//
+
+#include "rtsan/rtsan_flags.h"
+#include "sanitizer_common/sanitizer_flag_parser.h"
+#include "sanitizer_common/sanitizer_flags.h"
+
+using namespace __sanitizer;
+using namespace __rtsan;
+
+Flags __rtsan::flags_data;
+
+SANITIZER_INTERFACE_WEAK_DEF(const char *, __rtsan_default_options, void) {
+ return "";
+}
+
+static void RegisterRtsanFlags(FlagParser *parser, Flags *f) {
+#define RTSAN_FLAG(Type, Name, DefaultValue, Description) \
+ RegisterFlag(parser, #Name, Description, &f->Name);
+#include "rtsan_flags.inc"
+#undef RTSAN_FLAG
+}
+
+void Flags::SetDefaults() {
----------------
cjappl wrote:
I have updated this to your proposed version in the latest.
https://github.com/llvm/llvm-project/pull/107174
More information about the llvm-commits
mailing list