From 99ba813e25823183fcee54287303bb95137010b2 Mon Sep 17 00:00:00 2001 From: Lukas Tenbrink Date: Sun, 22 Sep 2024 11:54:16 +0200 Subject: [PATCH] sys.exit -> env.Exit. --- tools/common_compiler_flags.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/common_compiler_flags.py b/tools/common_compiler_flags.py index d6b667afdb..e645f390f1 100644 --- a/tools/common_compiler_flags.py +++ b/tools/common_compiler_flags.py @@ -1,6 +1,5 @@ import os import subprocess -import sys def using_clang(env): @@ -73,7 +72,7 @@ def generate(env): if env["lto"] == "thin": if not env["use_llvm"]: print("ThinLTO is only compatible with LLVM, use `use_llvm=yes` or `lto=full`.") - sys.exit(255) + env.Exit(255) env.Append(CCFLAGS=["-flto=thin"]) env.Append(LINKFLAGS=["-flto=thin"]) @@ -116,7 +115,7 @@ def generate(env): if env["lto"] == "thin": if (env["platform"] == "windows" or env["platform"] == "linux") and not env["use_llvm"]: print("ThinLTO is only compatible with LLVM, use `use_llvm=yes` or `lto=full`.") - sys.exit(255) + env.Exit(255) env.Append(CCFLAGS=["-flto=thin"]) env.Append(LINKFLAGS=["-flto=thin"]) elif env["lto"] == "full":