aboutsummaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2019-10-07 13:00:44 +0100
committerMichalis Spyrou <michalis.spyrou@arm.com>2019-12-20 14:04:51 +0000
commit748a7c81245ae81d04607b3a762cf65cd39026f2 (patch)
tree21ac8ad379989fde4aa73e6cf5814c6182f2c3d8 /SConstruct
parent37cbc5781ac0aa5106941d0386070d6dc9958a2a (diff)
downloadComputeLibrary-748a7c81245ae81d04607b3a762cf65cd39026f2.tar.gz
COMPMID-2706: Add the ability to build bootcode for bare metal
Adds an option for providing a linker script and also adds the bootcode folder, it it exists, in the build path and links it with the executable binaries. Change-Id: I4119b21bdf1b4dd7fe38c4ee66741460666f53a1 Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Reviewed-on: https://review.mlplatform.org/c/2051 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct15
1 files changed, 13 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct
index 216920f059..139c0e568a 100644
--- a/SConstruct
+++ b/SConstruct
@@ -59,6 +59,7 @@ vars.AddVariables(
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),
+ PathVariable("linker_script", "Use an external linker script", "", PathVariable.PathAccept),
#FIXME Remove before release (And remove all references to INTERNAL_ONLY)
BoolVariable("internal_only", "Enable ARM internal only tests", False),
("toolchain_prefix", "Override the toolchain prefix", ""),
@@ -105,6 +106,10 @@ Export('install_bin')
Help(vars.GenerateHelpText(env))
+if env['linker_script'] and env['os'] != 'bare_metal':
+ print("Linker script is only supported for bare_metal builds")
+ Exit(1)
+
if env['build'] == "embed_only":
SConscript('./SConscript', variant_dir=build_path, duplicate=0)
Return()
@@ -330,8 +335,14 @@ if env['gles_compute'] and env['os'] != 'android':
SConscript('./SConscript', variant_dir=build_path, duplicate=0)
-if env['examples'] and env['os'] != 'bare_metal' and env['exceptions']:
+if env['examples'] and env['exceptions']:
+ if env['os'] == 'bare_metal' and env['arch'] == 'armv7a':
+ print("Building examples for bare metal and armv7a is not supported. Use examples=0.")
+ Exit(1)
SConscript('./examples/SConscript', variant_dir='%s/examples' % build_path, duplicate=0)
-if env['os'] != 'bare_metal' and env['exceptions']:
+if env['exceptions']:
+ if env['os'] == 'bare_metal' and env['arch'] == 'armv7a':
+ print("WARNING: Building tests for bare metal and armv7a is not supported")
+ Return()
SConscript('./tests/SConscript', variant_dir='%s/tests' % build_path, duplicate=0)