You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added new optional arguments:
* compiler_flags - common flags for C and C++ compilers.
* linker_flags - common linker flags for all exe/module/shared
configurations.
* src_dir - source dir for the test suite source code (within
prop:buildir).
* obj_dir - build dir for the test suite (within prop:buildir).
Added new output properties:
* ts_srcdir
* ts_objdir
The 'compiler_flags' argument extends or adds the following CMake
configuration parameters to the appropriate step: CMAKE_C_FLAGS and
CMAKE_CXX_FLAGS. The 'linker_flags' argument extends or adds the
following CMake configuration parameters accordingly:
CMAKE_EXE_LINKER_FLAGS, CMAKE_MODULE_LINKER_FLAGS and
CMAKE_SHARED_LINKER_FLAGS.
# Note: The 'compiler_dir' parameter or CMAKE_{C|CXX}_COMPILER and TEST_SUITE_LIT must be specified inside of 'cmake_definitions' parameters;
18
15
# otherwise the function will get failed by assert. Also, some of CMAKE_{C|CXX}_COMPILER and TEST_SUITE_LIT can be specified in case the 'compiler_dir'
@@ -36,6 +33,12 @@ def getLlvmTestSuiteSteps(
36
33
compiler_dir=None, # A path a root of built Clang toolchain tree. This path will be used
37
34
# to specify CMAKE_{C|CXX}_COMPILER and TEST_SUITE_LIT if they are missing inside of
38
35
# CMake definitions.
36
+
compiler_flags=None, # Common flags for C and C++ compilers.
37
+
linker_flags=None, # Common linker flags for all exe/module/shared configurations.
38
+
39
+
src_dir=None,
40
+
obj_dir=None,
41
+
39
42
f=None
40
43
):
41
44
""" Create and configure a builder factory with a set of the build steps to retrieve, build and run the LLVM Test Suite project
@@ -46,6 +49,9 @@ def getLlvmTestSuiteSteps(
46
49
This is one-stage CMake configurable build that uses Ninja generator by default. Using the other CMake generators
47
50
also possible.
48
51
52
+
The factory supports the remote test runs on the dev boards. Specifying TEST_SUITE_REMOTE_HOST in the CMake definitions dict
53
+
will add the rsync target step.
54
+
49
55
Property Parameters
50
56
-------------------
51
57
@@ -128,6 +134,24 @@ def getLlvmTestSuiteSteps(
128
134
This argument must be specified if any of CMAKE_{C|CXX}_COMPILER and TEST_SUITE_LIT weren't specified
129
135
in the CMake definitions dict.
130
136
137
+
compiler_flags : string, optional
138
+
Common flags for C and C++ compilers.
139
+
140
+
This argument will add CMAKE_{C|CXX}_FLAGS CMake definitions if they were not specified; otherwise the existing
141
+
definitions will be extended with these compiler flags.
142
+
143
+
linker_flags : string, optional
144
+
Common linker flags for all exe/module/shared configurations.
145
+
146
+
This argument will add CMAKE_{EXE|MODULE|SHARED}_LINKER_FLAGS CMake definitions if they were not specified;
147
+
otherwise the existing definitions will be extended with these linker flags.
148
+
149
+
src_dir : str, optional
150
+
A custom llvm-test-suite source directory within %(prop:builddir)s of the builder (default is "llvm-test-suite").
151
+
152
+
obj_dir : str, optional
153
+
The build folder (default is "build/llvm-test-suite").
154
+
131
155
f : LLVMBuildFactory, optional
132
156
A factory object to fill up with the build steps. An empty stub will be created if this argument wasn't specified.
133
157
@@ -139,7 +163,11 @@ def getLlvmTestSuiteSteps(
139
163
Properties
140
164
----------
141
165
142
-
None
166
+
ts_srcdir : str
167
+
A full path to the LLVM test-suite source code directory.
168
+
169
+
ts_objdir : str
170
+
A full path to the build directory.
143
171
144
172
"""
145
173
assertgenerator, "CMake generator must be specified."
assert"CMAKE_C_COMPILER"incmake_definitions, "CMAKE_C_COMPILER must be specified in the CMake definitions."
230
-
assert"CMAKE_CXX_COMPILER"incmake_definitions, "CMAKE_CXX_COMPILER must be specified in the CMake definitions."
231
-
assert ("TEST_SUITE_LIT"incmake_definitionsor"TEST_SUITE_LIT:FILEPATH"incmake_definitions), "TEST_SUITE_LIT must be specified in the CMake definitions."
232
-
else:
266
+
ifcompiler_dir:
233
267
#TODO: support for the executable extensions on the build host.
assert"CMAKE_C_COMPILER"incmake_definitions, "CMAKE_C_COMPILER must be specified in the CMake definitions."
276
+
assert"CMAKE_CXX_COMPILER"incmake_definitions, "CMAKE_CXX_COMPILER must be specified in the CMake definitions."
277
+
assert ("TEST_SUITE_LIT"incmake_definitionsor"TEST_SUITE_LIT:FILEPATH"incmake_definitions), "TEST_SUITE_LIT must be specified in the CMake definitions."
278
+
279
+
#Note: we can get those flags as the renderables. Properly handle them by using %(kw:) interpolation.
0 commit comments