summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/build/toolchain/mac
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /third_party/libwebrtc/build/toolchain/mac
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/build/toolchain/mac')
-rw-r--r--third_party/libwebrtc/build/toolchain/mac/BUILD.gn102
-rw-r--r--third_party/libwebrtc/build/toolchain/mac/OWNERS1
2 files changed, 103 insertions, 0 deletions
diff --git a/third_party/libwebrtc/build/toolchain/mac/BUILD.gn b/third_party/libwebrtc/build/toolchain/mac/BUILD.gn
new file mode 100644
index 0000000000..4809b4ba0a
--- /dev/null
+++ b/third_party/libwebrtc/build/toolchain/mac/BUILD.gn
@@ -0,0 +1,102 @@
+# Copyright 2021 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("//build/config/mac/mac_sdk.gni")
+import("//build/toolchain/apple/toolchain.gni")
+
+# Specialisation of the apple_toolchain template to declare the toolchain
+# and its tools to build target for macOS platform.
+template("mac_toolchain") {
+ assert(defined(invoker.toolchain_args),
+ "Toolchains must declare toolchain_args")
+
+ apple_toolchain(target_name) {
+ forward_variables_from(invoker, "*", [ "toolchain_args" ])
+
+ bin_path = mac_bin_path
+
+ toolchain_args = {
+ forward_variables_from(invoker.toolchain_args, "*")
+ current_os = "mac"
+
+ if (target_os == "ios") {
+ # Use LLD for the host part of a chrome/ios build.
+ use_lld = true
+
+ # TODO(crbug.com/753445): the use_sanitizer_coverage arg is currently
+ # not supported by the Chromium mac_clang_x64 toolchain on iOS
+ # distribution.
+ use_sanitizer_coverage = false
+
+ # Do not use Xcode version of clang when building macOS tools for the
+ # host even if this is the version used to build for the iOS target.
+ use_xcode_clang = false
+ }
+ }
+ }
+}
+
+mac_toolchain("clang_arm") {
+ toolchain_args = {
+ target_cpu = "arm"
+ }
+}
+
+mac_toolchain("clang_arm64") {
+ toolchain_args = {
+ target_cpu = "arm64"
+ }
+}
+
+mac_toolchain("clang_x64") {
+ toolchain_args = {
+ target_cpu = "x64"
+ }
+}
+
+mac_toolchain("clang_x86") {
+ toolchain_args = {
+ target_cpu = "x86"
+ }
+}
+
+mac_toolchain("clang_x86_v8_arm") {
+ toolchain_args = {
+ target_cpu = "x86"
+
+ if (defined(v8_target_cpu)) {
+ v8_target_cpu = "arm"
+ }
+ }
+}
+
+mac_toolchain("clang_x86_v8_mipsel") {
+ toolchain_args = {
+ target_cpu = "x86"
+
+ if (defined(v8_target_cpu)) {
+ v8_target_cpu = "mipsel"
+ }
+ }
+}
+
+mac_toolchain("clang_x64_v8_arm64") {
+ toolchain_args = {
+ target_cpu = "x64"
+
+ if (defined(v8_target_cpu)) {
+ v8_target_cpu = "arm64"
+ }
+ }
+}
+
+mac_toolchain("clang_x64_v8_mips64el") {
+ toolchain_args = {
+ target_cpu = "x64"
+
+ if (defined(v8_target_cpu)) {
+ v8_target_cpu = "mips64el"
+ }
+ }
+}
diff --git a/third_party/libwebrtc/build/toolchain/mac/OWNERS b/third_party/libwebrtc/build/toolchain/mac/OWNERS
new file mode 100644
index 0000000000..6f3324f07c
--- /dev/null
+++ b/third_party/libwebrtc/build/toolchain/mac/OWNERS
@@ -0,0 +1 @@
+file://build/apple/OWNERS