arm_compute v19.02

Change-Id: I853a3ecf38f206da13c1b03640c8adf73c20477c
diff --git a/SConstruct b/SConstruct
index ce7ef6a..7d396fa 100644
--- a/SConstruct
+++ b/SConstruct
@@ -55,6 +55,8 @@
     BoolVariable("cppthreads", "Enable C++11 threads backend", True),
     PathVariable("build_dir", "Specify sub-folder for the build", ".", PathVariable.PathAccept),
     PathVariable("install_dir", "Specify sub-folder for the install", "", PathVariable.PathAccept),
+    BoolVariable("exceptions", "Enable/disable C++ exception support", True),
+    ("toolchain_prefix", "Override the toolchain prefix", ""),
     ("extra_cxx_flags", "Extra CXX flags to be appended to the build command", ""),
     ("extra_link_flags", "Extra LD flags to be appended to the build command", ""),
     ("compiler_cache", "Command to prefix to the C and C++ compiler (e.g ccache)", "")
@@ -116,6 +118,14 @@
          print("ERROR: OpenMP and C++11 threads not supported in bare_metal. Use cppthreads=0 openmp=0")
          Exit(1)
 
+if not env['exceptions']:
+    if env['opencl'] or env['gles_compute']:
+         print("ERROR: OpenCL and GLES are not supported when building without exceptions. Use opencl=0 gles_compute=0")
+         Exit(1)
+
+    env.Append(CPPDEFINES = ['ARM_COMPUTE_EXCEPTIONS_DISABLED'])
+    env.Append(CXXFLAGS = ['-fno-exceptions'])
+
 env.Append(CXXFLAGS = ['-Wno-deprecated-declarations','-Wall','-DARCH_ARM',
          '-Wextra','-Wno-unused-parameter','-pedantic','-Wdisabled-optimization','-Wformat=2',
          '-Winit-self','-Wstrict-overflow=2','-Wswitch-default',
@@ -200,6 +210,9 @@
 if env['build'] == 'native':
     prefix = ""
 
+if env["toolchain_prefix"] != "":
+    prefix = env["toolchain_prefix"]
+
 env['CC'] = env['compiler_cache']+" "+prefix + c_compiler
 env['CXX'] = env['compiler_cache']+" "+prefix + cpp_compiler
 env['LD'] = prefix + "ld"
@@ -295,8 +308,8 @@
 
 SConscript('./SConscript', variant_dir=build_path, duplicate=0)
 
-if env['examples'] and env['os'] != 'bare_metal':
+if env['examples'] and env['os'] != 'bare_metal' and env['exceptions']:
     SConscript('./examples/SConscript', variant_dir='%s/examples' % build_path, duplicate=0)
 
-if env['os'] != 'bare_metal':
+if env['os'] != 'bare_metal' and env['exceptions']:
     SConscript('./tests/SConscript', variant_dir='%s/tests' % build_path, duplicate=0)