aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cross/armcc.txt11
-rw-r--r--mesonbuild/compilers/c.py3
-rw-r--r--mesonbuild/compilers/compilers.py6
3 files changed, 18 insertions, 2 deletions
diff --git a/cross/armcc.txt b/cross/armcc.txt
new file mode 100644
index 0000000..2597738
--- /dev/null
+++ b/cross/armcc.txt
@@ -0,0 +1,11 @@
+[binaries]
+c = 'armcc'
+cpp = 'armcc'
+ar = 'armar'
+strip = 'armar'
+
+[host_machine]
+system = 'WINDOWS'
+cpu_family = 'arm'
+cpu = 'Cortex-M0+'
+endian = 'little'
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
index cc1a48e..01f76ef 100644
--- a/mesonbuild/compilers/c.py
+++ b/mesonbuild/compilers/c.py
@@ -891,6 +891,9 @@ class GnuCCompiler(GnuCompiler, CCompiler):
class ARMCCompiler(ARMCompiler, CCompiler):
def __init__(self, exelist, version, is_cross, exe_wrapper=None, defines=None, **kwargs):
+ # ARMCC is only a cross compiler
+ if not is_cross:
+ raise EnvironmentException('armcc supports only cross-compilation.')
CCompiler.__init__(self, exelist, version, is_cross, exe_wrapper, **kwargs)
ARMCompiler.__init__(self, defines)
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index cdc6f87..47e3daa 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -112,12 +112,13 @@ gnulike_buildtype_args = {'plain': [],
'debugoptimized': ['-O2', '-g'],
'release': ['-O3'],
'minsize': ['-Os', '-g']}
+
arm_buildtype_args = {'plain': [],
'debug': ['-O0', '-g'],
'debugoptimized': ['-O2', '-g'],
'release': ['-O2'],
'minsize': ['-Os', '-g'],
- }
+ }
msvc_buildtype_args = {'plain': [],
'debug': ["/MDd", "/ZI", "/Ob0", "/Od", "/RTC1"],
@@ -139,12 +140,13 @@ gnulike_buildtype_linker_args = {'plain': [],
'release': ['-Wl,-O1'],
'minsize': [],
}
+
arm_buildtype_linker_args = {'plain': [],
'debug': [],
'debugoptimized': [],
'release': [],
'minsize': [],
- }
+ }
msvc_buildtype_linker_args = {'plain': [],
'debug': [],