This commit is contained in:
Oleg Korshul
2025-12-21 20:51:38 +03:00
parent 055ff85f68
commit e48534d14c
3 changed files with 4 additions and 4 deletions

View File

@ -1902,8 +1902,8 @@ def set_sysroot_env(platform):
if path != "":
os.environ['PATH'] = path + "/usr/bin:" + get_env("PATH")
os.environ['LD_LIBRARY_PATH'] = config.get_custom_sysroot_lib(platform)
os.environ['CC'] = config.get_custom_sysroot_bin() + "/gcc"
os.environ['CXX'] = config.get_custom_sysroot_bin() + "/g++"
os.environ['CC'] = config.get_custom_sysroot_bin(platform) + "/gcc"
os.environ['CXX'] = config.get_custom_sysroot_bin(platform) + "/g++"
os.environ['CFLAGS'] = "--sysroot=" + path
os.environ['CXXFLAGS'] = "--sysroot=" + path
check_python()

View File

@ -16,7 +16,7 @@ def make(src_dir, modules, build_platform="android", qmake_addon=""):
# for b2 checks
if config.option("sysroot") != "":
base.set_sysroot_env()
base.set_sysroot_env(build_platform)
sysroot_path = config.option("sysroot_" + build_platform)
b2_addon = "cflags=\"--sysroot=" + sysroot_path + "\""
b2_addon = "cxxflags=\"--sysroot=" + sysroot_path + "\""

View File

@ -246,7 +246,7 @@ def make():
base.replaceInFile("build/toolchain/linux/BUILD.gn", src_replace, dst_replace)
old_env = dict(os.environ)
base.set_sysroot_env()
base.set_sysroot_env("linux_64")
base.cmd2("gn", ["gen", "out.gn/linux_64", make_args(gn_args, "linux")], False)
base.cmd2("ninja", ["-C", "out.gn/linux_64"], False)
base.restore_sysroot_env()