From ddcfbf891e430083bdaa459b56dc9103d4e852d7 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Fri, 1 Mar 2024 14:57:28 +0200 Subject: [PATCH 1/3] c_execution: remove unused source_suffix argument to GCCToolchain --- loopy/target/c/c_execution.py | 1 - 1 file changed, 1 deletion(-) diff --git a/loopy/target/c/c_execution.py b/loopy/target/c/c_execution.py index c608cc440..dba75238c 100644 --- a/loopy/target/c/c_execution.py +++ b/loopy/target/c/c_execution.py @@ -286,7 +286,6 @@ def __init__(self, toolchain=None, library_dirs=[], defines=[], undefines=[], - source_suffix="c", so_ext=".so", o_ext=".o", include_dirs=[]) From bc8b3a110a2e8688a31f23f390cffbe129667863 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Fri, 1 Mar 2024 15:05:03 +0200 Subject: [PATCH 2/3] c_execution: add optional arguments to GCCToolchain --- loopy/target/c/c_execution.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/loopy/target/c/c_execution.py b/loopy/target/c/c_execution.py index dba75238c..b1685cad1 100644 --- a/loopy/target/c/c_execution.py +++ b/loopy/target/c/c_execution.py @@ -280,6 +280,7 @@ def __init__(self, toolchain=None, # default args self.toolchain = GCCToolchain( cc="gcc", + ld="ld", cflags="-std=c99 -O3 -fPIC".split(), ldflags="-shared".split(), libraries=[], @@ -288,7 +289,8 @@ def __init__(self, toolchain=None, undefines=[], so_ext=".so", o_ext=".o", - include_dirs=[]) + include_dirs=[], + features=set()) if toolchain is None: # copy in all differing values From fafbc458496e19d44270d9a3c0c487897b11fdc8 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Fri, 1 Mar 2024 15:05:34 +0200 Subject: [PATCH 3/3] test: remove test of GCCtoolchain --- test/test_c_execution.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/test/test_c_execution.py b/test/test_c_execution.py index 4b5fdb1f8..11e336e0d 100644 --- a/test/test_c_execution.py +++ b/test/test_c_execution.py @@ -336,11 +336,6 @@ def eval_tester(knl): # the default (non-guessed) toolchain! __test(eval_tester, ExecutableCTarget, compiler=ccomp) - # and test that we will fail if we remove a required attribute - del ccomp.toolchain.undefines - with pytest.raises(AttributeError): - __test(eval_tester, ExecutableCTarget, compiler=ccomp) - # next test that some made up compiler can be specified ccomp = CCompiler(cc="foo") assert isinstance(ccomp.toolchain, GCCToolchain)