summaryrefslogtreecommitdiffstats
path: root/comm/third_party/rnpdefs.mozbuild
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--comm/third_party/rnpdefs.mozbuild38
1 files changed, 38 insertions, 0 deletions
diff --git a/comm/third_party/rnpdefs.mozbuild b/comm/third_party/rnpdefs.mozbuild
new file mode 100644
index 0000000000..1358f95f18
--- /dev/null
+++ b/comm/third_party/rnpdefs.mozbuild
@@ -0,0 +1,38 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# 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/.
+
+# We allow warnings for third-party code that can be updated from upstream.
+AllowCompilerWarnings()
+DisableStlWrapping()
+NoVisibilityFlags()
+
+rnp_dist_info = "{} {} rnp".format(
+ CONFIG["MOZ_APP_DISPLAYNAME"], CONFIG["MOZ_APP_VERSION_DISPLAY"]
+)
+
+COMPILE_FLAGS["OS_CFLAGS"] = []
+COMPILE_FLAGS["OS_CXXFLAGS"] = []
+COMPILE_FLAGS["OS_INCLUDES"] = []
+COMPILE_FLAGS["CLANG_PLUGIN"] = []
+
+if CONFIG["COMPILE_ENVIRONMENT"]:
+ COMPILE_FLAGS["MOZ_HARDENING_CFLAGS"] = []
+
+if CONFIG["CC_TYPE"] == "clang-cl":
+ CFLAGS += [
+ "-Wno-inconsistent-dllimport",
+ "-Wno-macro-redefined", # 'WIN32_LEAN_AND_MEAN' macro redefined
+ ]
+ USE_STATIC_LIBS = True
+ DEFINES["RNP_USE_STD_REGEX"] = True
+
+if CONFIG["MOZ_STDCXX_COMPAT"]:
+ # Use pre-GCC-5 strings abi
+ DEFINES["_GLIBCXX_USE_CXX11_ABI"] = 0
+
+if CONFIG["OS_ARCH"] in ("Linux", "SunOS"):
+ CFLAGS += ["-fPIC"]
+ CXXFLAGS += ["-fPIC"]