blob: 5f966563f28e9c54205b4021189bad63dfad9618 [file] [log] [blame]
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001# Copyright (c) 2016, 2017 ARM Limited.
2#
3# SPDX-License-Identifier: MIT
4#
5# Permission is hereby granted, free of charge, to any person obtaining a copy
6# of this software and associated documentation files (the "Software"), to
7# deal in the Software without restriction, including without limitation the
8# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9# sell copies of the Software, and to permit persons to whom the Software is
10# furnished to do so, subject to the following conditions:
11#
12# The above copyright notice and this permission notice shall be included in all
13# copies or substantial portions of the Software.
14#
15# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21# SOFTWARE.
22
23import SCons
24import os
25import subprocess
26
27def version_at_least(version, required):
28 end = min(len(version), len(required))
29
30 for i in range(0, end, 2):
31 if int(version[i]) < int(required[i]):
32 return False
33 elif int(version[i]) > int(required[i]):
34 return True
35
36 return True
37
38vars = Variables("scons")
39vars.AddVariables(
40 BoolVariable("debug", "Debug", False),
41 BoolVariable("asserts", "Enable asserts (this flag is forced to 1 for debug=1)", False),
Georgios Pinitas3faea252017-10-30 14:13:50 +000042 BoolVariable("logging", "Logging (this flag is forced to 1 for debug=1)", False),
Georgios Pinitas421405b2018-10-26 19:05:32 +010043 EnumVariable("arch", "Target Architecture", "armv7a", allowed_values=("armv7a", "arm64-v8a", "arm64-v8.2-a", "arm64-v8.2-a-sve", "x86_32", "x86_64")),
Anthony Barbier6ff3b192017-09-04 18:44:23 +010044 EnumVariable("os", "Target OS", "linux", allowed_values=("linux", "android", "bare_metal")),
Anthony Barbier6a3daf12018-02-19 17:24:27 +000045 EnumVariable("build", "Build type", "cross_compile", allowed_values=("native", "cross_compile", "embed_only")),
Anthony Barbier6ff3b192017-09-04 18:44:23 +010046 BoolVariable("examples", "Build example programs", True),
SiCong Li8b4c7302019-09-19 12:18:15 +010047 BoolVariable("gemm_tuner", "Build gemm_tuner programs", True),
Anthony Barbier6ff3b192017-09-04 18:44:23 +010048 BoolVariable("Werror", "Enable/disable the -Werror compilation flag", True),
Pablo Telloc6cb35a2017-06-21 15:39:47 +010049 BoolVariable("standalone", "Builds the tests as standalone executables, links statically with libgcc, libstdc++ and libarm_compute", False),
Anthony Barbier6ff3b192017-09-04 18:44:23 +010050 BoolVariable("opencl", "Enable OpenCL support", True),
51 BoolVariable("neon", "Enable Neon support", False),
Anthony Barbier7068f992017-10-26 15:23:08 +010052 BoolVariable("gles_compute", "Enable OpenGL ES Compute Shader support", False),
Anthony Barbiercc0a80b2017-12-15 11:37:29 +000053 BoolVariable("embed_kernels", "Embed OpenCL kernels and OpenGL ES compute shaders in library binary", True),
Anthony Barbier6ff3b192017-09-04 18:44:23 +010054 BoolVariable("set_soname", "Set the library's soname and shlibversion (requires SCons 2.4 or above)", False),
55 BoolVariable("openmp", "Enable OpenMP backend", False),
56 BoolVariable("cppthreads", "Enable C++11 threads backend", True),
57 PathVariable("build_dir", "Specify sub-folder for the build", ".", PathVariable.PathAccept),
Anthony Barbier01bbd5f2018-11-01 15:10:51 +000058 PathVariable("install_dir", "Specify sub-folder for the install", "", PathVariable.PathAccept),
Michalis Spyrou323ce0f2018-11-30 16:30:43 +000059 BoolVariable("exceptions", "Enable/disable C++ exception support", True),
Anthony Barbiera4e5e1e2017-10-05 14:55:34 +010060 #FIXME Remove before release (And remove all references to INTERNAL_ONLY)
Georgios Pinitas37831162018-08-20 15:41:10 +010061 BoolVariable("internal_only", "Enable ARM internal only tests", False),
Anthony Barbier149de5b2018-12-06 10:27:37 +000062 ("toolchain_prefix", "Override the toolchain prefix", ""),
Anthony Barbier7390e052018-03-13 09:29:41 +000063 ("extra_cxx_flags", "Extra CXX flags to be appended to the build command", ""),
Georgios Pinitas421405b2018-10-26 19:05:32 +010064 ("extra_link_flags", "Extra LD flags to be appended to the build command", ""),
Anthony Barbier7390e052018-03-13 09:29:41 +000065 ("compiler_cache", "Command to prefix to the C and C++ compiler (e.g ccache)", "")
Anthony Barbier6ff3b192017-09-04 18:44:23 +010066)
67
68env = Environment(platform="posix", variables=vars, ENV = os.environ)
Anthony Barbiere8a55df2018-10-26 09:05:01 +010069build_path = env['build_dir']
70# If build_dir is a relative path then add a #build/ prefix:
71if not env['build_dir'].startswith('/'):
72 SConsignFile('build/%s/.scons' % build_path)
73 build_path = "#build/%s" % build_path
74else:
75 SConsignFile('%s/.scons' % build_path)
76
Anthony Barbier01bbd5f2018-11-01 15:10:51 +000077install_path = env['install_dir']
78#If the install_dir is a relative path then assume it's from inside build_dir
79if not env['install_dir'].startswith('/') and install_path != "":
80 install_path = "%s/%s" % (build_path, install_path)
81
Anthony Barbiere8a55df2018-10-26 09:05:01 +010082env.Append(LIBPATH = [build_path])
Anthony Barbier6a3daf12018-02-19 17:24:27 +000083Export('env')
84Export('vars')
Anthony Barbier6ff3b192017-09-04 18:44:23 +010085
Anthony Barbier01bbd5f2018-11-01 15:10:51 +000086def install_lib( lib ):
87 # If there is no install folder, then there is nothing to do:
88 if install_path == "":
89 return lib
90 return env.Install( "%s/lib/" % install_path, lib)
91def install_bin( bin ):
92 # If there is no install folder, then there is nothing to do:
93 if install_path == "":
94 return bin
95 return env.Install( "%s/bin/" % install_path, bin)
96def install_include( inc ):
97 if install_path == "":
98 return inc
99 return env.Install( "%s/include/" % install_path, inc)
100
101Export('install_lib')
102Export('install_bin')
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100103
104Help(vars.GenerateHelpText(env))
105
Anthony Barbier6a3daf12018-02-19 17:24:27 +0000106if env['build'] == "embed_only":
Anthony Barbiere8a55df2018-10-26 09:05:01 +0100107 SConscript('./SConscript', variant_dir=build_path, duplicate=0)
Anthony Barbier6a3daf12018-02-19 17:24:27 +0000108 Return()
109
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100110if env['neon'] and 'x86' in env['arch']:
ggardet767c9f72018-06-29 17:01:01 +0200111 print("Cannot compile NEON for x86")
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100112 Exit(1)
113
114if env['set_soname'] and not version_at_least(SCons.__version__, "2.4"):
ggardet767c9f72018-06-29 17:01:01 +0200115 print("Setting the library's SONAME / SHLIBVERSION requires SCons 2.4 or above")
116 print("Update your version of SCons or use set_soname=0")
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100117 Exit(1)
118
119if env['os'] == 'bare_metal':
120 if env['cppthreads'] or env['openmp']:
121 print("ERROR: OpenMP and C++11 threads not supported in bare_metal. Use cppthreads=0 openmp=0")
122 Exit(1)
123
Michalis Spyrou323ce0f2018-11-30 16:30:43 +0000124if not env['exceptions']:
125 if env['opencl'] or env['gles_compute']:
126 print("ERROR: OpenCL and GLES are not supported when building without exceptions. Use opencl=0 gles_compute=0")
127 Exit(1)
128
129 env.Append(CPPDEFINES = ['ARM_COMPUTE_EXCEPTIONS_DISABLED'])
130 env.Append(CXXFLAGS = ['-fno-exceptions'])
131
Michalis Spyrou6bff1952019-10-02 17:22:11 +0100132env.Append(CXXFLAGS = ['-Wall','-DARCH_ARM',
133 '-Wextra','-pedantic','-Wdisabled-optimization','-Wformat=2', '-Wno-format-nonliteral',
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100134 '-Winit-self','-Wstrict-overflow=2','-Wswitch-default',
135 '-fpermissive','-std=gnu++11','-Wno-vla','-Woverloaded-virtual',
Michalis Spyrou6bff1952019-10-02 17:22:11 +0100136 '-Wctor-dtor-privacy','-Wsign-promo','-Weffc++','-Wno-overlength-strings','-Wno-strict-overflow'])
Isabella Gottardib28f29d2017-11-09 17:05:07 +0000137
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100138env.Append(CPPDEFINES = ['_GLIBCXX_USE_NANOSLEEP'])
139
Anthony Barbiera026e982018-01-18 10:57:52 +0000140default_cpp_compiler = 'g++' if env['os'] != 'android' else 'clang++'
141default_c_compiler = 'gcc' if env['os'] != 'android' else 'clang'
142cpp_compiler = os.environ.get('CXX', default_cpp_compiler)
143c_compiler = os.environ.get('CC', default_c_compiler)
144
Anthony Barbierdd669372018-03-01 17:08:54 +0000145if env['os'] == 'android' and ( 'clang++' not in cpp_compiler or 'clang' not in c_compiler ):
ggardet767c9f72018-06-29 17:01:01 +0200146 print( "WARNING: Only clang is officially supported to build the Compute Library for Android")
Anthony Barbiera026e982018-01-18 10:57:52 +0000147
Anthony Barbierdd669372018-03-01 17:08:54 +0000148if 'clang++' in cpp_compiler:
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100149 env.Append(CXXFLAGS = ['-Wno-format-nonliteral','-Wno-deprecated-increment-bool','-Wno-vla-extension','-Wno-mismatched-tags'])
Georgios Pinitase874ef92019-09-09 17:40:33 +0100150elif 'armclang' in cpp_compiler:
151 pass
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100152else:
Michalis Spyrou52016542019-06-11 13:38:24 +0100153 env.Append(CXXFLAGS = ['-Wlogical-op','-Wnoexcept','-Wstrict-null-sentinel', '-Wno-redundant-move'])
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100154
155if env['cppthreads']:
156 env.Append(CPPDEFINES = [('ARM_COMPUTE_CPP_SCHEDULER', 1)])
157
158if env['openmp']:
Anthony Barbierdd669372018-03-01 17:08:54 +0000159 if 'clang++' in cpp_compiler:
ggardet767c9f72018-06-29 17:01:01 +0200160 print( "Clang does not support OpenMP. Use scheduler=cpp.")
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100161 Exit(1)
162
163 env.Append(CPPDEFINES = [('ARM_COMPUTE_OPENMP_SCHEDULER', 1)])
164 env.Append(CXXFLAGS = ['-fopenmp'])
165 env.Append(LINKFLAGS = ['-fopenmp'])
166
Georgios Pinitase874ef92019-09-09 17:40:33 +0100167# Add architecture specific flags
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100168prefix = ""
169if env['arch'] == 'armv7a':
170 env.Append(CXXFLAGS = ['-march=armv7-a', '-mthumb', '-mfpu=neon'])
171
Michalis Spyrou07781ac2017-08-31 15:11:41 +0100172 if env['os'] == 'linux':
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100173 prefix = "arm-linux-gnueabihf-"
174 env.Append(CXXFLAGS = ['-mfloat-abi=hard'])
Michalis Spyrou07781ac2017-08-31 15:11:41 +0100175 elif env['os'] == 'bare_metal':
Michalis Spyrou6e52ba32017-10-04 15:40:38 +0100176 prefix = "arm-eabi-"
Michalis Spyrou07781ac2017-08-31 15:11:41 +0100177 env.Append(CXXFLAGS = ['-mfloat-abi=hard'])
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100178 elif env['os'] == 'android':
179 prefix = "arm-linux-androideabi-"
180 env.Append(CXXFLAGS = ['-mfloat-abi=softfp'])
181elif env['arch'] == 'arm64-v8a':
182 env.Append(CXXFLAGS = ['-march=armv8-a'])
Georgios Pinitasbc88c622019-09-25 17:52:07 +0100183 env.Append(CPPDEFINES = ['ARM_COMPUTE_AARCH64_V8A'])
Michalis Spyrou07781ac2017-08-31 15:11:41 +0100184 if env['os'] == 'linux':
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100185 prefix = "aarch64-linux-gnu-"
Michalis Spyrou07781ac2017-08-31 15:11:41 +0100186 elif env['os'] == 'bare_metal':
Michalis Spyrou6e52ba32017-10-04 15:40:38 +0100187 prefix = "aarch64-elf-"
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100188 elif env['os'] == 'android':
189 prefix = "aarch64-linux-android-"
Georgios Pinitas421405b2018-10-26 19:05:32 +0100190elif 'arm64-v8.2-a' in env['arch']:
191 if env['arch'] == 'arm64-v8.2-a-sve':
Georgios Pinitas421405b2018-10-26 19:05:32 +0100192 env.Append(CXXFLAGS = ['-march=armv8.2-a+sve+fp16+dotprod'])
193 else:
194 env.Append(CXXFLAGS = ['-march=armv8.2-a+fp16']) # explicitly enable fp16 extension otherwise __ARM_FEATURE_FP16_VECTOR_ARITHMETIC is undefined
Georgios Pinitas37d080f2019-06-21 18:43:12 +0100195 if env['os'] == 'linux':
196 prefix = "aarch64-linux-gnu-"
197 elif env['os'] == 'bare_metal':
198 prefix = "aarch64-elf-"
199 elif env['os'] == 'android':
200 prefix = "aarch64-linux-android-"
Georgios Pinitasbc88c622019-09-25 17:52:07 +0100201 env.Append(CPPDEFINES = ['ARM_COMPUTE_AARCH64_V8_2'])
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100202elif env['arch'] == 'x86_32':
203 env.Append(CCFLAGS = ['-m32'])
204 env.Append(LINKFLAGS = ['-m32'])
205elif env['arch'] == 'x86_64':
Michalis Spyrou3814b302019-03-14 16:51:31 +0000206 env.Append(CXXFLAGS = ['-fPIC'])
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100207 env.Append(CCFLAGS = ['-m64'])
208 env.Append(LINKFLAGS = ['-m64'])
209
210if env['build'] == 'native':
211 prefix = ""
212
Anthony Barbier149de5b2018-12-06 10:27:37 +0000213if env["toolchain_prefix"] != "":
214 prefix = env["toolchain_prefix"]
215
Anthony Barbier7390e052018-03-13 09:29:41 +0000216env['CC'] = env['compiler_cache']+" "+prefix + c_compiler
217env['CXX'] = env['compiler_cache']+" "+prefix + cpp_compiler
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100218env['LD'] = prefix + "ld"
219env['AS'] = prefix + "as"
220env['AR'] = prefix + "ar"
221env['RANLIB'] = prefix + "ranlib"
222
223if not GetOption("help"):
224 try:
Anthony Barbier907dba82017-08-25 10:11:39 +0100225 compiler_ver = subprocess.check_output(env['CXX'].split() + ["-dumpversion"]).strip()
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100226 except OSError:
227 print("ERROR: Compiler '%s' not found" % env['CXX'])
228 Exit(1)
229
Georgios Pinitase874ef92019-09-09 17:40:33 +0100230 if 'armclang' in cpp_compiler:
231 pass
232 elif 'clang++' not in cpp_compiler:
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100233 if env['arch'] == 'arm64-v8.2-a' and not version_at_least(compiler_ver, '6.2.1'):
ggardet767c9f72018-06-29 17:01:01 +0200234 print("GCC 6.2.1 or newer is required to compile armv8.2-a code")
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100235 Exit(1)
236 elif env['arch'] == 'arm64-v8a' and not version_at_least(compiler_ver, '4.9'):
ggardet767c9f72018-06-29 17:01:01 +0200237 print("GCC 4.9 or newer is required to compile NEON code for AArch64")
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100238 Exit(1)
239
240 if version_at_least(compiler_ver, '6.1'):
241 env.Append(CXXFLAGS = ['-Wno-ignored-attributes'])
242
243 if compiler_ver == '4.8.3':
244 env.Append(CXXFLAGS = ['-Wno-array-bounds'])
245
Pablo Telloc6cb35a2017-06-21 15:39:47 +0100246if env['standalone']:
247 env.Append(CXXFLAGS = ['-fPIC'])
Anthony Barbier665c89b2018-07-16 11:40:09 +0100248 env.Append(LINKFLAGS = ['-static-libgcc','-static-libstdc++'])
Pablo Telloc6cb35a2017-06-21 15:39:47 +0100249
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100250if env['Werror']:
251 env.Append(CXXFLAGS = ['-Werror'])
252
253if env['os'] == 'android':
254 env.Append(CPPDEFINES = ['ANDROID'])
Anthony Barbier665c89b2018-07-16 11:40:09 +0100255 env.Append(LINKFLAGS = ['-pie', '-static-libstdc++'])
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100256elif env['os'] == 'bare_metal':
257 env.Append(LINKFLAGS = ['-static'])
Michalis Spyrou07781ac2017-08-31 15:11:41 +0100258 env.Append(LINKFLAGS = ['-specs=rdimon.specs'])
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100259 env.Append(CXXFLAGS = ['-fPIC'])
260 env.Append(CPPDEFINES = ['NO_MULTI_THREADING'])
Michalis Spyrou07781ac2017-08-31 15:11:41 +0100261 env.Append(CPPDEFINES = ['BARE_METAL'])
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100262
263if env['opencl']:
Georgios Pinitase6032da2017-10-26 14:13:35 +0100264 if env['os'] in ['bare_metal'] or env['standalone']:
Anthony Barbier5f0124d2018-04-13 14:05:34 +0100265 print("Cannot link OpenCL statically, which is required for bare metal / standalone builds")
266 Exit(1)
267
268if env['gles_compute']:
269 if env['os'] in ['bare_metal'] or env['standalone']:
270 print("Cannot link OpenGLES statically, which is required for bare metal / standalone builds")
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100271 Exit(1)
272
Anthony Barbier9fb0cac2018-04-20 15:46:21 +0100273if env["os"] not in ["android", "bare_metal"] and (env['opencl'] or env['cppthreads']):
274 env.Append(LIBS = ['pthread'])
275
Anthony Barbier7068f992017-10-26 15:23:08 +0100276if env['opencl'] or env['gles_compute']:
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100277 if env['embed_kernels']:
278 env.Append(CPPDEFINES = ['EMBEDDED_KERNELS'])
279
280if env['debug']:
281 env['asserts'] = True
Georgios Pinitas3faea252017-10-30 14:13:50 +0000282 env['logging'] = True
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100283 env.Append(CXXFLAGS = ['-O0','-g','-gdwarf-2'])
284 env.Append(CPPDEFINES = ['ARM_COMPUTE_DEBUG_ENABLED'])
285else:
Ramana Radhakrishnand176d542019-07-04 11:38:45 +0100286 env.Append(CXXFLAGS = ['-O3'])
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100287
288if env['asserts']:
289 env.Append(CPPDEFINES = ['ARM_COMPUTE_ASSERTS_ENABLED'])
Moritz Pflanzer8b74c782017-09-14 14:33:20 +0100290 env.Append(CXXFLAGS = ['-fstack-protector-strong'])
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100291
Georgios Pinitas7d3d1b92017-10-12 17:34:20 +0100292if env['logging']:
293 env.Append(CPPDEFINES = ['ARM_COMPUTE_LOGGING_ENABLED'])
294
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100295env.Append(CPPPATH = ['#/include', "#"])
296env.Append(CXXFLAGS = env['extra_cxx_flags'])
Georgios Pinitas421405b2018-10-26 19:05:32 +0100297env.Append(LINKFLAGS = env['extra_link_flags'])
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100298
Anthony Barbier01bbd5f2018-11-01 15:10:51 +0000299Default( install_include("arm_compute"))
Anthony Barbier10565952018-11-15 09:50:06 +0000300Default( install_include("support"))
Michele Di Giorgio6afea902019-04-03 11:40:20 +0100301Default( install_include("utils"))
302for dirname in os.listdir("./include"):
303 Default( install_include("include/%s" % dirname))
Anthony Barbier01bbd5f2018-11-01 15:10:51 +0000304
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100305Export('version_at_least')
306
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100307if env['opencl']:
Anthony Barbiere8a55df2018-10-26 09:05:01 +0100308 SConscript("./opencl-1.2-stubs/SConscript", variant_dir="%s/opencl-1.2-stubs" % build_path, duplicate=0)
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100309
Anthony Barbier7068f992017-10-26 15:23:08 +0100310if env['gles_compute'] and env['os'] != 'android':
Anthony Barbier14c86a92017-12-14 16:27:41 +0000311 env.Append(CPPPATH = ['#/include/linux'])
Anthony Barbiere8a55df2018-10-26 09:05:01 +0100312 SConscript("./opengles-3.1-stubs/SConscript", variant_dir="%s/opengles-3.1-stubs" % build_path, duplicate=0)
Anthony Barbier7068f992017-10-26 15:23:08 +0100313
Anthony Barbiere8a55df2018-10-26 09:05:01 +0100314SConscript('./SConscript', variant_dir=build_path, duplicate=0)
Anthony Barbier6c0348f2017-11-10 18:32:38 +0000315
Michalis Spyrou323ce0f2018-11-30 16:30:43 +0000316if env['examples'] and env['os'] != 'bare_metal' and env['exceptions']:
Anthony Barbiere8a55df2018-10-26 09:05:01 +0100317 SConscript('./examples/SConscript', variant_dir='%s/examples' % build_path, duplicate=0)
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100318
Michalis Spyrou323ce0f2018-11-30 16:30:43 +0000319if env['os'] != 'bare_metal' and env['exceptions']:
Anthony Barbiere8a55df2018-10-26 09:05:01 +0100320 SConscript('./tests/SConscript', variant_dir='%s/tests' % build_path, duplicate=0)