diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /third_party/libwebrtc/build/config/linux/BUILD.gn | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/build/config/linux/BUILD.gn')
-rw-r--r-- | third_party/libwebrtc/build/config/linux/BUILD.gn | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/third_party/libwebrtc/build/config/linux/BUILD.gn b/third_party/libwebrtc/build/config/linux/BUILD.gn new file mode 100644 index 0000000000..c036e4ae94 --- /dev/null +++ b/third_party/libwebrtc/build/config/linux/BUILD.gn @@ -0,0 +1,79 @@ +# Copyright (c) 2013 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("../../../webrtc.gni") + +import("//build/config/c++/c++.gni") +import("//build/config/chromeos/ui_mode.gni") +import("//build/config/linux/pkg_config.gni") +import("//build/config/ui.gni") + +group("linux") { + visibility = [ "//:optimize_gn_gen" ] +} + +# This is included by reference in the //build/config/compiler config that +# is applied to all targets. It is here to separate out the logic that is +# Linux-only. This is not applied to Android, but is applied to ChromeOS. +config("compiler") { + if (target_cpu == "arm64") { + import("//build/config/arm.gni") + cflags = [] + asmflags = [] + if (arm_control_flow_integrity == "standard") { + cflags += [ "-mbranch-protection=standard" ] + asmflags += [ "-mbranch-protection=standard" ] + } + } +} + +# This is included by reference in the //build/config/compiler:runtime_library +# config that is applied to all targets. It is here to separate out the logic +# that is Linux-only. Please see that target for advice on what should go in +# :runtime_library vs. :compiler. +config("runtime_library") { + # Set here because OS_CHROMEOS cannot be autodetected in build_config.h like + # OS_LINUX and the like. + if (is_chromeos) { + defines = [ "OS_CHROMEOS" ] + } + + if ((!(is_chromeos_ash || is_chromeos_lacros) || + default_toolchain != "//build/toolchain/cros:target") && + (!use_custom_libcxx || target_cpu == "mipsel") && !build_with_mozilla) { + libs = [ "atomic" ] + } +} + +config("libcap") { + libs = [ "cap" ] +} + +config("libresolv") { + libs = [ "resolv" ] +} + +if (false && use_glib) { + pkg_config("glib") { + packages = [ + "glib-2.0", + "gmodule-2.0", + "gobject-2.0", + "gthread-2.0", + ] + defines = [ + "GLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_40", + "GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40", + ] + } +} + +# Ensures all exported symbols are added to the dynamic symbol table. This is +# necessary to expose Chrome's custom operator new() and operator delete() (and +# other memory-related symbols) to libraries. Otherwise, they might +# (de)allocate memory on a different heap, which would spell trouble if pointers +# to heap-allocated memory are passed over shared library boundaries. +config("export_dynamic") { + ldflags = [ "-rdynamic" ] +} |