Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1 | # 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 | |
| 23 | import SCons |
| 24 | import os |
| 25 | import subprocess |
| 26 | |
| 27 | def 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 | |
| 38 | vars = Variables("scons") |
| 39 | vars.AddVariables( |
| 40 | BoolVariable("debug", "Debug", False), |
| 41 | BoolVariable("asserts", "Enable asserts (this flag is forced to 1 for debug=1)", False), |
Georgios Pinitas | 3faea25 | 2017-10-30 14:13:50 +0000 | [diff] [blame] | 42 | BoolVariable("logging", "Logging (this flag is forced to 1 for debug=1)", False), |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 43 | EnumVariable("arch", "Target Architecture", "armv7a", allowed_values=("armv7a", "arm64-v8a", "arm64-v8.2-a", "x86_32", "x86_64")), |
| 44 | EnumVariable("os", "Target OS", "linux", allowed_values=("linux", "android", "bare_metal")), |
Anthony Barbier | 6a3daf1 | 2018-02-19 17:24:27 +0000 | [diff] [blame] | 45 | EnumVariable("build", "Build type", "cross_compile", allowed_values=("native", "cross_compile", "embed_only")), |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 46 | BoolVariable("examples", "Build example programs", True), |
| 47 | BoolVariable("Werror", "Enable/disable the -Werror compilation flag", True), |
Pablo Tello | c6cb35a | 2017-06-21 15:39:47 +0100 | [diff] [blame] | 48 | BoolVariable("standalone", "Builds the tests as standalone executables, links statically with libgcc, libstdc++ and libarm_compute", False), |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 49 | BoolVariable("opencl", "Enable OpenCL support", True), |
| 50 | BoolVariable("neon", "Enable Neon support", False), |
Anthony Barbier | 7068f99 | 2017-10-26 15:23:08 +0100 | [diff] [blame] | 51 | BoolVariable("gles_compute", "Enable OpenGL ES Compute Shader support", False), |
Anthony Barbier | cc0a80b | 2017-12-15 11:37:29 +0000 | [diff] [blame] | 52 | BoolVariable("embed_kernels", "Embed OpenCL kernels and OpenGL ES compute shaders in library binary", True), |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 53 | BoolVariable("set_soname", "Set the library's soname and shlibversion (requires SCons 2.4 or above)", False), |
| 54 | BoolVariable("openmp", "Enable OpenMP backend", False), |
| 55 | BoolVariable("cppthreads", "Enable C++11 threads backend", True), |
| 56 | PathVariable("build_dir", "Specify sub-folder for the build", ".", PathVariable.PathAccept), |
Anthony Barbier | a4e5e1e | 2017-10-05 14:55:34 +0100 | [diff] [blame] | 57 | #FIXME Remove before release (And remove all references to INTERNAL_ONLY) |
| 58 | BoolVariable("internal_only", "Enable ARM internal only tests", True), |
Anthony Barbier | 7390e05 | 2018-03-13 09:29:41 +0000 | [diff] [blame] | 59 | ("extra_cxx_flags", "Extra CXX flags to be appended to the build command", ""), |
| 60 | ("compiler_cache", "Command to prefix to the C and C++ compiler (e.g ccache)", "") |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 61 | ) |
| 62 | |
| 63 | env = Environment(platform="posix", variables=vars, ENV = os.environ) |
Anthony Barbier | b2881fc | 2017-09-29 17:12:12 +0100 | [diff] [blame] | 64 | env.Append(LIBPATH = ["#build/%s" % env['build_dir']]) |
Anthony Barbier | 6a3daf1 | 2018-02-19 17:24:27 +0000 | [diff] [blame] | 65 | Export('env') |
| 66 | Export('vars') |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 67 | |
| 68 | SConsignFile('build/.%s' % env['build_dir']) |
| 69 | |
| 70 | Help(vars.GenerateHelpText(env)) |
| 71 | |
Anthony Barbier | 6a3daf1 | 2018-02-19 17:24:27 +0000 | [diff] [blame] | 72 | if env['build'] == "embed_only": |
| 73 | SConscript('./SConscript', variant_dir='#build/%s' % env['build_dir'], duplicate=0) |
| 74 | Return() |
| 75 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 76 | if env['neon'] and 'x86' in env['arch']: |
| 77 | print "Cannot compile NEON for x86" |
| 78 | Exit(1) |
| 79 | |
| 80 | if env['set_soname'] and not version_at_least(SCons.__version__, "2.4"): |
| 81 | print "Setting the library's SONAME / SHLIBVERSION requires SCons 2.4 or above" |
| 82 | print "Update your version of SCons or use set_soname=0" |
| 83 | Exit(1) |
| 84 | |
| 85 | if env['os'] == 'bare_metal': |
| 86 | if env['cppthreads'] or env['openmp']: |
| 87 | print("ERROR: OpenMP and C++11 threads not supported in bare_metal. Use cppthreads=0 openmp=0") |
| 88 | Exit(1) |
| 89 | |
| 90 | env.Append(CXXFLAGS = ['-Wno-deprecated-declarations','-Wall','-DARCH_ARM', |
| 91 | '-Wextra','-Wno-unused-parameter','-pedantic','-Wdisabled-optimization','-Wformat=2', |
| 92 | '-Winit-self','-Wstrict-overflow=2','-Wswitch-default', |
| 93 | '-fpermissive','-std=gnu++11','-Wno-vla','-Woverloaded-virtual', |
Anthony Barbier | 6fa009e | 2018-02-16 16:49:39 +0000 | [diff] [blame] | 94 | '-Wctor-dtor-privacy','-Wsign-promo','-Weffc++','-Wno-format-nonliteral','-Wno-overlength-strings','-Wno-strict-overflow','-Wno-implicit-fallthrough']) |
Isabella Gottardi | b28f29d | 2017-11-09 17:05:07 +0000 | [diff] [blame] | 95 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 96 | env.Append(CPPDEFINES = ['_GLIBCXX_USE_NANOSLEEP']) |
| 97 | |
Anthony Barbier | a026e98 | 2018-01-18 10:57:52 +0000 | [diff] [blame] | 98 | default_cpp_compiler = 'g++' if env['os'] != 'android' else 'clang++' |
| 99 | default_c_compiler = 'gcc' if env['os'] != 'android' else 'clang' |
| 100 | cpp_compiler = os.environ.get('CXX', default_cpp_compiler) |
| 101 | c_compiler = os.environ.get('CC', default_c_compiler) |
| 102 | |
Anthony Barbier | dd66937 | 2018-03-01 17:08:54 +0000 | [diff] [blame] | 103 | if env['os'] == 'android' and ( 'clang++' not in cpp_compiler or 'clang' not in c_compiler ): |
Anthony Barbier | a026e98 | 2018-01-18 10:57:52 +0000 | [diff] [blame] | 104 | print "WARNING: Only clang is officially supported to build the Compute Library for Android" |
| 105 | |
Anthony Barbier | dd66937 | 2018-03-01 17:08:54 +0000 | [diff] [blame] | 106 | if 'clang++' in cpp_compiler: |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 107 | env.Append(CXXFLAGS = ['-Wno-format-nonliteral','-Wno-deprecated-increment-bool','-Wno-vla-extension','-Wno-mismatched-tags']) |
| 108 | else: |
| 109 | env.Append(CXXFLAGS = ['-Wlogical-op','-Wnoexcept','-Wstrict-null-sentinel']) |
| 110 | |
| 111 | if env['cppthreads']: |
| 112 | env.Append(CPPDEFINES = [('ARM_COMPUTE_CPP_SCHEDULER', 1)]) |
| 113 | |
| 114 | if env['openmp']: |
Anthony Barbier | dd66937 | 2018-03-01 17:08:54 +0000 | [diff] [blame] | 115 | if 'clang++' in cpp_compiler: |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 116 | print "Clang does not support OpenMP. Use scheduler=cpp." |
| 117 | Exit(1) |
| 118 | |
| 119 | env.Append(CPPDEFINES = [('ARM_COMPUTE_OPENMP_SCHEDULER', 1)]) |
| 120 | env.Append(CXXFLAGS = ['-fopenmp']) |
| 121 | env.Append(LINKFLAGS = ['-fopenmp']) |
| 122 | |
| 123 | prefix = "" |
| 124 | if env['arch'] == 'armv7a': |
| 125 | env.Append(CXXFLAGS = ['-march=armv7-a', '-mthumb', '-mfpu=neon']) |
| 126 | |
Michalis Spyrou | 07781ac | 2017-08-31 15:11:41 +0100 | [diff] [blame] | 127 | if env['os'] == 'linux': |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 128 | prefix = "arm-linux-gnueabihf-" |
| 129 | env.Append(CXXFLAGS = ['-mfloat-abi=hard']) |
Michalis Spyrou | 07781ac | 2017-08-31 15:11:41 +0100 | [diff] [blame] | 130 | elif env['os'] == 'bare_metal': |
Michalis Spyrou | 6e52ba3 | 2017-10-04 15:40:38 +0100 | [diff] [blame] | 131 | prefix = "arm-eabi-" |
Michalis Spyrou | 07781ac | 2017-08-31 15:11:41 +0100 | [diff] [blame] | 132 | env.Append(CXXFLAGS = ['-mfloat-abi=hard']) |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 133 | elif env['os'] == 'android': |
| 134 | prefix = "arm-linux-androideabi-" |
| 135 | env.Append(CXXFLAGS = ['-mfloat-abi=softfp']) |
| 136 | elif env['arch'] == 'arm64-v8a': |
| 137 | env.Append(CXXFLAGS = ['-march=armv8-a']) |
Pablo Tello | eb82fd2 | 2018-02-23 13:43:50 +0000 | [diff] [blame] | 138 | env.Append(CPPDEFINES = ['ARM_COMPUTE_AARCH64_V8A','NO_DOT_IN_TOOLCHAIN']) |
Michalis Spyrou | 07781ac | 2017-08-31 15:11:41 +0100 | [diff] [blame] | 139 | if env['os'] == 'linux': |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 140 | prefix = "aarch64-linux-gnu-" |
Michalis Spyrou | 07781ac | 2017-08-31 15:11:41 +0100 | [diff] [blame] | 141 | elif env['os'] == 'bare_metal': |
Michalis Spyrou | 6e52ba3 | 2017-10-04 15:40:38 +0100 | [diff] [blame] | 142 | prefix = "aarch64-elf-" |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 143 | elif env['os'] == 'android': |
| 144 | prefix = "aarch64-linux-android-" |
Anthony Barbier | 2539dd2 | 2018-03-15 14:16:52 +0000 | [diff] [blame] | 145 | if 'clang++' in cpp_compiler: |
Pablo Tello | eb82fd2 | 2018-02-23 13:43:50 +0000 | [diff] [blame] | 146 | env.Append(CXXFLAGS = ['-no-integrated-as']) |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 147 | elif env['arch'] == 'arm64-v8.2-a': |
Pablo Tello | fa7dc84 | 2018-01-25 10:48:46 +0000 | [diff] [blame] | 148 | env.Append(CXXFLAGS = ['-march=armv8.2-a+fp16']) # explicitly enable fp16 extension otherwise __ARM_FEATURE_FP16_VECTOR_ARITHMETIC is undefined |
Pablo Tello | eb82fd2 | 2018-02-23 13:43:50 +0000 | [diff] [blame] | 149 | env.Append(CPPDEFINES = ['ARM_COMPUTE_AARCH64_V8_2','NO_DOT_IN_TOOLCHAIN']) |
Anthony Barbier | dd66937 | 2018-03-01 17:08:54 +0000 | [diff] [blame] | 150 | if 'clang++' in cpp_compiler: |
Anthony Barbier | 2539dd2 | 2018-03-15 14:16:52 +0000 | [diff] [blame] | 151 | env.Append(CXXFLAGS = ['-no-integrated-as']) |
Pablo Tello | 9e40cf7 | 2017-09-15 16:14:55 +0100 | [diff] [blame] | 152 | if env['os'] == 'linux': |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 153 | prefix = "aarch64-linux-gnu-" |
Pablo Tello | 9e40cf7 | 2017-09-15 16:14:55 +0100 | [diff] [blame] | 154 | elif env['os'] == 'bare_metal': |
| 155 | prefix = "aarch64-elf-" |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 156 | elif env['os'] == 'android': |
| 157 | prefix = "aarch64-linux-android-" |
| 158 | elif env['arch'] == 'x86_32': |
| 159 | env.Append(CCFLAGS = ['-m32']) |
| 160 | env.Append(LINKFLAGS = ['-m32']) |
| 161 | elif env['arch'] == 'x86_64': |
| 162 | env.Append(CCFLAGS = ['-m64']) |
| 163 | env.Append(LINKFLAGS = ['-m64']) |
| 164 | |
| 165 | if env['build'] == 'native': |
| 166 | prefix = "" |
| 167 | |
Anthony Barbier | 7390e05 | 2018-03-13 09:29:41 +0000 | [diff] [blame] | 168 | env['CC'] = env['compiler_cache']+" "+prefix + c_compiler |
| 169 | env['CXX'] = env['compiler_cache']+" "+prefix + cpp_compiler |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 170 | env['LD'] = prefix + "ld" |
| 171 | env['AS'] = prefix + "as" |
| 172 | env['AR'] = prefix + "ar" |
| 173 | env['RANLIB'] = prefix + "ranlib" |
| 174 | |
| 175 | if not GetOption("help"): |
| 176 | try: |
Anthony Barbier | 907dba8 | 2017-08-25 10:11:39 +0100 | [diff] [blame] | 177 | compiler_ver = subprocess.check_output(env['CXX'].split() + ["-dumpversion"]).strip() |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 178 | except OSError: |
| 179 | print("ERROR: Compiler '%s' not found" % env['CXX']) |
| 180 | Exit(1) |
| 181 | |
Anthony Barbier | dd66937 | 2018-03-01 17:08:54 +0000 | [diff] [blame] | 182 | if 'clang++' not in cpp_compiler: |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 183 | if env['arch'] == 'arm64-v8.2-a' and not version_at_least(compiler_ver, '6.2.1'): |
| 184 | print "GCC 6.2.1 or newer is required to compile armv8.2-a code" |
| 185 | Exit(1) |
| 186 | elif env['arch'] == 'arm64-v8a' and not version_at_least(compiler_ver, '4.9'): |
| 187 | print "GCC 4.9 or newer is required to compile NEON code for AArch64" |
| 188 | Exit(1) |
| 189 | |
| 190 | if version_at_least(compiler_ver, '6.1'): |
| 191 | env.Append(CXXFLAGS = ['-Wno-ignored-attributes']) |
| 192 | |
| 193 | if compiler_ver == '4.8.3': |
| 194 | env.Append(CXXFLAGS = ['-Wno-array-bounds']) |
| 195 | |
Pablo Tello | c6cb35a | 2017-06-21 15:39:47 +0100 | [diff] [blame] | 196 | if env['standalone']: |
| 197 | env.Append(CXXFLAGS = ['-fPIC']) |
| 198 | env.Append(LINKFLAGS = ['-static-libgcc','-static-libstdc++']) |
Pablo Tello | 8951933 | 2017-11-17 11:52:36 +0000 | [diff] [blame] | 199 | if env['cppthreads']: |
| 200 | env.Append(LINKFLAGS = ['-lpthread']) |
Pablo Tello | c6cb35a | 2017-06-21 15:39:47 +0100 | [diff] [blame] | 201 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 202 | if env['Werror']: |
| 203 | env.Append(CXXFLAGS = ['-Werror']) |
| 204 | |
| 205 | if env['os'] == 'android': |
| 206 | env.Append(CPPDEFINES = ['ANDROID']) |
Georgios Pinitas | 9873ea3 | 2017-12-05 15:28:55 +0000 | [diff] [blame] | 207 | env.Append(LINKFLAGS = ['-pie', '-static-libstdc++']) |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 208 | elif env['os'] == 'bare_metal': |
| 209 | env.Append(LINKFLAGS = ['-static']) |
Michalis Spyrou | 07781ac | 2017-08-31 15:11:41 +0100 | [diff] [blame] | 210 | env.Append(LINKFLAGS = ['-specs=rdimon.specs']) |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 211 | env.Append(CXXFLAGS = ['-fPIC']) |
| 212 | env.Append(CPPDEFINES = ['NO_MULTI_THREADING']) |
Michalis Spyrou | 07781ac | 2017-08-31 15:11:41 +0100 | [diff] [blame] | 213 | env.Append(CPPDEFINES = ['BARE_METAL']) |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 214 | |
| 215 | if env['opencl']: |
Georgios Pinitas | e6032da | 2017-10-26 14:13:35 +0100 | [diff] [blame] | 216 | if env['os'] in ['bare_metal'] or env['standalone']: |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 217 | print("Cannot link OpenCL statically, which is required on bare metal") |
| 218 | Exit(1) |
| 219 | |
Anthony Barbier | 7068f99 | 2017-10-26 15:23:08 +0100 | [diff] [blame] | 220 | if env['opencl'] or env['gles_compute']: |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 221 | if env['embed_kernels']: |
| 222 | env.Append(CPPDEFINES = ['EMBEDDED_KERNELS']) |
| 223 | |
| 224 | if env['debug']: |
| 225 | env['asserts'] = True |
Georgios Pinitas | 3faea25 | 2017-10-30 14:13:50 +0000 | [diff] [blame] | 226 | env['logging'] = True |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 227 | env.Append(CXXFLAGS = ['-O0','-g','-gdwarf-2']) |
| 228 | env.Append(CPPDEFINES = ['ARM_COMPUTE_DEBUG_ENABLED']) |
| 229 | else: |
| 230 | env.Append(CXXFLAGS = ['-O3','-ftree-vectorize']) |
| 231 | |
| 232 | if env['asserts']: |
| 233 | env.Append(CPPDEFINES = ['ARM_COMPUTE_ASSERTS_ENABLED']) |
Moritz Pflanzer | 8b74c78 | 2017-09-14 14:33:20 +0100 | [diff] [blame] | 234 | env.Append(CXXFLAGS = ['-fstack-protector-strong']) |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 235 | |
Georgios Pinitas | 7d3d1b9 | 2017-10-12 17:34:20 +0100 | [diff] [blame] | 236 | if env['logging']: |
| 237 | env.Append(CPPDEFINES = ['ARM_COMPUTE_LOGGING_ENABLED']) |
| 238 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 239 | env.Append(CPPPATH = ['#/include', "#"]) |
| 240 | env.Append(CXXFLAGS = env['extra_cxx_flags']) |
| 241 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 242 | Export('version_at_least') |
| 243 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 244 | if env['opencl']: |
| 245 | SConscript("./opencl-1.2-stubs/SConscript", variant_dir="build/%s/opencl-1.2-stubs" % env['build_dir'], duplicate=0) |
| 246 | |
Anthony Barbier | 7068f99 | 2017-10-26 15:23:08 +0100 | [diff] [blame] | 247 | if env['gles_compute'] and env['os'] != 'android': |
Anthony Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 248 | env.Append(CPPPATH = ['#/include/linux']) |
Anthony Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 249 | SConscript("./opengles-3.1-stubs/SConscript", variant_dir="build/%s/opengles-3.1-stubs" % env['build_dir'], duplicate=0) |
Anthony Barbier | 7068f99 | 2017-10-26 15:23:08 +0100 | [diff] [blame] | 250 | |
Anthony Barbier | 6c0348f | 2017-11-10 18:32:38 +0000 | [diff] [blame] | 251 | SConscript('./SConscript', variant_dir='#build/%s' % env['build_dir'], duplicate=0) |
| 252 | |
Michalis Spyrou | 6e52ba3 | 2017-10-04 15:40:38 +0100 | [diff] [blame] | 253 | if env['examples'] and env['os'] != 'bare_metal': |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 254 | SConscript('./examples/SConscript', variant_dir='#build/%s/examples' % env['build_dir'], duplicate=0) |
| 255 | |
Pablo Tello | 9e40cf7 | 2017-09-15 16:14:55 +0100 | [diff] [blame] | 256 | if env['os'] != 'bare_metal': |
| 257 | SConscript('./tests/SConscript', variant_dir='#build/%s/tests' % env['build_dir'], duplicate=0) |