mirror of
https://github.com/ONLYOFFICE/build_tools.git
synced 2026-02-10 12:35:23 +08:00
Refactoring sysroots
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@ -15,6 +15,3 @@ tests/puppeteer/package.json
|
||||
tests/puppeteer/package-lock.json
|
||||
scripts/sdkjs_common/jsdoc/node_modules
|
||||
scripts/sdkjs_common/jsdoc/package-lock.json
|
||||
tools/linux/python3/
|
||||
tools/linux/python3.tar.gz
|
||||
tools/linux/sysroot/sysroot_ubuntu_1604
|
||||
|
||||
@ -691,18 +691,19 @@ def git_dir():
|
||||
if ("windows" == host_platform()):
|
||||
return run_command("git --info-path")['stdout'] + "/../../.."
|
||||
|
||||
def get_prefix_cross_compiler_arm64():
|
||||
def get_prefix_cross_compiler_arm64(dir):
|
||||
cross_compiler_arm64 = config.option("arm64-toolchain-bin")
|
||||
if is_file(cross_compiler_arm64 + "/aarch64-linux-gnu-g++") and is_file(cross_compiler_arm64 + "/aarch64-linux-gnu-gcc"):
|
||||
if is_file(dir + "/aarch64-linux-gnu-g++") and is_file(dir + "/aarch64-linux-gnu-gcc"):
|
||||
return "aarch64-linux-gnu-"
|
||||
if is_file(cross_compiler_arm64 + "/aarch64-unknown-linux-gnu-g++") and is_file(cross_compiler_arm64 + "/aarch64-unknown-linux-gnu-gcc"):
|
||||
if is_file(dir + "/aarch64-unknown-linux-gnu-g++") and is_file(dir + "/aarch64-unknown-linux-gnu-gcc"):
|
||||
return "aarch64-unknown-linux-gnu-"
|
||||
return ""
|
||||
|
||||
def get_gcc_version():
|
||||
gcc_path = "gcc"
|
||||
# if use sysroot - fix gcc version
|
||||
if config.option("sysroot") != "":
|
||||
gcc_path = config.option("sysroot") + "/usr/bin/gcc"
|
||||
return 5004
|
||||
gcc_path = "gcc"
|
||||
gcc_version_major = 4
|
||||
gcc_version_minor = 0
|
||||
gcc_version_str = run_command(gcc_path + " -dumpfullversion -dumpversion")['stdout']
|
||||
@ -909,20 +910,23 @@ def _check_icu_common(dir, out):
|
||||
|
||||
return isExist
|
||||
|
||||
def qt_copy_icu(out):
|
||||
def qt_copy_icu(out, platform):
|
||||
tests = [get_env("QT_DEPLOY") + "/../lib"]
|
||||
prefix = ""
|
||||
postfixes = [""]
|
||||
|
||||
# TODO add for linux arm desktop build
|
||||
if config.option("sysroot") != "":
|
||||
prefix = config.option("sysroot")
|
||||
if config.option("sysroot_" + platform) != "":
|
||||
prefix = config.option("sysroot_" + platform)
|
||||
else:
|
||||
prefix = ""
|
||||
|
||||
postfixes += ["/x86_64-linux-gnu"]
|
||||
postfixes += ["/i386-linux-gnu"]
|
||||
|
||||
if ("linux_64" == platform):
|
||||
postfixes += ["/x86_64-linux-gnu"]
|
||||
elif ("linux_arm64" == platform):
|
||||
postfixes += ["/aarch64-linux-gnu"]
|
||||
elif ("linux_32" == platform):
|
||||
postfixes += ["/i386-linux-gnu"]
|
||||
|
||||
for postfix in postfixes:
|
||||
tests += [prefix + "/lib" + postfix]
|
||||
tests += [prefix + "/lib64" + postfix]
|
||||
@ -1889,17 +1893,19 @@ def check_module_version(actual_version, clear_func):
|
||||
clear_func()
|
||||
return
|
||||
|
||||
|
||||
def set_sysroot_env():
|
||||
def set_sysroot_env(platform):
|
||||
global ENV_BEFORE_SYSROOT
|
||||
ENV_BEFORE_SYSROOT = dict(os.environ)
|
||||
if "linux" == host_platform() and config.option("sysroot") != "":
|
||||
os.environ['PATH'] = config.option("sysroot") + "/usr/bin:" + get_env("PATH")
|
||||
os.environ['LD_LIBRARY_PATH'] = config.get_custom_sysroot_lib()
|
||||
if "linux" != host_platform():
|
||||
return
|
||||
path = config.option("sysroot_" + 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['CFLAGS'] = "--sysroot=" + config.option("sysroot")
|
||||
os.environ['CXXFLAGS'] = "--sysroot=" + config.option("sysroot")
|
||||
os.environ['CFLAGS'] = "--sysroot=" + path
|
||||
os.environ['CXXFLAGS'] = "--sysroot=" + path
|
||||
check_python()
|
||||
|
||||
def restore_sysroot_env():
|
||||
@ -1914,8 +1920,9 @@ def check_python():
|
||||
|
||||
if not is_dir(directory + "/python3"):
|
||||
download('https://github.com/ONLYOFFICE-data/build_tools_data/raw/refs/heads/master/python/python3.tar.gz', directory + "/python3.tar.gz")
|
||||
cmd("tar", ["xfz", directory + "/python3.tar.gz", "-C", directory])
|
||||
cmd("ln", ["-s", directory_bin + "/python3", directory_bin + "/python"])
|
||||
download('https://github.com/ONLYOFFICE-data/build_tools_data/raw/refs/heads/master/python/extract.sh', directory + "/extract.sh")
|
||||
cmd_in_dir(directory, "chmod", ["+x", "./extract.sh"])
|
||||
cmd_in_dir(directory, "./extract.sh")
|
||||
directory_bin = directory_bin.replace(" ", "\\ ")
|
||||
os.environ["PATH"] = directory_bin + os.pathsep + os.environ["PATH"]
|
||||
return
|
||||
|
||||
@ -91,7 +91,13 @@ def parse():
|
||||
dst_dir_arm64 = dst_dir + "/ubuntu16-arm64-sysroot"
|
||||
if not base.is_dir(dst_dir_amd64) or not base.is_dir(dst_dir_arm64):
|
||||
base.cmd_in_dir(dst_dir, "python3", ["./fetch.py"])
|
||||
options["sysroot"] = dst_dir
|
||||
options["sysroot_linux_64"] = dst_dir_amd64
|
||||
options["sysroot_linux_arm64"] = dst_dir_arm64
|
||||
else:
|
||||
# specific sysroot => one platform for build!
|
||||
options["sysroot"] = "1"
|
||||
options["sysroot_linux_64"] = options["sysroot"]
|
||||
options["sysroot_linux_arm64"] = options["sysroot"]
|
||||
|
||||
if is_cef_107():
|
||||
extend_option("config", "cef_version_107")
|
||||
@ -119,11 +125,10 @@ def parse():
|
||||
if not "sdkjs-plugin-server" in options:
|
||||
options["sdkjs-plugin-server"] = "default"
|
||||
|
||||
if not "arm64-toolchain-bin" in options:
|
||||
if not "sysroot" in options:
|
||||
options["arm64-toolchain-bin"] = "/usr/bin"
|
||||
else:
|
||||
options["arm64-toolchain-bin"] = get_custom_sysroot_bin()
|
||||
if not "arm64-toolchain-bin" in options and not "sysroot" in options:
|
||||
options["arm64-toolchain-bin"] = "/usr/bin"
|
||||
else:
|
||||
options["arm64-toolchain-bin"] = get_custom_sysroot_bin("linux_arm64")
|
||||
|
||||
if check_option("platform", "ios"):
|
||||
if not check_option("config", "no_bundle_xcframeworks"):
|
||||
@ -224,13 +229,15 @@ def is_mobile_platform():
|
||||
return True
|
||||
return False
|
||||
|
||||
def get_custom_sysroot_bin():
|
||||
return option("sysroot") + "/usr/bin"
|
||||
def get_custom_sysroot_bin(platform):
|
||||
return option("sysroot_" + platform) + "/usr/bin"
|
||||
|
||||
# todo 32bit support?
|
||||
def get_custom_sysroot_lib():
|
||||
if base.is_os_64bit():
|
||||
return option("sysroot") + "/usr/lib/x86_64-linux-gnu"
|
||||
def get_custom_sysroot_lib(platform):
|
||||
if ("linux_64" == platform):
|
||||
return option("sysroot_linux_64") + "/usr/lib/x86_64-linux-gnu"
|
||||
if ("linux_arm64" == platform):
|
||||
return option("sysroot_linux_arm64") + "/usr/lib/aarch64-linux-gnu"
|
||||
return ""
|
||||
|
||||
def parse_defaults():
|
||||
defaults_path = base.get_script_dir() + "/../defaults"
|
||||
|
||||
@ -17,9 +17,10 @@ def make(src_dir, modules, build_platform="android", qmake_addon=""):
|
||||
# for b2 checks
|
||||
if config.option("sysroot") != "":
|
||||
base.set_sysroot_env()
|
||||
b2_addon = "cflags=\"--sysroot=" + config.option("sysroot") + "\""
|
||||
b2_addon = "cxxflags=\"--sysroot=" + config.option("sysroot") + "\""
|
||||
b2_addon = "linkflags=\"--sysroot=" + config.option("sysroot") + "\""
|
||||
sysroot_path = config.option("sysroot_" + build_platform)
|
||||
b2_addon = "cflags=\"--sysroot=" + sysroot_path + "\""
|
||||
b2_addon = "cxxflags=\"--sysroot=" + sysroot_path + "\""
|
||||
b2_addon = "linkflags=\"--sysroot=" + sysroot_path + "\""
|
||||
|
||||
base.cmd("./bootstrap.sh", ["--with-libraries=system"])
|
||||
base.cmd("./b2", ["--prefix=./../build/" + build_platform, "headers", "install", b2_addon])
|
||||
|
||||
@ -21,24 +21,28 @@ IOS_CMAKE_TOOLCHAIN_FILE = base.get_script_dir() + "/../../core/Common/3dParty/h
|
||||
ANDROID_CMAKE_TOOLCHAIN_FILE = base.get_env("ANDROID_NDK_ROOT") + "/build/cmake/android.toolchain.cmake"
|
||||
|
||||
# linux arm64 cmake toolchain
|
||||
LINUX_ARM64_CMAKE_TOOLCHAIN_FILE = base.get_script_dir() + "/../tools/linux/arm/cross_arm64/linux-arm64.toolchain.cmake"
|
||||
|
||||
LINUX_SYSTEM_AARCH64_TOOLCHAIN_FILE = base.get_script_dir() + "/../tools/linux/sysroot/system-aarch64.toolchain.cmake"
|
||||
LINUX_CUSTOM_SYSROOT_TOOLCHAIN_FILE = base.get_script_dir() + "/../tools/linux/sysroot/custom-sysroot.toolchain.cmake"
|
||||
|
||||
OLD_ENV = dict()
|
||||
|
||||
# get custom sysroot vars as str
|
||||
def setup_custom_sysroot_env() -> str:
|
||||
def setup_custom_sysroot_env(platform) -> str:
|
||||
sysroot_path = config.option("sysroot_" + platform)
|
||||
sysroot_path_bin config.get_custom_sysroot_lib(platform)
|
||||
|
||||
env_vars = []
|
||||
env_vars += ['LD_LIBRARY_PATH=\"' + config.get_custom_sysroot_lib() + "\""]
|
||||
env_vars += ['PATH=\"' + config.option("sysroot") + "/usr/bin:" + base.get_env("PATH") + "\""]
|
||||
env_vars += ['CC=\"' + config.get_custom_sysroot_bin() + "/gcc\""]
|
||||
env_vars += ['CXX=\"' + config.get_custom_sysroot_bin() + "/g++\""]
|
||||
env_vars += ['AR=\"' + config.get_custom_sysroot_bin() + "/ar\""]
|
||||
env_vars += ['RABLIB=\"' + config.get_custom_sysroot_bin() + "/ranlib\""]
|
||||
env_vars += ['CFLAGS=\"' + "--sysroot=" + config.option("sysroot") + "\""]
|
||||
env_vars += ['CXXFLAGS=\"' + "--sysroot=" + config.option("sysroot") + "\""]
|
||||
env_vars += ['LDFLAGS=\"' + "--sysroot=" + config.option("sysroot") + "\""]
|
||||
env_vars += ['LD_LIBRARY_PATH=\"' + config.get_custom_sysroot_lib(platform) + "\""]
|
||||
env_vars += ['PATH=\"' + sysroot_path + "/usr/bin:" + base.get_env("PATH") + "\""]
|
||||
|
||||
env_vars += ['CC=\"' + sysroot_path_bin + "/gcc\""]
|
||||
env_vars += ['CXX=\"' + sysroot_path_bin + "/g++\""]
|
||||
env_vars += ['AR=\"' + sysroot_path_bin + "/ar\""]
|
||||
env_vars += ['RABLIB=\"' + sysroot_path_bin + "/ranlib\""]
|
||||
|
||||
env_vars += ['CFLAGS=\"' + "--sysroot=" + sysroot_path + "\""]
|
||||
env_vars += ['CXXFLAGS=\"' + "--sysroot=" + sysroot_path + "\""]
|
||||
env_vars += ['LDFLAGS=\"' + "--sysroot=" + sysroot_path + "\""]
|
||||
|
||||
env_str = ""
|
||||
for env_var in env_vars:
|
||||
@ -90,10 +94,11 @@ def build_with_cmake(platform, cmake_args, build_type):
|
||||
cmake_args_ext += ["-DCMAKE_OSX_DEPLOYMENT_TARGET=10.11", "-DCMAKE_OSX_ARCHITECTURES=x86_64"]
|
||||
elif platform == "mac_arm64":
|
||||
cmake_args_ext += ["-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0", "-DCMAKE_OSX_ARCHITECTURES=arm64"]
|
||||
elif platform == "linux_arm64":
|
||||
cmake_args += ["-DCMAKE_TOOLCHAIN_FILE=" + LINUX_ARM64_CMAKE_TOOLCHAIN_FILE]
|
||||
elif config.option("sysroot") != "":
|
||||
cmake_args += ["-DCMAKE_TOOLCHAIN_FILE=" + LINUX_CUSTOM_SYSROOT_TOOLCHAIN_FILE] # force use custom CXXFLAGS with Release/Debug build
|
||||
# force use custom CXXFLAGS with Release/Debug build
|
||||
cmake_args += ["-DCMAKE_TOOLCHAIN_FILE=" + LINUX_CUSTOM_SYSROOT_TOOLCHAIN_FILE]
|
||||
elif platform == "linux_arm64" and not base.is_os_arm():
|
||||
cmake_args += ["-DCMAKE_TOOLCHAIN_FILE=" + LINUX_SYSTEM_AARCH64_TOOLCHAIN_FILE]
|
||||
# IOS
|
||||
elif "ios" in platform:
|
||||
cmake_args_ext = [
|
||||
@ -127,7 +132,7 @@ def build_with_cmake(platform, cmake_args, build_type):
|
||||
cmake_args_ext += get_cmake_args_android("x86_64", "21")
|
||||
|
||||
# env setup for custom sysroot
|
||||
env_str = setup_custom_sysroot_env() if config.option("sysroot") != "" else ""
|
||||
env_str = setup_custom_sysroot_env(platform) if config.option("sysroot") != "" else ""
|
||||
|
||||
# run cmake
|
||||
base.cmd(env_str + "cmake", cmake_args + cmake_args_ext)
|
||||
|
||||
@ -136,13 +136,15 @@ def make():
|
||||
base.cmd(command_configure, ["Linux", "--prefix=" + base_dir + "/icu/cross_build_install"])
|
||||
base.replaceInFile("./../source/icudefs.mk.in", "LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS)", "LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS) " + command_compile_addon)
|
||||
else:
|
||||
base.set_sysroot_env()
|
||||
base.set_sysroot_env("linux_64")
|
||||
sysroot_path = config.option("sysroot_linux_64")
|
||||
sysroot_path_bin = config.get_custom_sysroot_bin("linux_64")
|
||||
base.cmd_exe("./../source/configure", ["--prefix=" + base_dir + "/icu/cross_build_install",
|
||||
"CC=" + config.get_custom_sysroot_bin() + "/gcc", "CXX=" + config.get_custom_sysroot_bin() + "/g++",
|
||||
"AR=" + config.get_custom_sysroot_bin() + "/ar", "RANLIB=" + config.get_custom_sysroot_bin() + "/ranlib",
|
||||
"CFLAGS=--sysroot=" + config.option("sysroot"),
|
||||
"CXXFLAGS=--sysroot=" + config.option("sysroot") + " " + command_compile_addon,
|
||||
"LDFLAGS=--sysroot=" + config.option("sysroot")])
|
||||
"CC=" + sysroot_path_bin + "/gcc", "CXX=" + sysroot_path_bin + "/g++",
|
||||
"AR=" + sysroot_path_bin + "/ar", "RANLIB=" + sysroot_path_bin + "/ranlib",
|
||||
"CFLAGS=--sysroot=" + sysroot_path,
|
||||
"CXXFLAGS=--sysroot=" + sysroot_path + " " + command_compile_addon,
|
||||
"LDFLAGS=--sysroot=" + sysroot_path])
|
||||
|
||||
if "" == config.option("sysroot"):
|
||||
base.cmd("make", ["-j4"])
|
||||
|
||||
@ -99,23 +99,23 @@ def make():
|
||||
base.replaceInFile("./Makefile", "CFLAGS=-Wall -O3", "CFLAGS=-Wall -O3 -fvisibility=hidden")
|
||||
base.replaceInFile("./Makefile", "CXXFLAGS=-Wall -O3", "CXXFLAGS=-Wall -O3 -fvisibility=hidden")
|
||||
else:
|
||||
base.replaceInFile("./Makefile", "CROSS_COMPILE=", "CROSS_COMPILE=" + config.get_custom_sysroot_bin() + "/")
|
||||
base.replaceInFile("./Makefile", "CFLAGS=-Wall -O3", "CFLAGS=-Wall -O3 -fvisibility=hidden --sysroot=" + config.option("sysroot"))
|
||||
base.replaceInFile("./Makefile", "CXXFLAGS=-Wall -O3", "CXXFLAGS=-Wall -O3 -fvisibility=hidden --sysroot=" + config.option("sysroot"))
|
||||
base.replaceInFile("./Makefile", "CROSS_COMPILE=", "CROSS_COMPILE=" + config.get_custom_sysroot_bin("linux_64") + "/")
|
||||
base.replaceInFile("./Makefile", "CFLAGS=-Wall -O3", "CFLAGS=-Wall -O3 -fvisibility=hidden --sysroot=" + config.option("sysroot_linux_64"))
|
||||
base.replaceInFile("./Makefile", "CXXFLAGS=-Wall -O3", "CXXFLAGS=-Wall -O3 -fvisibility=hidden --sysroot=" + config.option("sysroot_linux_64"))
|
||||
|
||||
if config.option("sysroot") == "":
|
||||
base.cmd("make", [])
|
||||
base.cmd("make", ["install"])
|
||||
base.cmd("make", ["clean"], True)
|
||||
else:
|
||||
base.set_sysroot_env()
|
||||
base.set_sysroot_env("linux_64")
|
||||
base.cmd_exe("make", [])
|
||||
base.cmd_exe("make", ["install"])
|
||||
base.cmd_exe("make", ["clean"], True)
|
||||
base.restore_sysroot_env()
|
||||
|
||||
if (-1 != config.option("platform").find("linux_arm64")) and not base.is_dir("../build/linux_arm64"):
|
||||
if ("x86_64" != platform.machine()):
|
||||
if (base.is_os_arm()):
|
||||
base.copy_dir("../build/linux_64", "../build/linux_arm64")
|
||||
else:
|
||||
cross_compiler_arm64 = config.option("arm64-toolchain-bin")
|
||||
|
||||
@ -44,14 +44,9 @@ def is_xp_platform():
|
||||
return False
|
||||
|
||||
def is_use_clang():
|
||||
gcc_version = base.get_gcc_version()
|
||||
|
||||
is_clang = "false"
|
||||
if config.option("sysroot") == "" and (gcc_version >= 6000 or "1" == config.option("use-clang")):
|
||||
is_clang = "true"
|
||||
|
||||
print("gcc version: " + str(gcc_version) + ", use clang:" + is_clang)
|
||||
return is_clang
|
||||
if config.option("sysroot") == "" and "1" == config.option("use-clang"):
|
||||
return "true"
|
||||
return "false"
|
||||
|
||||
def make():
|
||||
if not is_main_platform():
|
||||
|
||||
@ -235,12 +235,14 @@ def make():
|
||||
|
||||
if config.check_option("platform", "linux_64"):
|
||||
if config.option("sysroot") != "":
|
||||
sysroot_path = config.option("sysroot_linux_64")
|
||||
sysroot_path_bin = config.get_custom_sysroot_bin("linux_64")
|
||||
src_replace = "config(\"compiler\") {\n asmflags = []\n cflags = []\n cflags_c = []\n cflags_cc = []\n cflags_objc = []\n cflags_objcc = []\n ldflags = []"
|
||||
dst_replace = "config(\"compiler\") {\n asmflags = []\n cflags = [\"--sysroot=" + config.option("sysroot") + "\"]" + "\n cflags_c = []\n cflags_cc = [\"--sysroot=" + config.option("sysroot") + "\"]" + "\n cflags_objc = []\n cflags_objcc = []\n ldflags = [\"--sysroot=" + config.option("sysroot") + "\"]"
|
||||
dst_replace = "config(\"compiler\") {\n asmflags = []\n cflags = [\"--sysroot=" + sysroot_path + "\"]" + "\n cflags_c = []\n cflags_cc = [\"--sysroot=" + sysroot_path + "\"]" + "\n cflags_objc = []\n cflags_objcc = []\n ldflags = [\"--sysroot=" + sysroot_path + "\"]"
|
||||
base.replaceInFile("build/config/compiler/BUILD.gn", src_replace, dst_replace)
|
||||
|
||||
src_replace = "gcc_toolchain(\"x64\") {\n cc = \"gcc\"\n cxx = \"g++\""
|
||||
dst_replace = "gcc_toolchain(\"x64\") {\n cc = \""+ config.get_custom_sysroot_bin() + "/gcc\"\n cxx = \"" + config.get_custom_sysroot_bin() + "/g++\""
|
||||
dst_replace = "gcc_toolchain(\"x64\") {\n cc = \""+ sysroot_path_bin + "/gcc\"\n cxx = \"" + sysroot_path_bin + "/g++\""
|
||||
base.replaceInFile("build/toolchain/linux/BUILD.gn", src_replace, dst_replace)
|
||||
|
||||
old_env = dict(os.environ)
|
||||
|
||||
@ -178,7 +178,7 @@ def make():
|
||||
base.qt_copy_lib("Qt5DBus", root_dir)
|
||||
base.qt_copy_lib("Qt5X11Extras", root_dir)
|
||||
base.qt_copy_lib("Qt5XcbQpa", root_dir)
|
||||
base.qt_copy_icu(root_dir)
|
||||
base.qt_copy_icu(root_dir, platform)
|
||||
if not base.check_congig_option_with_platfom(platform, "libvlc"):
|
||||
base.copy_files(base.get_env("QT_DEPLOY") + "/../lib/libqgsttools_p.so*", root_dir)
|
||||
|
||||
|
||||
@ -102,13 +102,13 @@ def make(platform, project, qmake_config_addon="", is_no_errors=False):
|
||||
build_params.append("linux-clang-libc++")
|
||||
|
||||
if "" != config.option("sysroot"):
|
||||
os.environ['QMAKE_CUSTOM_SYSROOT'] = config.option("sysroot")
|
||||
os.environ['PKG_CONFIG_PATH'] = config.get_custom_sysroot_lib() + "/pkgconfig"
|
||||
os.environ['QMAKE_CUSTOM_SYSROOT'] = config.option("sysroot_" + platform)
|
||||
#os.environ['PKG_CONFIG_PATH'] = config.get_custom_sysroot_lib(platform) + "/pkgconfig"
|
||||
|
||||
base.cmd_exe(qmake_app, build_params)
|
||||
|
||||
if "" != config.option("sysroot"):
|
||||
base.set_sysroot_env()
|
||||
base.set_sysroot_env(platform)
|
||||
|
||||
base.correct_makefile_after_qmake(platform, makefile)
|
||||
if ("1" == config.option("clean")):
|
||||
@ -117,6 +117,8 @@ def make(platform, project, qmake_config_addon="", is_no_errors=False):
|
||||
base.cmd(qmake_app, build_params)
|
||||
base.correct_makefile_after_qmake(platform, makefile)
|
||||
base.cmd_and_return_cwd("make", ["-f", makefile] + get_j_num(), is_no_errors)
|
||||
|
||||
base.restore_sysroot_env()
|
||||
else:
|
||||
config_params_array = base.qt_config_as_param(config_param)
|
||||
config_params_string = ""
|
||||
|
||||
3
tools/linux/.gitignore
vendored
3
tools/linux/.gitignore
vendored
@ -1,2 +1,5 @@
|
||||
qt_build
|
||||
packages_complete
|
||||
python3
|
||||
python3.tar.gz
|
||||
extract.sh
|
||||
|
||||
17
tools/linux/sysroot/system-aarch64.toolchain.cmake
Normal file
17
tools/linux/sysroot/system-aarch64.toolchain.cmake
Normal file
@ -0,0 +1,17 @@
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||
|
||||
set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
|
||||
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
|
||||
|
||||
set(CMAKE_C_LINKER aarch64-linux-gnu-ld)
|
||||
set(CMAKE_CXX_LINKER aarch64-linux-gnu-ld)
|
||||
|
||||
set(CMAKE_AR aarch64-linux-gnu-ar)
|
||||
set(CMAKE_RANLIB aarch64-linux-gnu-ranlib)
|
||||
set(CMAKE_STRIP aarch64-linux-gnu-strip)
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
Reference in New Issue
Block a user