From bbc35b682f0fb926364e5800d20f77bba944a020 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Wed, 6 Dec 2023 12:06:36 +0100 Subject: [PATCH] Remove thinlto servobuild.config option (#30830) Rust uses a version of ThinLTO by default now [1]. This can be tweaked by adjusting rust compiler flags, which is probably a better way of controlling this than a custom servo configuration considering: 1. We want to remove the custom servo configuration eventually. 2. The -Z option that this configuration currently uses is unsupported by stable rust. 1. https://blog.rust-lang.org/inside-rust/2020/06/29/lto-improvements.html --- python/servo/command_base.py | 4 ---- servobuild.example | 3 --- 2 files changed, 7 deletions(-) diff --git a/python/servo/command_base.py b/python/servo/command_base.py index f1d5e97974b..1193fedf540 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -302,7 +302,6 @@ class CommandBase(object): self.config["build"].setdefault("ccache", "") self.config["build"].setdefault("rustflags", "") self.config["build"].setdefault("incremental", None) - self.config["build"].setdefault("thinlto", False) self.config["build"].setdefault("webgl-backtrace", False) self.config["build"].setdefault("dom-backtrace", False) @@ -542,9 +541,6 @@ class CommandBase(object): env["CARGO_TARGET_DIR"] = servo.util.get_target_dir() - if self.config["build"]["thinlto"]: - env['RUSTFLAGS'] += " -Z thinlto" - # Work around https://github.com/servo/servo/issues/24446 # Argument-less str.split normalizes leading, trailing, and double spaces env['RUSTFLAGS'] = " ".join(env['RUSTFLAGS'].split()) diff --git a/servobuild.example b/servobuild.example index 3e0897a845c..1c63d91d4b0 100644 --- a/servobuild.example +++ b/servobuild.example @@ -54,9 +54,6 @@ media-stack = "auto" #incremental = false #incremental = true -# Whether to use ThinLTO or not -#thinlto = false - # Android information [android] # Defaults to the value of $ANDROID_SDK, $ANDROID_NDK, $ANDROID_TOOLCHAIN, $ANDROID_PLATFORM respectively