Skip to content

Commit

Permalink
sys.exit -> env.Exit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivorforce committed Sep 22, 2024
1 parent ce8a8e9 commit 99ba813
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tools/common_compiler_flags.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os
import subprocess
import sys


def using_clang(env):
Expand Down Expand Up @@ -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"])
Expand Down Expand Up @@ -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":
Expand Down

0 comments on commit 99ba813

Please sign in to comment.