From e92cf9f331c25a7be7445ecd9239600457d88450 Mon Sep 17 00:00:00 2001 From: Alexander Frick Date: Fri, 29 Dec 2023 00:33:22 -0600 Subject: [PATCH] update other build.gns --- arm/android/build/config/arm.gni | 2 ++ arm/build/config/arm.gni | 2 ++ arm/mac_arm.gni | 18 ++++++++++-------- arm/raspi/build/config/arm.gni | 2 ++ arm/woa_arm.gni | 2 ++ other/AVX2/build/config/win/BUILD.gn | 8 +++++++- other/SSE3/build/config/win/BUILD.gn | 8 +++++++- src/build/config/arm.gni | 2 ++ src/build/config/mac/BUILD.gn | 9 +++++---- src/build/config/win/BUILD.gn | 8 +++++++- 10 files changed, 46 insertions(+), 15 deletions(-) diff --git a/arm/android/build/config/arm.gni b/arm/android/build/config/arm.gni index 2ad87849..c2666f7f 100644 --- a/arm/android/build/config/arm.gni +++ b/arm/android/build/config/arm.gni @@ -41,6 +41,8 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") { # For lacros build, we use ARM v8 by default. if (is_chromeos_lacros && arm_arch == "") { + # TODO(crbug.com/1467681) Enable i8mm and dotprod instructions for ffmpeg + # if ever we update to a version of arm that supports these instructions. arm_version = 8 arm_arch = "armv8-a+crc" } diff --git a/arm/build/config/arm.gni b/arm/build/config/arm.gni index 2ad87849..c2666f7f 100644 --- a/arm/build/config/arm.gni +++ b/arm/build/config/arm.gni @@ -41,6 +41,8 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") { # For lacros build, we use ARM v8 by default. if (is_chromeos_lacros && arm_arch == "") { + # TODO(crbug.com/1467681) Enable i8mm and dotprod instructions for ffmpeg + # if ever we update to a version of arm that supports these instructions. arm_version = 8 arm_arch = "armv8-a+crc" } diff --git a/arm/mac_arm.gni b/arm/mac_arm.gni index e4bc9740..a032c001 100644 --- a/arm/mac_arm.gni +++ b/arm/mac_arm.gni @@ -17,7 +17,7 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") { # The ARM architecture. This will be a string like "armv6" or "armv7-a". # An empty string means to use the default for the arm_version. - arm_arch = "armv8.5-a" + arm_arch = "armv8.3-a" # The ARM floating point hardware. This will be a string like "neon" or # "vfpv3". An empty string means to use the default for the arm_version. @@ -26,7 +26,7 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") { # The ARM variant-specific tuning mode. This will be a string like "armv6" # or "cortex-a15". An empty string means to use the default for the # arm_version. - arm_tune = "generic-armv8.5-a" + arm_tune = "generic-armv8.3-a" # Whether to use the neon FPU instruction set or not. arm_use_neon = "true" @@ -41,6 +41,8 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") { # For lacros build, we use ARM v8 by default. if (is_chromeos_lacros && arm_arch == "") { + # TODO(crbug.com/1467681) Enable i8mm and dotprod instructions for ffmpeg + # if ever we update to a version of arm that supports these instructions. arm_version = 8 arm_arch = "armv8-a+crc" } @@ -106,10 +108,10 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") { } } else if (arm_version == 8) { if (arm_arch == "") { - arm_arch = "armv8.5-a" + arm_arch = "armv8.3-a" } if (arm_tune == "") { - arm_tune = "generic-armv8.5-a" + arm_tune = "generic-armv8.3-a" } if (arm_float_abi == "") { @@ -141,12 +143,12 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") { # The ARM64 architecture. This will be a string like "armv8-a" or "armv8.5-a. # An empty string means to use the default for the arm_version. - arm_arch = "armv8.5-a" + arm_arch = "armv8.3-a" # The ARM variant-specific tuning mode. This will be a string like "armv6" # or "cortex-a15". An empty string means to use the default for the # arm_version. - arm_tune = "generic-armv8.5-a" + arm_tune = "generic-armv8.3-a" # The ARM64 floating point hardware. This will be a string like "neon" or # "vfpv3-d16". An empty string means to use the default for the arm_version. @@ -173,9 +175,9 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") { # Initial values from upstream. arm_version = 8 arm_float_abi = "hard" - arm_arch = "armv8.5-a" + arm_arch = "armv8.3-a" arm_fpu = "neon" - arm_tune = "generic-armv8.5-a" + arm_tune = "generic-armv8.3-a" arm_use_neon = true arm_optionally_use_neon = false arm_use_thumb = true diff --git a/arm/raspi/build/config/arm.gni b/arm/raspi/build/config/arm.gni index bcb7c18b..9d950d3d 100644 --- a/arm/raspi/build/config/arm.gni +++ b/arm/raspi/build/config/arm.gni @@ -44,6 +44,8 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") { # For lacros build, we use ARM v8 by default. if (is_chromeos_lacros && arm_arch == "") { + # TODO(crbug.com/1467681) Enable i8mm and dotprod instructions for ffmpeg + # if ever we update to a version of arm that supports these instructions. arm_version = 8 arm_arch = "armv8-a+crc" } diff --git a/arm/woa_arm.gni b/arm/woa_arm.gni index 18ba41b1..b022eaa8 100644 --- a/arm/woa_arm.gni +++ b/arm/woa_arm.gni @@ -41,6 +41,8 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") { # For lacros build, we use ARM v8 by default. if (is_chromeos_lacros && arm_arch == "") { + # TODO(crbug.com/1467681) Enable i8mm and dotprod instructions for ffmpeg + # if ever we update to a version of arm that supports these instructions. arm_version = 8 arm_arch = "armv8-a+crc" } diff --git a/other/AVX2/build/config/win/BUILD.gn b/other/AVX2/build/config/win/BUILD.gn index 52ccc191..0f0b324f 100644 --- a/other/AVX2/build/config/win/BUILD.gn +++ b/other/AVX2/build/config/win/BUILD.gn @@ -193,7 +193,13 @@ config("compiler") { # block maps. # This flag requires lld-link.exe or link.exe from VS 2022 or later to create # the PDBs, and tools from circa 22H2 or later to consume the PDBs. - ldflags += [ "/pdbpagesize:8192" ] + # Debug component builds can generate PDBs that exceed 8 GiB, so use an + # even larger page size, allowing up to 16 GiB PDBs. + if (is_debug && !is_component_build) { + ldflags += [ "/pdbpagesize:16384" ] + } else { + ldflags += [ "/pdbpagesize:8192" ] + } if (!is_debug && !is_component_build) { # Enable standard linker optimizations like GC (/OPT:REF) and ICF in static diff --git a/other/SSE3/build/config/win/BUILD.gn b/other/SSE3/build/config/win/BUILD.gn index a1555c43..79aa6cb7 100644 --- a/other/SSE3/build/config/win/BUILD.gn +++ b/other/SSE3/build/config/win/BUILD.gn @@ -184,7 +184,13 @@ config("compiler") { # block maps. # This flag requires lld-link.exe or link.exe from VS 2022 or later to create # the PDBs, and tools from circa 22H2 or later to consume the PDBs. - ldflags += [ "/pdbpagesize:8192" ] + # Debug component builds can generate PDBs that exceed 8 GiB, so use an + # even larger page size, allowing up to 16 GiB PDBs. + if (is_debug && !is_component_build) { + ldflags += [ "/pdbpagesize:16384" ] + } else { + ldflags += [ "/pdbpagesize:8192" ] + } if (!is_debug && !is_component_build) { # Enable standard linker optimizations like GC (/OPT:REF) and ICF in static diff --git a/src/build/config/arm.gni b/src/build/config/arm.gni index 2ad87849..c2666f7f 100644 --- a/src/build/config/arm.gni +++ b/src/build/config/arm.gni @@ -41,6 +41,8 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") { # For lacros build, we use ARM v8 by default. if (is_chromeos_lacros && arm_arch == "") { + # TODO(crbug.com/1467681) Enable i8mm and dotprod instructions for ffmpeg + # if ever we update to a version of arm that supports these instructions. arm_version = 8 arm_arch = "armv8-a+crc" } diff --git a/src/build/config/mac/BUILD.gn b/src/build/config/mac/BUILD.gn index 4cb30446..d0b0a3dc 100644 --- a/src/build/config/mac/BUILD.gn +++ b/src/build/config/mac/BUILD.gn @@ -8,6 +8,7 @@ import("//build/config/mac/mac_sdk.gni") import("//build/config/sysroot.gni") import("//build/toolchain/goma.gni") import("//build/toolchain/rbe.gni") +import("//build/toolchain/siso.gni") # 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. @@ -54,8 +55,8 @@ config("compiler") { } if (current_cpu == "x64") { - cflags += [ "-O3", "-maes", "-march=x86-64-v3", "-ffp-contract=fast", "-mf16c", "-mfma", ] - ldflags += [ "-Wl,-O3", "-maes", "-Wl,-mllvm,-march=x86-64-v3", "-Wl,-mllvm,-fp-contract=fast", "-Wl,-mllvm,-import-instr-limit=30", "-Wl,-mllvm,-import-hot-multiplier=15", "-Wl,-mllvm,-import-cold-multiplier=4", ] + cflags += [ "-O3", "-march=x86-64-v3", "-ffp-contract=fast", ] + ldflags += [ "-Wl,-O3", "-Wl,-mllvm,-march=x86-64-v3", "-Wl,-mllvm,-fp-contract=fast", "-Wl,-mllvm,-import-instr-limit=30", "-Wl,-mllvm,-import-hot-multiplier=15", "-Wl,-mllvm,-import-cold-multiplier=2", ] } if (save_unstripped_output) { @@ -120,8 +121,8 @@ config("mac_dynamic_flags") { # # The symbolic link for $mac_sdk_path is set up by # //build/config/apple/sdk_info.py in //build/config/mac/mac_sdk.gni. -if (use_system_xcode && (use_goma || use_remoteexec) && target_os == "mac" && - current_toolchain == default_toolchain) { +if (use_system_xcode && (use_goma || use_remoteexec || use_siso) && + target_os == "mac" && current_toolchain == default_toolchain) { action("sdk_inputs") { script = "//build/noop.py" outputs = [ diff --git a/src/build/config/win/BUILD.gn b/src/build/config/win/BUILD.gn index da9d9971..59840fa8 100644 --- a/src/build/config/win/BUILD.gn +++ b/src/build/config/win/BUILD.gn @@ -188,7 +188,13 @@ config("compiler") { # block maps. # This flag requires lld-link.exe or link.exe from VS 2022 or later to create # the PDBs, and tools from circa 22H2 or later to consume the PDBs. - ldflags += [ "/pdbpagesize:8192" ] + # Debug component builds can generate PDBs that exceed 8 GiB, so use an + # even larger page size, allowing up to 16 GiB PDBs. + if (is_debug && !is_component_build) { + ldflags += [ "/pdbpagesize:16384" ] + } else { + ldflags += [ "/pdbpagesize:8192" ] + } if (!is_debug && !is_component_build) { # Enable standard linker optimizations like GC (/OPT:REF) and ICF in static