Bug 1581656 - Fix default UBSAN_OPTIONS. r=froydnj
authorTyson Smith <twsmith@mozilla.com>
Tue, 24 Sep 2019 17:52:11 +0000
changeset 494813 173fab2bebecab5366b0f23df432de29797717e3
parent 494812 dd4117098844b489489dc94a23455f7a8bf28074
child 494814 b8dfe5ab5aba868d90c3576a52a07d5665cb8bbd
push id114131
push userdluca@mozilla.com
push dateThu, 26 Sep 2019 09:47:34 +0000
treeherdermozilla-inbound@1dc1a755079a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1581656
milestone71.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1581656 - Fix default UBSAN_OPTIONS. r=froydnj Differential Revision: https://phabricator.services.mozilla.com/D46970
mozglue/build/UbsanOptions.cpp
--- a/mozglue/build/UbsanOptions.cpp
+++ b/mozglue/build/UbsanOptions.cpp
@@ -2,11 +2,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/Attributes.h"
 
 #ifndef _MSC_VER  // Not supported by clang-cl yet
 
-const char* __ubsan_default_options() { return "print_stacktrace=1"; }
+extern "C" const char* __ubsan_default_options() {
+  return "print_stacktrace=1";
+}
 
 #endif