11 changed files with 28 additions and 300 deletions
@ -1,32 +0,0 @@
@@ -1,32 +0,0 @@
|
||||
From b259e432f70c7cb86d121986d9a3a8a6143d9023 Mon Sep 17 00:00:00 2001 |
||||
From: Seungha Yang <seungha@centricular.com> |
||||
Date: Mon, 8 Jun 2020 21:24:54 +0900 |
||||
Subject: [PATCH] Add UNIX large file support for MinGW |
||||
|
||||
MinGW gcc supports _FILE_OFFSET_BITS=64 and we need to set it for |
||||
MinGW as well |
||||
---
|
||||
mesonbuild/compilers/compilers.py | 6 +++--- |
||||
1 file changed, 3 insertions(+), 3 deletions(-) |
||||
|
||||
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
|
||||
index 4b286fe4..50e21883 100644
|
||||
--- a/mesonbuild/compilers/compilers.py
|
||||
+++ b/mesonbuild/compilers/compilers.py
|
||||
@@ -1246,10 +1246,10 @@ def get_largefile_args(compiler):
|
||||
''' |
||||
Enable transparent large-file-support for 32-bit UNIX systems |
||||
''' |
||||
- if not (compiler.info.is_windows() or compiler.info.is_darwin()):
|
||||
+ if not (compiler.get_argument_syntax() == 'msvc' or compiler.info.is_darwin()):
|
||||
# Enable large-file support unconditionally on all platforms other |
||||
- # than macOS and Windows. macOS is now 64-bit-only so it doesn't
|
||||
- # need anything special, and Windows doesn't have automatic LFS.
|
||||
+ # than macOS and MSVC. macOS is now 64-bit-only so it doesn't
|
||||
+ # need anything special, and MSVC doesn't have automatic LFS.
|
||||
# You must use the 64-bit counterparts explicitly. |
||||
# glibc, musl, and uclibc, and all BSD libcs support this. On Android, |
||||
# support for transparent LFS is available depending on the version of |
||||
--
|
||||
2.17.1 |
||||
|
@ -1,38 +0,0 @@
@@ -1,38 +0,0 @@
|
||||
From a6aa905f2c580a34e6bb1c547b20ec6ecd4011d0 Mon Sep 17 00:00:00 2001 |
||||
From: Alexandros Theodotou <alex@zrythm.org> |
||||
Date: Thu, 23 Apr 2020 08:32:15 +0530 |
||||
Subject: [PATCH 1/2] Allow cross-compile without a native compiler |
||||
|
||||
---
|
||||
mesonbuild/backend/ninjabackend.py | 2 +- |
||||
2 files changed, 2 insertions(+), 2 deletions(-) |
||||
|
||||
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
|
||||
index 8afb80e..3cb26b2 100644
|
||||
--- a/mesonbuild/backend/ninjabackend.py
|
||||
+++ b/mesonbuild/backend/ninjabackend.py
|
||||
@@ -1747,7 +1747,7 @@ int dummy;
|
||||
for for_machine in MachineChoice: |
||||
static_linker = self.build.static_linker[for_machine] |
||||
if static_linker is None: |
||||
- return
|
||||
+ continue
|
||||
rule = 'STATIC_LINKER{}'.format(self.get_rule_suffix(for_machine)) |
||||
cmdlist = [] |
||||
args = ['$in'] |
||||
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
|
||||
index b2b43f3..0d7cc33 100644
|
||||
--- a/mesonbuild/interpreter.py
|
||||
+++ b/mesonbuild/interpreter.py
|
||||
@@ -3080,7 +3080,7 @@ external dependencies (including libraries) must go to "dependencies".''')
|
||||
self.build.projects[self.subproject] = proj_name |
||||
mlog.log('Project name:', mlog.bold(proj_name)) |
||||
mlog.log('Project version:', mlog.bold(self.project_version)) |
||||
- self.add_languages(proj_langs, True, MachineChoice.BUILD)
|
||||
+ self.add_languages(proj_langs, False, MachineChoice.BUILD)
|
||||
self.add_languages(proj_langs, True, MachineChoice.HOST) |
||||
self.set_backend() |
||||
if not self.is_subproject(): |
||||
--
|
||||
2.26.1.windows.1 |
||||
|
@ -1,71 +0,0 @@
@@ -1,71 +0,0 @@
|
||||
From 5a8c70cbcfb492ea3f916b7a4be0496d3c524573 Mon Sep 17 00:00:00 2001 |
||||
From: Cerbero <cerbero@gstreamer.freedesktop.org> |
||||
Date: Sat, 4 Apr 2020 00:41:17 +0530 |
||||
Subject: [PATCH] qt dependency: Pick debug libraries based on b_vscrt |
||||
|
||||
`b_vscrt` has existed forever, and is the canonical source for |
||||
which CRT to link to, and hence whether to use the debug libraries |
||||
or not. |
||||
---
|
||||
mesonbuild/dependencies/ui.py | 5 +++++ |
||||
run_unittests.py | 27 +++++++++++++++++++++++++++ |
||||
2 files changed, 32 insertions(+) |
||||
|
||||
diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
|
||||
index da411ef..1d2ca1e 100644
|
||||
--- a/mesonbuild/dependencies/ui.py
|
||||
+++ b/mesonbuild/dependencies/ui.py
|
||||
@@ -385,7 +385,12 @@ class QtBaseDependency(ExternalDependency):
|
||||
self.bindir = self.get_qmake_host_bins(qvars) |
||||
self.is_found = True |
||||
|
||||
+ # Use the buildtype by default, but look at the b_vscrt option if the
|
||||
+ # compiler supports it.
|
||||
is_debug = self.env.coredata.get_builtin_option('buildtype') == 'debug' |
||||
+ if 'b_vscrt' in self.env.coredata.base_options:
|
||||
+ if self.env.coredata.base_options['b_vscrt'].value in ('mdd', 'mtd'):
|
||||
+ is_debug = True
|
||||
modules_lib_suffix = self._get_modules_lib_suffix(is_debug) |
||||
|
||||
for module in mods: |
||||
diff --git a/run_unittests.py b/run_unittests.py
|
||||
index b42b9db..abc1c5f 100644
|
||||
--- a/run_unittests.py
|
||||
+++ b/run_unittests.py
|
||||
@@ -4696,6 +4696,33 @@ class WindowsTests(BasePlatformTests):
|
||||
# Verify that a valid checksum was written by all other compilers |
||||
self.assertTrue(pe.verify_checksum(), msg=msg) |
||||
|
||||
+ def test_qt5dependency_vscrt(self):
|
||||
+ '''
|
||||
+ Test that qt5 dependencies use the debug module suffix when b_vscrt is
|
||||
+ set to 'mdd'
|
||||
+ '''
|
||||
+ # Verify that the `b_vscrt` option is available
|
||||
+ env = get_fake_env()
|
||||
+ cc = env.detect_c_compiler(MachineChoice.HOST)
|
||||
+ if 'b_vscrt' not in cc.base_options:
|
||||
+ raise unittest.SkipTest('Compiler does not support setting the VS CRT')
|
||||
+ # Verify that qmake is for Qt5
|
||||
+ if not shutil.which('qmake-qt5'):
|
||||
+ if not shutil.which('qmake') and not is_ci():
|
||||
+ raise unittest.SkipTest('QMake not found')
|
||||
+ output = subprocess.getoutput('qmake --version')
|
||||
+ if 'Qt version 5' not in output and not is_ci():
|
||||
+ raise unittest.SkipTest('Qmake found, but it is not for Qt 5.')
|
||||
+ # Setup with /MDd
|
||||
+ testdir = os.path.join(self.framework_test_dir, '4 qt')
|
||||
+ self.init(testdir, extra_args=['-Db_vscrt=mdd'])
|
||||
+ # Verify that we're linking to the debug versions of Qt DLLs
|
||||
+ build_ninja = os.path.join(self.builddir, 'build.ninja')
|
||||
+ with open(build_ninja, 'r', encoding='utf-8') as f:
|
||||
+ contents = f.read()
|
||||
+ m = re.search('build qt5core.exe: cpp_LINKER.*Qt5Cored.lib', contents)
|
||||
+ self.assertIsNotNone(m, msg=contents)
|
||||
+
|
||||
|
||||
@unittest.skipUnless(is_osx(), "requires Darwin") |
||||
class DarwinTests(BasePlatformTests): |
||||
--
|
||||
2.26.0.windows.1 |
||||
|
@ -1,55 +0,0 @@
@@ -1,55 +0,0 @@
|
||||
From f73687d64d49ba9b291910c75bd1ddf6379d257d Mon Sep 17 00:00:00 2001 |
||||
From: Matthew Waters <matthew@centricular.com> |
||||
Date: Thu, 14 May 2020 13:07:26 +1000 |
||||
Subject: [PATCH] ui/qt: use new directory layout for qt on android |
||||
|
||||
---
|
||||
mesonbuild/dependencies/ui.py | 18 ++++++++++++++++++ |
||||
1 file changed, 18 insertions(+) |
||||
|
||||
diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
|
||||
index 4cec814..cdb517c 100644
|
||||
--- a/mesonbuild/dependencies/ui.py
|
||||
+++ b/mesonbuild/dependencies/ui.py
|
||||
@@ -18,6 +18,7 @@ import os
|
||||
import re |
||||
import subprocess |
||||
import typing as T |
||||
+import textwrap
|
||||
from collections import OrderedDict |
||||
|
||||
from .. import mlog |
||||
@@ -406,6 +407,9 @@ class QtBaseDependency(ExternalDependency):
|
||||
if libfile: |
||||
libfile = libfile[0] |
||||
else: |
||||
+ mlog.log("Could not find:", module,
|
||||
+ self.qtpkgname + module + modules_lib_suffix,
|
||||
+ 'in', libdir)
|
||||
self.is_found = False |
||||
break |
||||
self.link_args.append(libfile) |
||||
@@ -426,6 +430,20 @@ class QtBaseDependency(ExternalDependency):
|
||||
if self.env.machines[self.for_machine].is_darwin(): |
||||
if is_debug: |
||||
suffix += '_debug' |
||||
+ if mesonlib.version_compare(self.version, '>= 5.14.0'):
|
||||
+ if self.env.machines[self.for_machine].is_android():
|
||||
+ cpu_family = self.env.machines[self.for_machine].cpu_family
|
||||
+ if cpu_family == 'x86':
|
||||
+ suffix += '_x86'
|
||||
+ elif cpu_family == 'x86_64':
|
||||
+ suffix += '_x86_64'
|
||||
+ elif cpu_family == 'arm':
|
||||
+ suffix += '_armeabi-v7a'
|
||||
+ elif cpu_family == 'aarch64':
|
||||
+ suffix += '_arm64-v8a'
|
||||
+ else:
|
||||
+ mlog.warning(textwrap.dedent('''cpu_family {} is not known
|
||||
+ to be available with Qt {} on Android'''.format(cpu_family, self.version)))
|
||||
return suffix |
||||
|
||||
def _link_with_qtmain(self, is_debug, libdir): |
||||
--
|
||||
2.26.2 |
||||
|
Loading…
Reference in new issue