diff --git a/arm/build/config/compiler/BUILD.gn b/arm/build/config/compiler/BUILD.gn index 5e998db7..95e4a61c 100644 --- a/arm/build/config/compiler/BUILD.gn +++ b/arm/build/config/compiler/BUILD.gn @@ -692,6 +692,7 @@ config("compiler") { "-mllvm:-import-instr-limit=$import_instr_limit", "-mllvm:-import-hot-multiplier=15", "-mllvm:-import-cold-multiplier=4", + "-mllvm:-disable-auto-upgrade-debug-info", # "/lldltocache:" + # rebase_path("$root_out_dir/thinlto-cache", root_build_dir), # "/lldltocachepolicy:$cache_policy", @@ -734,6 +735,14 @@ config("compiler") { } ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ] + + if (!is_chromeos) { + # TODO(https://crbug.com/972449): turn on for ChromeOS when that + # toolchain has this flag. + # We only use one version of LLVM within a build so there's no need to + # upgrade debug info, which can be expensive since it runs the verifier. + ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ] + } } # TODO(https://crbug.com/1211155): investigate why this isn't effective on @@ -948,7 +957,7 @@ config("thinlto_optimize_default") { ldflags = [ "-Wl,--lto-O" + lto_opt_level ] } - rustflags = [ "-Clto=thin" ] + rustflags = [ "-Clinker-plugin-lto=yes" ] } } @@ -975,7 +984,7 @@ config("thinlto_optimize_max") { ldflags = [ "-Wl,--lto-O" + lto_opt_level ] } - rustflags = [ "-Clto=thin" ] + rustflags = [ "-Clinker-plugin-lto=yes" ] } } @@ -1783,14 +1792,14 @@ config("chromium_code") { defines += [ "_FORTIFY_SOURCE=2" ] } - if (is_mac) { - cflags_objc = [ "-Wobjc-missing-property-synthesis" ] - cflags_objcc = [ "-Wobjc-missing-property-synthesis" ] + if (is_apple) { + cflags_objc = [ "-Wimplicit-retain-self" ] + cflags_objcc = [ "-Wimplicit-retain-self" ] } - if (is_ios) { - cflags_objc = [ "-Wimplicit-retain-self" ] - cflags_objcc = cflags_objc + if (is_mac) { + cflags_objc += [ "-Wobjc-missing-property-synthesis" ] + cflags_objcc += [ "-Wobjc-missing-property-synthesis" ] } } @@ -2475,6 +2484,7 @@ config("win_pdbaltpath") { # Full symbols. config("symbols") { + rustflags = [] if (is_win) { if (is_clang) { cflags = [ @@ -2513,11 +2523,13 @@ config("symbols") { if (!is_nacl && current_os != "aix") { if (use_dwarf5) { cflags += [ "-gdwarf-5" ] + rustflags += [ "-Zdwarf-version=5" ] } else if (!is_apple) { # Recent clang versions default to DWARF5 on Linux, and Android is about # to switch. TODO: Adopt that in controlled way. # Apple platforms still default to 4, so the flag is not needed there. cflags += [ "-gdwarf-4" ] + rustflags += [ "-Zdwarf-version=4" ] } } @@ -2608,7 +2620,7 @@ config("symbols") { ] } } - rustflags = [ "-g", "-Copt-level=3", ] + rustflags += [ "-g", "-Copt-level=3", ] } # Minimal symbols. diff --git a/arm/build/config/win/BUILD.gn b/arm/build/config/win/BUILD.gn index 2897ee03..4be9a770 100644 --- a/arm/build/config/win/BUILD.gn +++ b/arm/build/config/win/BUILD.gn @@ -11,6 +11,7 @@ import("//build/config/win/control_flow_guard.gni") import("//build/config/win/visual_studio_version.gni") import("//build/timestamp.gni") import("//build/toolchain/goma.gni") +import("//build/toolchain/rbe.gni") import("//build/toolchain/toolchain.gni") assert(is_win) @@ -41,9 +42,6 @@ declare_args() { # and with this switch, clang emits it like this: # foo/bar.cc:12:34: error: something went wrong use_clang_diagnostics_format = false - - # Indicates whether to use /pdbpagesize:8192 to allow PDBs larger than 4 GiB. - use_large_pdbs = true } # This is included by reference in the //build/config/compiler config that @@ -143,13 +141,13 @@ config("compiler") { ] } - if (exec_script("//build/win/use_ansi_codes.py", [], "trim string") == + # Enable ANSI escape codes if something emulating them is around (cmd.exe + # doesn't understand ANSI escape codes by default). Make sure to not enable + # this if goma/remoteexec is in use, because this will lower cache hits. + if (!use_goma && !use_remoteexec && + exec_script("//build/win/use_ansi_codes.py", [], "trim string") == "True") { - cflags += [ - # cmd.exe doesn't understand ANSI escape codes by default, - # so only enable them if something emulating them is around. - "-fansi-escape-codes", - ] + cflags += [ "-fansi-escape-codes" ] } if (use_clang_diagnostics_format) { @@ -183,14 +181,14 @@ config("compiler") { ldflags += [ "/opt:lldlto=3", ] } - if (use_large_pdbs) { - # This allows PDBs up to 8 GiB in size. This requires lld-link.exe or - # link.exe from VS 2022 or later. - if (!defined(configs)) { - configs = [] - } - configs += [ ":pdb_larger_than_4gb" ] - } + # Some binaries create PDBs larger than 4 GiB. Increasing the PDB page size + # to 8 KiB allows 8 GiB PDBs. The larger page size also allows larger block maps + # which is a PDB limit that was hit in https://crbug.com/1406510. The page size + # can easily be increased in the future to allow even larger PDBs or larger + # 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" ] if (!is_debug && !is_component_build) { # Enable standard linker optimizations like GC (/OPT:REF) and ICF in static @@ -346,17 +344,26 @@ config("common_linker_setup") { } } +# Flags that should be applied to building .exe files but not .dll files. +config("exe_flags") { + rustflags = [ "-Ctarget-feature=+crt-static" ] +} + config("default_cfg_compiler") { # Emit table of address-taken functions for Control-Flow Guard (CFG). # This is needed to allow functions to be called by code that is built # with CFG enabled, such as system libraries. # The CFG guards are only emitted if |win_enable_cfg_guards| is enabled. - if (is_clang) { - if (win_enable_cfg_guards) { + if (win_enable_cfg_guards) { + if (is_clang) { cflags = [ "/guard:cf" ] - } else { + } + rustflags = [ "-Ccontrol-flow-guard" ] + } else { + if (is_clang) { cflags = [ "/guard:cf,nochecks" ] } + rustflags = [ "-Ccontrol-flow-guard=nochecks" ] } } @@ -369,6 +376,7 @@ config("disable_guards_cfg_compiler") { if (is_clang) { cflags = [ "/guard:cf,nochecks" ] } + rustflags = [ "-Ccontrol-flow-guard=nochecks" ] } config("cfi_linker") { @@ -612,15 +620,3 @@ config("lean_and_mean") { config("nominmax") { defines = [ "NOMINMAX" ] } - -# Some binaries create PDBs larger than 4 GiB. Increasing the PDB page size -# to 8 KiB allows 8 GiB PDBs. The larger page size also allows larger block maps -# which is a PDB limit that was hit in https://crbug.com/1406510. The page size -# can easily be increased in the future to allow even larger PDBs or larger -# block maps. -config("pdb_larger_than_4gb") { - if (!defined(ldflags)) { - ldflags = [] - } - ldflags += [ "/pdbpagesize:8192" ] -} diff --git a/arm/raspi/build/config/compiler/BUILD.gn b/arm/raspi/build/config/compiler/BUILD.gn index e320774a..fa99b329 100644 --- a/arm/raspi/build/config/compiler/BUILD.gn +++ b/arm/raspi/build/config/compiler/BUILD.gn @@ -692,6 +692,7 @@ config("compiler") { "-mllvm:-import-instr-limit=$import_instr_limit", "-mllvm:-import-hot-multiplier=15", "-mllvm:-import-cold-multiplier=4", + "-mllvm:-disable-auto-upgrade-debug-info", # "/lldltocache:" + # rebase_path("$root_out_dir/thinlto-cache", root_build_dir), # "/lldltocachepolicy:$cache_policy", @@ -734,6 +735,14 @@ config("compiler") { } ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ] + + if (!is_chromeos) { + # TODO(https://crbug.com/972449): turn on for ChromeOS when that + # toolchain has this flag. + # We only use one version of LLVM within a build so there's no need to + # upgrade debug info, which can be expensive since it runs the verifier. + ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ] + } } # TODO(https://crbug.com/1211155): investigate why this isn't effective on @@ -938,7 +947,7 @@ config("thinlto_optimize_default") { ldflags = [ "-Wl,--lto-O" + lto_opt_level ] } - rustflags = [ "-Clto=thin" ] + rustflags = [ "-Clinker-plugin-lto=yes" ] } } @@ -964,7 +973,7 @@ config("thinlto_optimize_max") { ldflags = [ "-Wl,--lto-O" + lto_opt_level ] } - rustflags = [ "-Clto=thin" ] + rustflags = [ "-Clinker-plugin-lto=yes" ] } } @@ -1756,14 +1765,14 @@ config("chromium_code") { defines += [ "_FORTIFY_SOURCE=2" ] } - if (is_mac) { - cflags_objc = [ "-Wobjc-missing-property-synthesis" ] - cflags_objcc = [ "-Wobjc-missing-property-synthesis" ] + if (is_apple) { + cflags_objc = [ "-Wimplicit-retain-self" ] + cflags_objcc = [ "-Wimplicit-retain-self" ] } - if (is_ios) { - cflags_objc = [ "-Wimplicit-retain-self" ] - cflags_objcc = cflags_objc + if (is_mac) { + cflags_objc += [ "-Wobjc-missing-property-synthesis" ] + cflags_objcc += [ "-Wobjc-missing-property-synthesis" ] } } @@ -2413,6 +2422,7 @@ config("win_pdbaltpath") { # Full symbols. config("symbols") { + rustflags = [] if (is_win) { if (is_clang) { cflags = [ @@ -2451,11 +2461,13 @@ config("symbols") { if (!is_nacl && current_os != "aix") { if (use_dwarf5) { cflags += [ "-gdwarf-5" ] + rustflags += [ "-Zdwarf-version=5" ] } else if (!is_apple) { # Recent clang versions default to DWARF5 on Linux, and Android is about # to switch. TODO: Adopt that in controlled way. # Apple platforms still default to 4, so the flag is not needed there. cflags += [ "-gdwarf-4" ] + rustflags += [ "-Zdwarf-version=4" ] } } @@ -2546,7 +2558,7 @@ config("symbols") { ] } } - rustflags = [ "-g" ] + rustflags += [ "-g" ] } # Minimal symbols. diff --git a/infra/thorium_strings.grd b/infra/thorium_strings.grd index 624eab21..277ca022 100644 --- a/infra/thorium_strings.grd +++ b/infra/thorium_strings.grd @@ -378,12 +378,24 @@ If you update this file, be sure also to update google_chrome_strings.grd. --> $1Google - Thorium Canary - - The Thorium Authors - - - Copyright {0,date,y}2016 The Thorium Authors. All rights reserved. - + + + + Google LLC + + + Copyright {0,date,y}2016 Google LLC. All rights reserved. + + + + + The Thorium Authors + + + Copyright {0,date,y}2016 The Thorium Authors. All rights reserved. + + + ThoriumOS is made possible by additional <a target="_blank" href="$1">open source software</a>. @@ -399,11 +411,11 @@ If you update this file, be sure also to update google_chrome_strings.grd. --> Not used in Thorium. Placeholder to keep resource maps in sync. - - To get future Thorium updates, you'll need macOS 10.13 or later. This computer is using OS X 10.11. + + To get future Thorium updates, you'll need macOS 10.15 or later. This computer is using macOS 10.13. - - To get future Thorium updates, you'll need macOS 10.13 or later. This computer is using macOS 10.12. + + To get future Thorium updates, you'll need macOS 10.15 or later. This computer is using macOS 10.14. @@ -502,11 +514,6 @@ Thorium is unable to recover your settings. - -If you want to use this account one-time only, you can use Guest mode in Thorium browser. If you want to add an account for someone else, <a target="_blank" id="newPersonLink" href="$1https://google.com/">add a new person</a> to your $2Thoriumbook. - -Permissions you've already given to websites and apps may apply to this account. You can manage your Google Accounts in <a id="osSettingsLink" href="$3https://google.com/">Settings</a>. - If you want to use this account one-time only, you can use <a id="guestModeLink" href="#">Guest mode</a> in Thorium browser. If you want to add an account for someone else, <a target="_blank" id="newPersonLink" href="$1https://google.com/">add a new person</a> to your $2Thoriumbook. @@ -543,17 +550,8 @@ Permissions you've already given to websites and apps may apply to this account. In Password Manager on this device - - Thorium is trying to show passwords. - - - Thorium is trying to copy passwords. - - - Thorium is trying to edit passwords. - - - Thorium wants to export your passwords. + + Thorium is trying to $1show passwords @@ -569,6 +567,9 @@ Permissions you've already given to websites and apps may apply to this account. Thorium wants to export your passwords. Type your Windows password to allow this. + + Thorium is trying to replace existing passwords. Type your Windows password to allow this. + This computer already has a more recent version of Thorium. If the software is not working, please uninstall Thorium and try again. @@ -582,7 +583,7 @@ Permissions you've already given to websites and apps may apply to this account. Installation failed due to unspecified error. Please download Thorium again. - Thorium requires Windows 7 or higher. + Thorium requires Windows 10 or higher. An operating system error occurred during installation. Please download Thorium again. @@ -624,9 +625,6 @@ Permissions you've already given to websites and apps may apply to this account. Thorium isn't your default browser - - You turned on Enhanced Safe Browsing in your account. Now get it for Thorium. - @@ -815,6 +813,12 @@ Permissions you've already given to websites and apps may apply to this account. + + + Not used in Thorium. Placeholder to keep resource maps in sync. + + + Thorium @@ -827,6 +831,10 @@ Permissions you've already given to websites and apps may apply to this account. + + Password Manager + + Thorium @@ -1002,10 +1010,17 @@ Permissions you've already given to websites and apps may apply to this account. - + {NUM_DEVICES, plural, - =1 {Thorium is connected to a HID device} - other {Thorium is connected to HID devices}} + =0 {A Thorium extension was accessing HID devices} + =1 {A Thorium extension is accessing 1 HID device} + other {A Thorium extension is accessing # HID devices}} + + + {NUM_DEVICES, plural, + =0 {Thorium extensions were accessing HID devices} + =1 {Thorium extensions are accessing HID devices} + other {Thorium extensions are accessing # HID devices}} @@ -1156,6 +1171,15 @@ Permissions you've already given to websites and apps may apply to this account. + + + Not used in Thorium. Placeholder to keep resource maps in sync. + + + Not used in Thorium. Placeholder to keep resource maps in sync. + + + Reinstall Thorium @@ -1211,10 +1235,8 @@ Permissions you've already given to websites and apps may apply to this account. - - {SECONDS, plural, - =1 {Thorium will restart in 1 second} - other {Thorium will restart in # seconds}} + + Thorium will restart in $11 minute, 7 seconds Please restart Thorium now @@ -1359,19 +1381,29 @@ Permissions you've already given to websites and apps may apply to this account. - - Thorium is inactive + + Thorium will soon close - + + Thorium will soon delete browsing data + + + Thorium will soon close and delete data + + {COUNT, plural, - =1 {Your administrator has configured Thorium to close if it is idle for more than 1 minute.} - other {Your administrator has configured Thorium to close if it is idle for more than # minutes.}} + =1 {Your administrator automatically closes Thorium when it isn't used for 1 minute.} + other {Your administrator automatically closes Thorium when it isn't used for # minutes.}} - - {0, plural, - =0 {Thorium will close now.} - =1 {Thorium will close in 1 second.} - other {Thorium will close in # seconds.}} + + {COUNT, plural, + =1 {Your administrator automatically deletes browsing data when it isn't used for 1 minute. This could include history, autofill, and downloads. Your existing tabs will remain open.} + other {Your administrator automatically deletes browsing data when it isn't used for # minutes. This could include history, autofill, and downloads. Your existing tabs will remain open.}} + + + {COUNT, plural, + =1 {Your administrator automatically closes Thorium when it isn't used for 1 minute. Browsing data is deleted. This could include history, autofill, and downloads.} + other {Your administrator automatically closes Thorium when it isn't used for # minutes. Browsing data is deleted. This could include history, autofill, and downloads.}} Continue using Thorium @@ -1405,6 +1437,9 @@ Permissions you've already given to websites and apps may apply to this account. Sign in to Thorium + + Sign in to Thorium. If you want to sign in an account one-time only, you can <a id="guestModeLink" href="#">use the device as guest</a>. + @@ -1455,8 +1490,17 @@ Permissions you've already given to websites and apps may apply to this account. - - You can enjoy the most out of Thorium + + Sign in to Thorium + + + Make Thorium your own + + + Do more with Thorium @@ -1467,6 +1511,9 @@ Permissions you've already given to websites and apps may apply to this account. $1CTRL+SHIFT+M can switch between Thorium profiles + + You can switch to see passwords from another Thorium profile + @@ -1496,6 +1543,9 @@ Permissions you've already given to websites and apps may apply to this account. Enhanced protection does more to block phishing and malware + + Enhanced Safe Browsing does more to protect you against dangerous websites and downloads + Continue @@ -1647,16 +1697,6 @@ Permissions you've already given to websites and apps may apply to this account. - - - Memory Saver Made Thorium Faster - - - - - Memory Saver made Thorium faster - - Make Thorium Faster diff --git a/other/AVX2/build/config/compiler/BUILD.gn b/other/AVX2/build/config/compiler/BUILD.gn index cc92f009..0c323e2d 100644 --- a/other/AVX2/build/config/compiler/BUILD.gn +++ b/other/AVX2/build/config/compiler/BUILD.gn @@ -692,6 +692,7 @@ config("compiler") { "-mllvm:-import-instr-limit=$import_instr_limit", "-mllvm:-import-hot-multiplier=15", "-mllvm:-import-cold-multiplier=4", + "-mllvm:-disable-auto-upgrade-debug-info", # "/lldltocache:" + # rebase_path("$root_out_dir/thinlto-cache", root_build_dir), # "/lldltocachepolicy:$cache_policy", @@ -734,6 +735,14 @@ config("compiler") { } ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ] + + if (!is_chromeos) { + # TODO(https://crbug.com/972449): turn on for ChromeOS when that + # toolchain has this flag. + # We only use one version of LLVM within a build so there's no need to + # upgrade debug info, which can be expensive since it runs the verifier. + ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ] + } } # TODO(https://crbug.com/1211155): investigate why this isn't effective on @@ -939,7 +948,7 @@ config("thinlto_optimize_default") { ldflags = [ "-Wl,--lto-O" + lto_opt_level ] } - rustflags = [ "-Clto=thin" ] + rustflags = [ "-Clinker-plugin-lto=yes" ] } } @@ -966,7 +975,7 @@ config("thinlto_optimize_max") { ldflags = [ "-Wl,--lto-O" + lto_opt_level ] } - rustflags = [ "-Clto=thin" ] + rustflags = [ "-Clinker-plugin-lto=yes" ] } } @@ -1775,14 +1784,14 @@ config("chromium_code") { defines += [ "_FORTIFY_SOURCE=2" ] } - if (is_mac) { - cflags_objc = [ "-Wobjc-missing-property-synthesis" ] - cflags_objcc = [ "-Wobjc-missing-property-synthesis" ] + if (is_apple) { + cflags_objc = [ "-Wimplicit-retain-self" ] + cflags_objcc = [ "-Wimplicit-retain-self" ] } - if (is_ios) { - cflags_objc = [ "-Wimplicit-retain-self" ] - cflags_objcc = cflags_objc + if (is_mac) { + cflags_objc += [ "-Wobjc-missing-property-synthesis" ] + cflags_objcc += [ "-Wobjc-missing-property-synthesis" ] } } @@ -2535,6 +2544,7 @@ config("win_pdbaltpath") { # Full symbols. config("symbols") { + rustflags = [] if (is_win) { if (is_clang) { cflags = [ @@ -2573,11 +2583,13 @@ config("symbols") { if (!is_nacl && current_os != "aix") { if (use_dwarf5) { cflags += [ "-gdwarf-5" ] + rustflags += [ "-Zdwarf-version=5" ] } else if (!is_apple) { # Recent clang versions default to DWARF5 on Linux, and Android is about # to switch. TODO: Adopt that in controlled way. # Apple platforms still default to 4, so the flag is not needed there. cflags += [ "-gdwarf-4" ] + rustflags += [ "-Zdwarf-version=4" ] } } @@ -2668,7 +2680,7 @@ config("symbols") { ] } } - rustflags = [ "-g", "-Copt-level=3", "-Ctarget-feature=+aes,+avx,+avx2,-pclmul", ] + rustflags += [ "-g", "-Copt-level=3", "-Ctarget-feature=+aes,+avx,+avx2,-pclmul", ] } # Minimal symbols. diff --git a/other/AVX2/build/config/win/BUILD.gn b/other/AVX2/build/config/win/BUILD.gn index 415b5820..56c3e496 100644 --- a/other/AVX2/build/config/win/BUILD.gn +++ b/other/AVX2/build/config/win/BUILD.gn @@ -11,6 +11,7 @@ import("//build/config/win/control_flow_guard.gni") import("//build/config/win/visual_studio_version.gni") import("//build/timestamp.gni") import("//build/toolchain/goma.gni") +import("//build/toolchain/rbe.gni") import("//build/toolchain/toolchain.gni") assert(is_win) @@ -41,9 +42,6 @@ declare_args() { # and with this switch, clang emits it like this: # foo/bar.cc:12:34: error: something went wrong use_clang_diagnostics_format = false - - # Indicates whether to use /pdbpagesize:8192 to allow PDBs larger than 4 GiB. - use_large_pdbs = true } # This is included by reference in the //build/config/compiler config that @@ -149,13 +147,13 @@ config("compiler") { ] } - if (exec_script("//build/win/use_ansi_codes.py", [], "trim string") == + # Enable ANSI escape codes if something emulating them is around (cmd.exe + # doesn't understand ANSI escape codes by default). Make sure to not enable + # this if goma/remoteexec is in use, because this will lower cache hits. + if (!use_goma && !use_remoteexec && + exec_script("//build/win/use_ansi_codes.py", [], "trim string") == "True") { - cflags += [ - # cmd.exe doesn't understand ANSI escape codes by default, - # so only enable them if something emulating them is around. - "-fansi-escape-codes", - ] + cflags += [ "-fansi-escape-codes" ] } if (use_clang_diagnostics_format) { @@ -189,14 +187,14 @@ config("compiler") { ldflags += [ "/opt:lldlto=3", ] } - if (use_large_pdbs) { - # This allows PDBs up to 8 GiB in size. This requires lld-link.exe or - # link.exe from VS 2022 or later. - if (!defined(configs)) { - configs = [] - } - configs += [ ":pdb_larger_than_4gb" ] - } + # Some binaries create PDBs larger than 4 GiB. Increasing the PDB page size + # to 8 KiB allows 8 GiB PDBs. The larger page size also allows larger block maps + # which is a PDB limit that was hit in https://crbug.com/1406510. The page size + # can easily be increased in the future to allow even larger PDBs or larger + # 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" ] if (!is_debug && !is_component_build) { # Enable standard linker optimizations like GC (/OPT:REF) and ICF in static @@ -353,17 +351,26 @@ config("common_linker_setup") { } } +# Flags that should be applied to building .exe files but not .dll files. +config("exe_flags") { + rustflags = [ "-Ctarget-feature=+crt-static" ] +} + config("default_cfg_compiler") { # Emit table of address-taken functions for Control-Flow Guard (CFG). # This is needed to allow functions to be called by code that is built # with CFG enabled, such as system libraries. # The CFG guards are only emitted if |win_enable_cfg_guards| is enabled. - if (is_clang) { - if (win_enable_cfg_guards) { + if (win_enable_cfg_guards) { + if (is_clang) { cflags = [ "/guard:cf" ] - } else { + } + rustflags = [ "-Ccontrol-flow-guard" ] + } else { + if (is_clang) { cflags = [ "/guard:cf,nochecks" ] } + rustflags = [ "-Ccontrol-flow-guard=nochecks" ] } } @@ -376,6 +383,7 @@ config("disable_guards_cfg_compiler") { if (is_clang) { cflags = [ "/guard:cf,nochecks" ] } + rustflags = [ "-Ccontrol-flow-guard=nochecks" ] } config("cfi_linker") { @@ -619,15 +627,3 @@ config("lean_and_mean") { config("nominmax") { defines = [ "NOMINMAX" ] } - -# Some binaries create PDBs larger than 4 GiB. Increasing the PDB page size -# to 8 KiB allows 8 GiB PDBs. The larger page size also allows larger block maps -# which is a PDB limit that was hit in https://crbug.com/1406510. The page size -# can easily be increased in the future to allow even larger PDBs or larger -# block maps. -config("pdb_larger_than_4gb") { - if (!defined(ldflags)) { - ldflags = [] - } - ldflags += [ "/pdbpagesize:8192" ] -} diff --git a/other/SSE2/build/config/compiler/BUILD.gn b/other/SSE2/build/config/compiler/BUILD.gn index db92c7f0..368f42c6 100644 --- a/other/SSE2/build/config/compiler/BUILD.gn +++ b/other/SSE2/build/config/compiler/BUILD.gn @@ -697,6 +697,7 @@ config("compiler") { "-mllvm:-import-instr-limit=$import_instr_limit", "-mllvm:-import-hot-multiplier=15", "-mllvm:-import-cold-multiplier=4", + "-mllvm:-disable-auto-upgrade-debug-info", # "/lldltocache:" + # rebase_path("$root_out_dir/thinlto-cache", root_build_dir), # "/lldltocachepolicy:$cache_policy", @@ -744,6 +745,14 @@ config("compiler") { } ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ] + + if (!is_chromeos) { + # TODO(https://crbug.com/972449): turn on for ChromeOS when that + # toolchain has this flag. + # We only use one version of LLVM within a build so there's no need to + # upgrade debug info, which can be expensive since it runs the verifier. + ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ] + } } # TODO(https://crbug.com/1211155): investigate why this isn't effective on @@ -952,7 +961,7 @@ config("thinlto_optimize_default") { ldflags = [ "-Wl,--lto-O" + lto_opt_level ] } - rustflags = [ "-Clto=thin" ] + rustflags = [ "-Clinker-plugin-lto=yes" ] } } @@ -979,7 +988,7 @@ config("thinlto_optimize_max") { ldflags = [ "-Wl,--lto-O" + lto_opt_level ] } - rustflags = [ "-Clto=thin" ] + rustflags = [ "-Clinker-plugin-lto=yes" ] } } @@ -1776,14 +1785,14 @@ config("chromium_code") { defines += [ "_FORTIFY_SOURCE=2" ] } - if (is_mac) { - cflags_objc = [ "-Wobjc-missing-property-synthesis" ] - cflags_objcc = [ "-Wobjc-missing-property-synthesis" ] + if (is_apple) { + cflags_objc = [ "-Wimplicit-retain-self" ] + cflags_objcc = [ "-Wimplicit-retain-self" ] } - if (is_ios) { - cflags_objc = [ "-Wimplicit-retain-self" ] - cflags_objcc = cflags_objc + if (is_mac) { + cflags_objc += [ "-Wobjc-missing-property-synthesis" ] + cflags_objcc += [ "-Wobjc-missing-property-synthesis" ] } } @@ -2534,6 +2543,7 @@ config("win_pdbaltpath") { # Full symbols. config("symbols") { + rustflags = [] if (is_win) { if (is_clang) { cflags = [ @@ -2572,11 +2582,13 @@ config("symbols") { if (!is_nacl && current_os != "aix") { if (use_dwarf5) { cflags += [ "-gdwarf-5" ] + rustflags += [ "-Zdwarf-version=5" ] } else if (!is_apple) { # Recent clang versions default to DWARF5 on Linux, and Android is about # to switch. TODO: Adopt that in controlled way. # Apple platforms still default to 4, so the flag is not needed there. cflags += [ "-gdwarf-4" ] + rustflags += [ "-Zdwarf-version=4" ] } } @@ -2667,7 +2679,7 @@ config("symbols") { ] } } - rustflags = [ "-g", "-Copt-level=3", "-Ctarget-feature=+sse2", ] + rustflags += [ "-g", "-Copt-level=3", "-Ctarget-feature=+sse2", ] } # Minimal symbols. diff --git a/other/SSE2/build/config/win/BUILD.gn b/other/SSE2/build/config/win/BUILD.gn index 61e9b23e..cf94880d 100644 --- a/other/SSE2/build/config/win/BUILD.gn +++ b/other/SSE2/build/config/win/BUILD.gn @@ -11,6 +11,7 @@ import("//build/config/win/control_flow_guard.gni") import("//build/config/win/visual_studio_version.gni") import("//build/timestamp.gni") import("//build/toolchain/goma.gni") +import("//build/toolchain/rbe.gni") import("//build/toolchain/toolchain.gni") assert(is_win) @@ -41,9 +42,6 @@ declare_args() { # and with this switch, clang emits it like this: # foo/bar.cc:12:34: error: something went wrong use_clang_diagnostics_format = false - - # Indicates whether to use /pdbpagesize:8192 to allow PDBs larger than 4 GiB. - use_large_pdbs = true } # This is included by reference in the //build/config/compiler config that @@ -139,13 +137,13 @@ config("compiler") { ] } - if (exec_script("//build/win/use_ansi_codes.py", [], "trim string") == + # Enable ANSI escape codes if something emulating them is around (cmd.exe + # doesn't understand ANSI escape codes by default). Make sure to not enable + # this if goma/remoteexec is in use, because this will lower cache hits. + if (!use_goma && !use_remoteexec && + exec_script("//build/win/use_ansi_codes.py", [], "trim string") == "True") { - cflags += [ - # cmd.exe doesn't understand ANSI escape codes by default, - # so only enable them if something emulating them is around. - "-fansi-escape-codes", - ] + cflags += [ "-fansi-escape-codes" ] } if (use_clang_diagnostics_format) { @@ -179,14 +177,14 @@ config("compiler") { ldflags += [ "/opt:lldlto=3", ] } - if (use_large_pdbs) { - # This allows PDBs up to 8 GiB in size. This requires lld-link.exe or - # link.exe from VS 2022 or later. - if (!defined(configs)) { - configs = [] - } - configs += [ ":pdb_larger_than_4gb" ] - } + # Some binaries create PDBs larger than 4 GiB. Increasing the PDB page size + # to 8 KiB allows 8 GiB PDBs. The larger page size also allows larger block maps + # which is a PDB limit that was hit in https://crbug.com/1406510. The page size + # can easily be increased in the future to allow even larger PDBs or larger + # 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" ] if (!is_debug && !is_component_build) { # Enable standard linker optimizations like GC (/OPT:REF) and ICF in static @@ -342,17 +340,26 @@ config("common_linker_setup") { } } +# Flags that should be applied to building .exe files but not .dll files. +config("exe_flags") { + rustflags = [ "-Ctarget-feature=+crt-static" ] +} + config("default_cfg_compiler") { # Emit table of address-taken functions for Control-Flow Guard (CFG). # This is needed to allow functions to be called by code that is built # with CFG enabled, such as system libraries. # The CFG guards are only emitted if |win_enable_cfg_guards| is enabled. - if (is_clang) { - if (win_enable_cfg_guards) { + if (win_enable_cfg_guards) { + if (is_clang) { cflags = [ "/guard:cf" ] - } else { + } + rustflags = [ "-Ccontrol-flow-guard" ] + } else { + if (is_clang) { cflags = [ "/guard:cf,nochecks" ] } + rustflags = [ "-Ccontrol-flow-guard=nochecks" ] } } @@ -365,6 +372,7 @@ config("disable_guards_cfg_compiler") { if (is_clang) { cflags = [ "/guard:cf,nochecks" ] } + rustflags = [ "-Ccontrol-flow-guard=nochecks" ] } config("cfi_linker") { @@ -608,15 +616,3 @@ config("lean_and_mean") { config("nominmax") { defines = [ "NOMINMAX" ] } - -# Some binaries create PDBs larger than 4 GiB. Increasing the PDB page size -# to 8 KiB allows 8 GiB PDBs. The larger page size also allows larger block maps -# which is a PDB limit that was hit in https://crbug.com/1406510. The page size -# can easily be increased in the future to allow even larger PDBs or larger -# block maps. -config("pdb_larger_than_4gb") { - if (!defined(ldflags)) { - ldflags = [] - } - ldflags += [ "/pdbpagesize:8192" ] -} diff --git a/other/SSE3/build/config/compiler/BUILD.gn b/other/SSE3/build/config/compiler/BUILD.gn index 9c2971f3..76d87466 100644 --- a/other/SSE3/build/config/compiler/BUILD.gn +++ b/other/SSE3/build/config/compiler/BUILD.gn @@ -692,6 +692,7 @@ config("compiler") { "-mllvm:-import-instr-limit=$import_instr_limit", "-mllvm:-import-hot-multiplier=15", "-mllvm:-import-cold-multiplier=4", + "-mllvm:-disable-auto-upgrade-debug-info", # "/lldltocache:" + # rebase_path("$root_out_dir/thinlto-cache", root_build_dir), # "/lldltocachepolicy:$cache_policy", @@ -734,6 +735,14 @@ config("compiler") { } ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ] + + if (!is_chromeos) { + # TODO(https://crbug.com/972449): turn on for ChromeOS when that + # toolchain has this flag. + # We only use one version of LLVM within a build so there's no need to + # upgrade debug info, which can be expensive since it runs the verifier. + ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ] + } } # TODO(https://crbug.com/1211155): investigate why this isn't effective on @@ -939,7 +948,7 @@ config("thinlto_optimize_default") { ldflags = [ "-Wl,--lto-O" + lto_opt_level ] } - rustflags = [ "-Clto=thin" ] + rustflags = [ "-Clinker-plugin-lto=yes" ] } } @@ -966,7 +975,7 @@ config("thinlto_optimize_max") { ldflags = [ "-Wl,--lto-O" + lto_opt_level ] } - rustflags = [ "-Clto=thin" ] + rustflags = [ "-Clinker-plugin-lto=yes" ] } } @@ -1772,14 +1781,14 @@ config("chromium_code") { defines += [ "_FORTIFY_SOURCE=2" ] } - if (is_mac) { - cflags_objc = [ "-Wobjc-missing-property-synthesis" ] - cflags_objcc = [ "-Wobjc-missing-property-synthesis" ] + if (is_apple) { + cflags_objc = [ "-Wimplicit-retain-self" ] + cflags_objcc = [ "-Wimplicit-retain-self" ] } - if (is_ios) { - cflags_objc = [ "-Wimplicit-retain-self" ] - cflags_objcc = cflags_objc + if (is_mac) { + cflags_objc += [ "-Wobjc-missing-property-synthesis" ] + cflags_objcc += [ "-Wobjc-missing-property-synthesis" ] } } @@ -2532,6 +2541,7 @@ config("win_pdbaltpath") { # Full symbols. config("symbols") { + rustflags = [] if (is_win) { if (is_clang) { cflags = [ @@ -2570,11 +2580,13 @@ config("symbols") { if (!is_nacl && current_os != "aix") { if (use_dwarf5) { cflags += [ "-gdwarf-5" ] + rustflags += [ "-Zdwarf-version=5" ] } else if (!is_apple) { # Recent clang versions default to DWARF5 on Linux, and Android is about # to switch. TODO: Adopt that in controlled way. # Apple platforms still default to 4, so the flag is not needed there. cflags += [ "-gdwarf-4" ] + rustflags += [ "-Zdwarf-version=4" ] } } @@ -2665,7 +2677,7 @@ config("symbols") { ] } } - rustflags = [ "-g", "-Copt-level=3", "-Ctarget-feature=+sse3", ] + rustflags += [ "-g", "-Copt-level=3", "-Ctarget-feature=+sse3", ] } # Minimal symbols. diff --git a/other/SSE3/build/config/win/BUILD.gn b/other/SSE3/build/config/win/BUILD.gn index 19fc860d..10e0c1f8 100644 --- a/other/SSE3/build/config/win/BUILD.gn +++ b/other/SSE3/build/config/win/BUILD.gn @@ -11,6 +11,7 @@ import("//build/config/win/control_flow_guard.gni") import("//build/config/win/visual_studio_version.gni") import("//build/timestamp.gni") import("//build/toolchain/goma.gni") +import("//build/toolchain/rbe.gni") import("//build/toolchain/toolchain.gni") assert(is_win) @@ -41,9 +42,6 @@ declare_args() { # and with this switch, clang emits it like this: # foo/bar.cc:12:34: error: something went wrong use_clang_diagnostics_format = false - - # Indicates whether to use /pdbpagesize:8192 to allow PDBs larger than 4 GiB. - use_large_pdbs = true } # This is included by reference in the //build/config/compiler config that @@ -140,13 +138,13 @@ config("compiler") { ] } - if (exec_script("//build/win/use_ansi_codes.py", [], "trim string") == + # Enable ANSI escape codes if something emulating them is around (cmd.exe + # doesn't understand ANSI escape codes by default). Make sure to not enable + # this if goma/remoteexec is in use, because this will lower cache hits. + if (!use_goma && !use_remoteexec && + exec_script("//build/win/use_ansi_codes.py", [], "trim string") == "True") { - cflags += [ - # cmd.exe doesn't understand ANSI escape codes by default, - # so only enable them if something emulating them is around. - "-fansi-escape-codes", - ] + cflags += [ "-fansi-escape-codes" ] } if (use_clang_diagnostics_format) { @@ -180,14 +178,14 @@ config("compiler") { ldflags += [ "/opt:lldlto=3", ] } - if (use_large_pdbs) { - # This allows PDBs up to 8 GiB in size. This requires lld-link.exe or - # link.exe from VS 2022 or later. - if (!defined(configs)) { - configs = [] - } - configs += [ ":pdb_larger_than_4gb" ] - } + # Some binaries create PDBs larger than 4 GiB. Increasing the PDB page size + # to 8 KiB allows 8 GiB PDBs. The larger page size also allows larger block maps + # which is a PDB limit that was hit in https://crbug.com/1406510. The page size + # can easily be increased in the future to allow even larger PDBs or larger + # 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" ] if (!is_debug && !is_component_build) { # Enable standard linker optimizations like GC (/OPT:REF) and ICF in static @@ -343,17 +341,26 @@ config("common_linker_setup") { } } +# Flags that should be applied to building .exe files but not .dll files. +config("exe_flags") { + rustflags = [ "-Ctarget-feature=+crt-static" ] +} + config("default_cfg_compiler") { # Emit table of address-taken functions for Control-Flow Guard (CFG). # This is needed to allow functions to be called by code that is built # with CFG enabled, such as system libraries. # The CFG guards are only emitted if |win_enable_cfg_guards| is enabled. - if (is_clang) { - if (win_enable_cfg_guards) { + if (win_enable_cfg_guards) { + if (is_clang) { cflags = [ "/guard:cf" ] - } else { + } + rustflags = [ "-Ccontrol-flow-guard" ] + } else { + if (is_clang) { cflags = [ "/guard:cf,nochecks" ] } + rustflags = [ "-Ccontrol-flow-guard=nochecks" ] } } @@ -366,6 +373,7 @@ config("disable_guards_cfg_compiler") { if (is_clang) { cflags = [ "/guard:cf,nochecks" ] } + rustflags = [ "-Ccontrol-flow-guard=nochecks" ] } config("cfi_linker") { @@ -609,15 +617,3 @@ config("lean_and_mean") { config("nominmax") { defines = [ "NOMINMAX" ] } - -# Some binaries create PDBs larger than 4 GiB. Increasing the PDB page size -# to 8 KiB allows 8 GiB PDBs. The larger page size also allows larger block maps -# which is a PDB limit that was hit in https://crbug.com/1406510. The page size -# can easily be increased in the future to allow even larger PDBs or larger -# block maps. -config("pdb_larger_than_4gb") { - if (!defined(ldflags)) { - ldflags = [] - } - ldflags += [ "/pdbpagesize:8192" ] -} diff --git a/src/build/config/compiler/BUILD.gn b/src/build/config/compiler/BUILD.gn index 31fbbaff..27a1db6d 100644 --- a/src/build/config/compiler/BUILD.gn +++ b/src/build/config/compiler/BUILD.gn @@ -685,6 +685,7 @@ config("compiler") { "-mllvm:-import-instr-limit=$import_instr_limit", "-mllvm:-import-hot-multiplier=15", "-mllvm:-import-cold-multiplier=4", + "-mllvm:-disable-auto-upgrade-debug-info", # "/lldltocache:" + # rebase_path("$root_out_dir/thinlto-cache", root_build_dir), # "/lldltocachepolicy:$cache_policy", @@ -727,6 +728,14 @@ config("compiler") { } ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ] + + if (!is_chromeos) { + # TODO(https://crbug.com/972449): turn on for ChromeOS when that + # toolchain has this flag. + # We only use one version of LLVM within a build so there's no need to + # upgrade debug info, which can be expensive since it runs the verifier. + ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ] + } } # TODO(https://crbug.com/1211155): investigate why this isn't effective on @@ -933,7 +942,7 @@ config("thinlto_optimize_default") { ## ldflags += [ "-Wl,--lto-CGO" + lto_opt_level ] } - rustflags = [ "-Clto=thin" ] + rustflags = [ "-Clinker-plugin-lto=yes" ] } } @@ -961,7 +970,7 @@ config("thinlto_optimize_max") { ## ldflags += [ "-Wl,--lto-CGO" + lto_opt_level ] } - rustflags = [ "-Clto=thin" ] + rustflags = [ "-Clinker-plugin-lto=yes" ] } } @@ -1769,14 +1778,14 @@ config("chromium_code") { defines += [ "_FORTIFY_SOURCE=2" ] } - if (is_mac) { - cflags_objc = [ "-Wobjc-missing-property-synthesis" ] - cflags_objcc = [ "-Wobjc-missing-property-synthesis" ] + if (is_apple) { + cflags_objc = [ "-Wimplicit-retain-self" ] + cflags_objcc = [ "-Wimplicit-retain-self" ] } - if (is_ios) { - cflags_objc = [ "-Wimplicit-retain-self" ] - cflags_objcc = cflags_objc + if (is_mac) { + cflags_objc += [ "-Wobjc-missing-property-synthesis" ] + cflags_objcc += [ "-Wobjc-missing-property-synthesis" ] } } @@ -2529,6 +2538,7 @@ config("win_pdbaltpath") { # Full symbols. config("symbols") { + rustflags = [] if (is_win) { if (is_clang) { cflags = [ @@ -2567,11 +2577,13 @@ config("symbols") { if (!is_nacl && current_os != "aix") { if (use_dwarf5) { cflags += [ "-gdwarf-5" ] + rustflags += [ "-Zdwarf-version=5" ] } else if (!is_apple) { # Recent clang versions default to DWARF5 on Linux, and Android is about # to switch. TODO: Adopt that in controlled way. # Apple platforms still default to 4, so the flag is not needed there. cflags += [ "-gdwarf-4" ] + rustflags += [ "-Zdwarf-version=4" ] } } @@ -2662,7 +2674,7 @@ config("symbols") { ] } } - rustflags = [ "-g", "-Copt-level=3", "-Ctarget-feature=+aes,+avx,-pclmul", ] + rustflags += [ "-g", "-Copt-level=3", "-Ctarget-feature=+aes,+avx,-pclmul", ] } # Minimal symbols. diff --git a/src/build/config/mac/BUILD.gn b/src/build/config/mac/BUILD.gn index 3b8c04ba..2f3d1f53 100644 --- a/src/build/config/mac/BUILD.gn +++ b/src/build/config/mac/BUILD.gn @@ -49,11 +49,11 @@ config("compiler") { ldflags = [ "-Wl,-O3", ] + common_mac_flags if (target_cpu == "x64") { - cflags += [ "-maes", "-mavx", "-mavx2", "-ffp-contract=fast", "-mf16c", "-mfma", "-Wno-unused-command-line-argument", ] + cflags += [ "-maes", "-mavx", "-ffp-contract=fast", "-mf16c", "-mfma", "-Wno-unused-command-line-argument", ] } if (current_cpu == "x64") { - cflags += [ "-maes", "-mavx", "-mavx2", "-ffp-contract=fast", "-mf16c", "-mfma", "-Wno-unused-command-line-argument", ] + cflags += [ "-maes", "-mavx", "-ffp-contract=fast", "-mf16c", "-mfma", "-Wno-unused-command-line-argument", ] } if (save_unstripped_output) { diff --git a/src/build/config/win/BUILD.gn b/src/build/config/win/BUILD.gn index 2897ee03..4be9a770 100644 --- a/src/build/config/win/BUILD.gn +++ b/src/build/config/win/BUILD.gn @@ -11,6 +11,7 @@ import("//build/config/win/control_flow_guard.gni") import("//build/config/win/visual_studio_version.gni") import("//build/timestamp.gni") import("//build/toolchain/goma.gni") +import("//build/toolchain/rbe.gni") import("//build/toolchain/toolchain.gni") assert(is_win) @@ -41,9 +42,6 @@ declare_args() { # and with this switch, clang emits it like this: # foo/bar.cc:12:34: error: something went wrong use_clang_diagnostics_format = false - - # Indicates whether to use /pdbpagesize:8192 to allow PDBs larger than 4 GiB. - use_large_pdbs = true } # This is included by reference in the //build/config/compiler config that @@ -143,13 +141,13 @@ config("compiler") { ] } - if (exec_script("//build/win/use_ansi_codes.py", [], "trim string") == + # Enable ANSI escape codes if something emulating them is around (cmd.exe + # doesn't understand ANSI escape codes by default). Make sure to not enable + # this if goma/remoteexec is in use, because this will lower cache hits. + if (!use_goma && !use_remoteexec && + exec_script("//build/win/use_ansi_codes.py", [], "trim string") == "True") { - cflags += [ - # cmd.exe doesn't understand ANSI escape codes by default, - # so only enable them if something emulating them is around. - "-fansi-escape-codes", - ] + cflags += [ "-fansi-escape-codes" ] } if (use_clang_diagnostics_format) { @@ -183,14 +181,14 @@ config("compiler") { ldflags += [ "/opt:lldlto=3", ] } - if (use_large_pdbs) { - # This allows PDBs up to 8 GiB in size. This requires lld-link.exe or - # link.exe from VS 2022 or later. - if (!defined(configs)) { - configs = [] - } - configs += [ ":pdb_larger_than_4gb" ] - } + # Some binaries create PDBs larger than 4 GiB. Increasing the PDB page size + # to 8 KiB allows 8 GiB PDBs. The larger page size also allows larger block maps + # which is a PDB limit that was hit in https://crbug.com/1406510. The page size + # can easily be increased in the future to allow even larger PDBs or larger + # 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" ] if (!is_debug && !is_component_build) { # Enable standard linker optimizations like GC (/OPT:REF) and ICF in static @@ -346,17 +344,26 @@ config("common_linker_setup") { } } +# Flags that should be applied to building .exe files but not .dll files. +config("exe_flags") { + rustflags = [ "-Ctarget-feature=+crt-static" ] +} + config("default_cfg_compiler") { # Emit table of address-taken functions for Control-Flow Guard (CFG). # This is needed to allow functions to be called by code that is built # with CFG enabled, such as system libraries. # The CFG guards are only emitted if |win_enable_cfg_guards| is enabled. - if (is_clang) { - if (win_enable_cfg_guards) { + if (win_enable_cfg_guards) { + if (is_clang) { cflags = [ "/guard:cf" ] - } else { + } + rustflags = [ "-Ccontrol-flow-guard" ] + } else { + if (is_clang) { cflags = [ "/guard:cf,nochecks" ] } + rustflags = [ "-Ccontrol-flow-guard=nochecks" ] } } @@ -369,6 +376,7 @@ config("disable_guards_cfg_compiler") { if (is_clang) { cflags = [ "/guard:cf,nochecks" ] } + rustflags = [ "-Ccontrol-flow-guard=nochecks" ] } config("cfi_linker") { @@ -612,15 +620,3 @@ config("lean_and_mean") { config("nominmax") { defines = [ "NOMINMAX" ] } - -# Some binaries create PDBs larger than 4 GiB. Increasing the PDB page size -# to 8 KiB allows 8 GiB PDBs. The larger page size also allows larger block maps -# which is a PDB limit that was hit in https://crbug.com/1406510. The page size -# can easily be increased in the future to allow even larger PDBs or larger -# block maps. -config("pdb_larger_than_4gb") { - if (!defined(ldflags)) { - ldflags = [] - } - ldflags += [ "/pdbpagesize:8192" ] -} diff --git a/src/chrome/app/chromium_strings.grd b/src/chrome/app/chromium_strings.grd index 45cc47ce..277ca022 100644 --- a/src/chrome/app/chromium_strings.grd +++ b/src/chrome/app/chromium_strings.grd @@ -567,6 +567,9 @@ Permissions you've already given to websites and apps may apply to this account. Thorium wants to export your passwords. Type your Windows password to allow this. + + Thorium is trying to replace existing passwords. Type your Windows password to allow this. + This computer already has a more recent version of Thorium. If the software is not working, please uninstall Thorium and try again. @@ -810,6 +813,12 @@ Permissions you've already given to websites and apps may apply to this account. + + + Not used in Thorium. Placeholder to keep resource maps in sync. + + + Thorium @@ -822,6 +831,10 @@ Permissions you've already given to websites and apps may apply to this account. + + Password Manager + + Thorium @@ -997,10 +1010,17 @@ Permissions you've already given to websites and apps may apply to this account. - + {NUM_DEVICES, plural, - =1 {Thorium is connected to a HID device} - other {Thorium is connected to HID devices}} + =0 {A Thorium extension was accessing HID devices} + =1 {A Thorium extension is accessing 1 HID device} + other {A Thorium extension is accessing # HID devices}} + + + {NUM_DEVICES, plural, + =0 {Thorium extensions were accessing HID devices} + =1 {Thorium extensions are accessing HID devices} + other {Thorium extensions are accessing # HID devices}} @@ -1151,6 +1171,15 @@ Permissions you've already given to websites and apps may apply to this account. + + + Not used in Thorium. Placeholder to keep resource maps in sync. + + + Not used in Thorium. Placeholder to keep resource maps in sync. + + + Reinstall Thorium @@ -1482,6 +1511,9 @@ Permissions you've already given to websites and apps may apply to this account. $1CTRL+SHIFT+M can switch between Thorium profiles + + You can switch to see passwords from another Thorium profile + @@ -1511,6 +1543,9 @@ Permissions you've already given to websites and apps may apply to this account. Enhanced protection does more to block phishing and malware + + Enhanced Safe Browsing does more to protect you against dangerous websites and downloads + Continue @@ -1662,16 +1697,6 @@ Permissions you've already given to websites and apps may apply to this account. - - - Memory Saver Made Thorium Faster - - - - - Memory Saver made Thorium faster - - Make Thorium Faster diff --git a/src/chrome/app/generated_resources.grd b/src/chrome/app/generated_resources.grd index a973cb02..808647a0 100644 --- a/src/chrome/app/generated_resources.grd +++ b/src/chrome/app/generated_resources.grd @@ -620,7 +620,7 @@ are declared in tools/grit/grit_rule.gni. Open link in new $1Gmail App window - Open link in new $1Gmail App tab + Open link in new $1Gmail App tab @@ -889,7 +889,7 @@ are declared in tools/grit/grit_rule.gni. Open Link in new $1Gmail App Window - Open Link in new $1Gmail App Tab + Open Link in new $1Gmail App Tab @@ -1057,7 +1057,7 @@ are declared in tools/grit/grit_rule.gni. Select &All - &Translate to $1English + &Translate Selection to $1English &Search $1Google for “$2flowers” @@ -1141,6 +1141,12 @@ are declared in tools/grit/grit_rule.gni. + + &Addresses and more + + + &Autofill and passwords + New &tab @@ -1177,6 +1183,15 @@ are declared in tools/grit/grit_rule.gni. &Find... + + &Find and edit + + + &Google Password Manager + + + &Payment methods + Save page &as... @@ -1227,6 +1242,12 @@ are declared in tools/grit/grit_rule.gni. + + &Addresses and More + + + &Autofill and Passwords + New &Tab @@ -1263,6 +1284,15 @@ are declared in tools/grit/grit_rule.gni. &Find... + + &Find and Edit + + + &Google Password Manager + + + &Payment Methods + Save Page &As... @@ -2928,6 +2958,15 @@ are declared in tools/grit/grit_rule.gni. desc="Accessibility label for retry button."> Retry $1bla.exe + + Don't show when downloads are done + + + You can change this anytime in $1settings + + + settings + - - Reload page to use this extension + + To apply your updated settings to this site, reload this page Reload - Reload the page to use "$1Gmail Checker" + To apply your updated settings for "$1Gmail Checker" to this site, reload this page - Reload the page to use these extensions - - - Reload the page to apply your changes + To apply your updated settings to this site for these extensions, reload this page @@ -4737,13 +4773,10 @@ are declared in tools/grit/grit_rule.gni. Read your browsing history - + Read your browsing history on all your signed-in devices - - Read and change your browsing history - - + Read and change your browsing history on all your signed-in devices @@ -4986,9 +5019,15 @@ are declared in tools/grit/grit_rule.gni. Add remote apps to the ThoriumOS launcher + + Read attached devices information and data + Run ThoriumOS Flex diagnostic tests + + Subscribe to ThoriumOS Flex system events + Read ThoriumOS Flex device information and device data @@ -5000,9 +5039,15 @@ are declared in tools/grit/grit_rule.gni. + + Read attached devices information and data + Run ThoriumOS diagnostic tests + + Subscribe to ThoriumOS system events + Read ThoriumOS device information and device data @@ -5820,6 +5865,12 @@ Keep your key file in a safe place. You will need it to create new versions of y Requests access + + + Allowed to request access + + + Not allowed to request access Manage this extension @@ -5833,6 +5884,27 @@ Keep your key file in a safe place. You will need it to create new versions of y Not allowed to show requests + + Site Permissions + + + Ask on every visit + + + Always on $1google.com + + + Always on all sites + + + Runs only after you click the extension + + + Runs automatically every time you visit this site + + + Runs automatically on all sites you visit + @@ -5951,18 +6023,10 @@ Keep your key file in a safe place. You will need it to create new versions of y Open in window - - Enable opening app in window - - Launch at startup - - Enable launching app at startup - - Create shortcut @@ -7097,6 +7161,18 @@ Keep your key file in a safe place. You will need it to create new versions of y your carts + + In your cart + + + $12 items in your cart $215% off from $3Amazon, $4amazon.com, viewed $53 days ago + + + 1 item in your cart $115% off from $2Amazon, $3amazon.com, viewed $43 days ago + + + Items in your cart $115% off from $2Amazon, $3amazon.com, viewed $43 days ago + You’re seeing carts that help you easily get back to items you left in shopping carts across the web. <br> @@ -7455,6 +7531,30 @@ Keep your key file in a safe place. You will need it to create new versions of y Delete + + + + &Reading list + + + Add tab to reading list + + + Show reading list + + + + + &Reading List + + + Add Tab to Reading List + + + Show Reading List + + + Side Panel Resize Handle @@ -7462,12 +7562,18 @@ Keep your key file in a safe place. You will need it to create new versions of y Side Panel Selector + + Google + Customize Thorium - - Unpin - + + Unpin + + + Pin + @@ -7482,15 +7588,27 @@ Keep your key file in a safe place. You will need it to create new versions of y Newest + + newest + Oldest + + oldest + A to Z Z to A + + Last opened + + + last opened + Visual view @@ -7503,6 +7621,9 @@ Keep your key file in a safe place. You will need it to create new versions of y Create New Folder + + New folder + Edit Bookmark List @@ -7518,6 +7639,12 @@ Keep your key file in a safe place. You will need it to create new versions of y Bookmarks are unavailable in guest mode + + No results found + + + There are no bookmarks that match your search. + {NUM_BOOKMARKS, plural, =1 {1 bookmark} other {# bookmarks}} @@ -7525,7 +7652,7 @@ Keep your key file in a safe place. You will need it to create new versions of y Edit Bookmark - Move to another folder + Move More @@ -7575,6 +7702,9 @@ Keep your key file in a safe place. You will need it to create new versions of y Back to $1All Bookmarks + + Back + $1All Bookmarks folder @@ -7922,17 +8052,11 @@ Keep your key file in a safe place. You will need it to create new versions of y Select an app on your $1Thoriumbook to open this link - - Open websites in apps installed on your $1Thoriumbook - Select an app on your device to open this link - - Open websites in apps installed on your device - @@ -8080,6 +8204,12 @@ Keep your key file in a safe place. You will need it to create new versions of y + + To go back more than 1 page, click and hold Back. + + + To go back more than 1 page, click and hold the Back button. + Bookmark this page to easily find it later @@ -8178,12 +8308,6 @@ Keep your key file in a safe place. You will need it to create new versions of y Settings - - While this tab was inactive, Memory Saver freed up memory for other tasks. You can change this anytime in settings. - - - Settings - Memory Saver frees up memory from inactive tabs so it can be used by active tabs and other apps. @@ -8501,9 +8625,6 @@ Check your passwords anytime in $1Google Google Password Manager couldn't save these passwords in your Google Account. You can save them to this device. - - You can choose the profile that you want to see the passwords from - @@ -8737,6 +8858,8 @@ Check your passwords anytime in $1Google Send <a href="#" id="autofill-metadata-url">autofill metadata</a> + <br> + (your autofill data won't be shared) <Four files generated by Intel Wi-Fi firmware: csr.lst, fh_regs.lst, radio_reg.lst, monitor.lst.sysmon. The first three are binary files containing register dumps, and are asserted by Intel to contain no personal or device-identifying information. The last file is an execution trace from the Intel firmware; it has been scrubbed of any personal or device-identifying information, but is too large to display here. These files were generated in response to recent Wi-Fi problems with your device, and will be shared with Intel to help troubleshoot these problems.> @@ -9387,6 +9510,17 @@ Check your passwords anytime in $1Google Update + + + Finish update + + + Relaunch to update + + + New Thorium available + + Error @@ -11967,10 +12101,10 @@ Please help our engineers fix this problem. Tell us what happened right before y Turn on "Google Thorium" in Location Services on your Mac - + + Location turned off - @@ -12503,6 +12637,9 @@ Please help our engineers fix this problem. Tell us what happened right before y Choose what to share + + Choose what to share with $1 + Share your entire screen @@ -12512,6 +12649,9 @@ Please help our engineers fix this problem. Tell us what happened right before y $1Google Hangouts wants to share the contents of your screen. + + The site will be able to see the contents of your screen + $1Google Hangouts wants to share the contents of your screen with $2https://google.com. @@ -12876,19 +13016,31 @@ Please help our engineers fix this problem. Tell us what happened right before y - - - An extension is using a HID device + + + HID settings - - Click to manage permissions for "$1Google Translate" - - - Manage HID devices - - - Manage HID devices for $1Nina@gmail.com + + About HID devices + + + + {NUM_EXTENSION, plural, + =1 {{1}Google Translate is accessing HID devices} + =2 {Extensions accessing devices: {1}Google Translate, {2}Secure Shell} + other {Extensions accessing devices: {1}Google Translate, {2}Secure Shell +{3} more}} + + + + + {NUM_CONNECTION, plural, + =0 {Extension "{1}Google Translate" was accessing devices} + =1 {Extension "{1}Google Translate" is accessing {0} device} + other {Extension "{1}Google Translate" is accessing {0} devices}} + + + @@ -12931,9 +13083,6 @@ Please help our engineers fix this problem. Tell us what happened right before y - - "$1Thorium Extension Name" wants to pair - $1Turn on Bluetooth to allow pairing @@ -12962,9 +13111,6 @@ Please help our engineers fix this problem. Tell us what happened right before y $1device name - Paired - - "$1Thorium Extension Name" wants to connect - Compatible devices @@ -12996,12 +13142,9 @@ Please help our engineers fix this problem. Tell us what happened right before y - + $1www.google.com wants to connect to a serial port - - "$1Thorium Extension Name" wants to connect to a serial port - $1Virtual COM Port ($2COM1) @@ -13036,12 +13179,9 @@ Please help our engineers fix this problem. Tell us what happened right before y - + $1www.google.com wants to connect to a HID device - - "$1Thorium Extension Name" wants to connect to a HID device - Unknown Device ($11234:abcd) @@ -14105,6 +14245,9 @@ Please help our engineers fix this problem. Tell us what happened right before y Also turn on Enhanced Safe Browsing for this Thorium profile? + + Thorium’s strongest security does more to protect you against dangerous websites, downloads, and extensions + Turn on @@ -14119,12 +14262,18 @@ Please help our engineers fix this problem. Tell us what happened right before y You’re on Thorium’s strongest security + + You have Thorium’s strongest security against harmful websites + Enhanced Safe Browsing is off You’re getting standard protection + + You’re getting standard security protection for this Thorium profile + OK @@ -14348,6 +14497,9 @@ Please help our engineers fix this problem. Tell us what happened right before y Enhanced protection does more to block phishing and malware + + Enhanced Safe Browsing does more to protect you against dangerous websites, downloads, and extensions + Continue @@ -14390,9 +14542,12 @@ Please help our engineers fix this problem. Tell us what happened right before y To continue, $1idp.com will share your name, email address, and profile picture with this site. See this site's $2privacy policy$3 and $4terms of service$5. - + Failed signing in to $1rp.example with $2idp.example + + Continue + Sign in to $1rp.example @@ -14606,6 +14761,16 @@ Please help our engineers fix this problem. Tell us what happened right before y Tab active again + + + $1300 MB Saved + + + + + $1300 MB saved + + While this tab was inactive, Memory Saver freed up memory for other tasks. You can change this anytime in $1Settings. diff --git a/src/chrome/app/settings_chromium_strings.grdp b/src/chrome/app/settings_chromium_strings.grdp index d3dc46ca..11afb7df 100644 --- a/src/chrome/app/settings_chromium_strings.grdp +++ b/src/chrome/app/settings_chromium_strings.grdp @@ -12,12 +12,6 @@ About Thorium - - Get the most ouf of Thorium - - - This guide helps you understand your choices, so that Thorium works the way you want to - Get help with Thorium diff --git a/src/chrome/app/settings_strings.grdp b/src/chrome/app/settings_strings.grdp index dceb7f54..18c148bb 100644 --- a/src/chrome/app/settings_strings.grdp +++ b/src/chrome/app/settings_strings.grdp @@ -51,6 +51,24 @@ Send feedback + + Get the most ouf of Thorium + + + This guide helps you understand your choices, so that Thorium works the way you want to + + + This guide helps you understand important choices you have as you use Thorium. And it helps you make those choices, so that Thorium works the way you want it to. + + + More than a browser + + + Your data in Thorium + + + Beyond cookies + @@ -83,6 +101,18 @@ If an image doesn’t have a useful description, Thorium will try to provide one for you. To create descriptions, images are sent to Google. + + Text recognition files downloaded + + + Can't download text recognition files. Try again later. + + + Downloading text recognition files… $117% + + + Downloading text recognition files + Convert images to text @@ -92,6 +122,12 @@ Live Caption + + Live Translate + + + Automatically translate captions to a target language. + Automatically creates captions for media in Thorium browser (currently available in English). Audio and captions are processed locally and never leave the device. @@ -322,8 +358,11 @@ export passwords - - Autofill + + Autofill and passwords + + + replace existing passwords Google Pay @@ -370,9 +409,6 @@ Edit in Google Pay - - Virtual card available - (Virtual card enabled) @@ -1459,6 +1495,9 @@ Open certain file types automatically after downloading + + Show downloads when they're done + @@ -1566,6 +1605,9 @@ Add languages + + No languages added + Show language options @@ -1591,9 +1633,6 @@ Your administrator has set a default language which cannot be modified. - - No languages added - Add $1Swahili @@ -1774,17 +1813,20 @@ When on - - Browsing is faster because a site is less likely to ask you to verify you're a real person + + A site you visit can save a small amount of info with Thorium, mainly to validate you're not a bot - - This setting works without identifying you or allowing sites to see your browsing history + + As you keep browsing, sites can check with Thorium and verify with a previous site you've visited that you're likely a real person + + + Browsing is faster because a site is less likely to ask you to verify you're a real person Things to consider - - A site you visit can save info with Thorium that validates you're not a bot. As you keep browsing, sites can check with Thorium and verify with a previous site you've visited that you're likely a real person + + This setting works without identifying you or allowing sites to see your browsing history, though sites can share a small amount of info as part of the verification @@ -1988,7 +2030,7 @@ Sites - You can block sites you don't want. Thorium also auto-deletes sites from the list that are older than 4 weeks. + You can block sites you don't want. Thorium also auto-deletes sites from the list that are older than 30 days. Learn more @@ -2042,7 +2084,7 @@ For example, if you visit a site that sells long-distance running shoes, the site might decide that you're interested in running marathons. Later, if you visit a different site, that site can show you an ad for running shoes suggested by the first site. - Thorium auto-deletes sites that are older than 4 weeks. A site you visit again might reappear on the list. Or you can block a site from suggesting ads for you. + Thorium auto-deletes sites that are older than 30 days. A site you visit again might reappear on the list. Or you can block a site from suggesting ads for you. Learn more about site-suggested ads @@ -2891,6 +2933,9 @@ Edit + + Remove grant + View @@ -4082,6 +4127,18 @@ No HID devices found + + Reset all Bluetooth device permissions? + + + Reset all HID device permissions? + + + Reset all Serial port permisions? + + + Reset all USB device permissions? + Add a site diff --git a/src/chrome/app/shared_settings_strings.grdp b/src/chrome/app/shared_settings_strings.grdp index 8618eb7a..8ccabece 100644 --- a/src/chrome/app/shared_settings_strings.grdp +++ b/src/chrome/app/shared_settings_strings.grdp @@ -95,6 +95,18 @@ Default + + Caption language + + + Manage languages + + + Translate to + + + Remove $1English + @@ -346,6 +358,22 @@ Review your synced data + + + Manage device sync + + + + Manage browser sync + + + + Across your apps and Thorium browser + + + + Manage Thorium browser sync + Sync and Google services