Support specifying which architecture to target
This patch adds the `target_arch` configuration variable to scons. It
allows the user to build vixl for either AArch32, AArch64 or both.
The default configuration are changed slightly with this patch:
- On architectures other than AArch32 (x86_64), we build VIXL for both
AArch32 and AArch64. If the architecture is not AArch64, this will
include the simulator.
- On AArch32, including cross-compiling, we build VIXL for AArch32
only. The reason for this is VIXL's AArch64 target does not build on a
32 bit platform yet.
Of course, the user can override this by setting `target_arch`.
Finally, we have dropped the use of `platform.machine()` from
`SConstruct` as it doesn't cope with cross-compilation. Instead, we
directly query the compiler using the `-dumpmachine` option which print
the target triplet. This will set the `host_arch` variable which will
then influence `target_arch`.
Change-Id: I5f9fbc1343e0957475a2a8309bca00c4d35a7724
diff --git a/tools/test.py b/tools/test.py
index 7a08ac1..d92f708 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -225,9 +225,9 @@
help='Do not run tests.')
general_arguments.add_argument('--fail-early', action='store_true',
help='Exit as soon as a test fails.')
- sim_default = 'off' if platform.machine() == 'aarch64' else 'on'
+ sim_default = 'none' if platform.machine() == 'aarch64' else 'aarch64'
general_arguments.add_argument(
- '--simulator', action='store', choices=['on', 'off'],
+ '--simulator', action='store', choices=['aarch64', 'none'],
default=sim_default,
help='Explicitly enable or disable the simulator.')
general_arguments.add_argument(