releases-comm-central/third_party/rnpdefs.mozbuild

39 строки
1.2 KiB
Python

# -*- 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"]