summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2025-10-31 10:42:07 -0700
committerDylan Baker <dylan@pnwbakers.com>2025-11-19 10:48:48 -0800
commitfc93ef0370dc2e4cb44fe4abf5729be3e3e3a6c3 (patch)
tree95c74f937c8f2a8cf5972f3785a07f7f41628a3c /unittests
parenta6c4a4d7e867db4f98db1127d1246c43c5c7a863 (diff)
downloadmeson-fc93ef0370dc2e4cb44fe4abf5729be3e3e3a6c3.tar.gz
compilers: Stop passing `is_cross`
This is calculated by `Environment().is_cross_build(for_machine)`. Since we have that in the Compiler class, just calculate it in the Compiler initializer
Diffstat (limited to 'unittests')
-rw-r--r--unittests/internaltests.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/unittests/internaltests.py b/unittests/internaltests.py
index b5dad878b..a1c18efba 100644
--- a/unittests/internaltests.py
+++ b/unittests/internaltests.py
@@ -109,7 +109,7 @@ class InternalTests(unittest.TestCase):
stat.S_IRGRP | stat.S_IXGRP)
def test_compiler_args_class_none_flush(self):
- cc = ClangCCompiler([], [], 'fake', MachineChoice.HOST, False, get_fake_env())
+ cc = ClangCCompiler([], [], 'fake', MachineChoice.HOST, get_fake_env())
a = cc.compiler_args(['-I.'])
#first we are checking if the tree construction deduplicates the correct -I argument
a += ['-I..']
@@ -133,7 +133,7 @@ class InternalTests(unittest.TestCase):
self.assertEqual(a, ['-Ifirst', '-Isecond', '-Ithird'])
def test_compiler_args_class_clike(self):
- cc = ClangCCompiler([], [], 'fake', MachineChoice.HOST, False, get_fake_env())
+ cc = ClangCCompiler([], [], 'fake', MachineChoice.HOST, get_fake_env())
# Test that empty initialization works
a = cc.compiler_args()
self.assertEqual(a, [])
@@ -216,7 +216,7 @@ class InternalTests(unittest.TestCase):
def test_compiler_args_class_visualstudio(self):
linker = linkers.MSVCDynamicLinker(MachineChoice.HOST, [])
# Version just needs to be > 19.0.0
- cc = VisualStudioCPPCompiler([], [], '20.00', MachineChoice.HOST, False, get_fake_env(), 'x64', linker=linker)
+ cc = VisualStudioCPPCompiler([], [], '20.00', MachineChoice.HOST, get_fake_env(), 'x64', linker=linker)
a = cc.compiler_args(cc.get_always_args())
self.assertEqual(a.to_native(copy=True), ['/nologo', '/showIncludes', '/utf-8', '/Zc:__cplusplus'])
@@ -237,7 +237,7 @@ class InternalTests(unittest.TestCase):
def test_compiler_args_class_gnuld(self):
## Test --start/end-group
linker = linkers.GnuBFDDynamicLinker([], MachineChoice.HOST, '-Wl,', [])
- gcc = GnuCCompiler([], [], 'fake', MachineChoice.HOST, False, get_fake_env(), linker=linker)
+ gcc = GnuCCompiler([], [], 'fake', MachineChoice.HOST, get_fake_env(), linker=linker)
## Ensure that the fake compiler is never called by overriding the relevant function
gcc.get_default_include_dirs = lambda: ['/usr/include', '/usr/share/include', '/usr/local/include']
## Test that 'direct' append and extend works
@@ -265,7 +265,7 @@ class InternalTests(unittest.TestCase):
def test_compiler_args_remove_system(self):
## Test --start/end-group
linker = linkers.GnuBFDDynamicLinker([], MachineChoice.HOST, '-Wl,', [])
- gcc = GnuCCompiler([], [], 'fake', MachineChoice.HOST, False, get_fake_env(), linker=linker)
+ gcc = GnuCCompiler([], [], 'fake', MachineChoice.HOST, get_fake_env(), linker=linker)
## Ensure that the fake compiler is never called by overriding the relevant function
gcc.get_default_include_dirs = lambda: ['/usr/include', '/usr/share/include', '/usr/local/include']
## Test that 'direct' append and extend works
@@ -1636,7 +1636,7 @@ class InternalTests(unittest.TestCase):
('aarch64_be', 'aarch64'),
]
- cc = ClangCCompiler([], [], 'fake', MachineChoice.HOST, False, get_fake_env())
+ cc = ClangCCompiler([], [], 'fake', MachineChoice.HOST, get_fake_env())
with mock.patch('mesonbuild.envconfig.any_compiler_has_define', mock.Mock(return_value=False)):
for test, expected in cases:
@@ -1685,7 +1685,7 @@ class InternalTests(unittest.TestCase):
('aarch64_be', 'aarch64'),
]
- cc = ClangCCompiler([], [], 'fake', MachineChoice.HOST, False, get_fake_env())
+ cc = ClangCCompiler([], [], 'fake', MachineChoice.HOST, get_fake_env())
with mock.patch('mesonbuild.envconfig.any_compiler_has_define', mock.Mock(return_value=False)):
for test, expected in cases: