releases-comm-central/third_party/rnpdefs.mozbuild

49 строки
1.6 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
# MOZ_LIBSTDCXX_TARGET_VERSION should only be set for Taskcluster builds
# targeting Linux. The below changes those builds to statically link to
# LLVM's libc++ statically to circumvent the issues with undesired libstdc++
# symbols that keep popping up
if CONFIG["MOZ_LIBSTDCXX_TARGET_VERSION"]:
static_libdir = {"i686": "-L{}/../lib32", "x86_64": "-L{}"}[
CONFIG["TARGET_CPU"]
].format(CONFIG["MOZ_LIBCLANG_PATH"])
DEFINES["_GLIBCXX_USE_CXX11_ABI"] = 0
CXXFLAGS += ["-stdlib=libc++"]
LDFLAGS += ["-nostdlib++"]
OS_LIBS += [static_libdir, "-l:libc++.a", "-l:libc++abi.a"]
if CONFIG["OS_ARCH"] == "Linux":
CFLAGS += ["-fPIC"]
CXXFLAGS += ["-fPIC"]