[PATCH] D36032: [sanitizer_common] Fuchsia-specific symbolizer

Roland McGrath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 1 12:17:34 PDT 2017


mcgrathr added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_symbolizer_fuchsia.cc:47
+// Symbolizer class supported linker initialization.
+Symbolizer *Symbolizer::GetOrInit() {
+  SpinMutexLock l(&init_mu_);
----------------
alekseyshl wrote:
> vitalybuka wrote:
> > mcgrathr wrote:
> > > vitalybuka wrote:
> > > > Why not just override PlatformInit?
> > > Because then GetOrInit would be the only thing from sanitizer_symbolizer_libcdep.cc actually used and it's cleaner to #if out the entire file.
> > > I'd be happy to move the generic GetOrInit from sanitizer_symbolizer_libcdep.cc to sanitizer_symbolizer.cc if you prefer that.
> > I am OK to keep it as is
> Please do move  GetOrInit to sanitizer_symbolizer.cc and implement PlatformInit and exclude sanitizer_symbolizer_libcdep.cc from Fuchsia build, that #if-ing the entire file is ugly.
I've moved GetOrInit and implemented PlatformInit.

I didn't change to cmake conditionalization instead of #if around the whole file because that would be inconsistent with the rest of the source code, which uses #if around the whole file for other cases like this one.


https://reviews.llvm.org/D36032





More information about the llvm-commits mailing list