Commit Graph

5 Commits (57f39aed01a34ef6620d0547b51c0480e573b8e9)

Author SHA1 Message Date
Hugues Kamba e172eb33c9 CMake: Use modern CMake techniques to set toolchain options
Use target_compile_options(), target_compile_definitions(),
and target_link_options() to set toolchain options.
2020-11-06 17:25:17 +00:00
Devaraj Ranganna debffb6dd1 cmake: Armclang - Fix assembler and linker flags
For Armclang, change compiler flag to `-mcpu` and assembler and linker
flag to `--cpu`.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-11-06 17:25:16 +00:00
Devaraj Ranganna f18622e8d7 cmake: Fix arm compiler build failures
Update arm compiler flags which were causing build failures.

Remove `-MMD` flag as it is not recognised by the Arm compiler.

There are no common flags between compiler, assembler and linker. The
compiler expects `-mcpu` whereas assembler and linker expects `--cpu`.

The `COMMON_FLAGS` in `cmake/toolchains/ARM.cmake` are not recognised by
assembler and linker.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-11-06 17:25:16 +00:00
Hugues Kamba 71c48e0e8a CMake: remove version number from ARM toolchain
The version number was required previously when ARM Compiler 5
and ARM Compiler 6 were both supported. There was a significant
underlying change between the two that justified having distinct
build options settinfgs. It is very unlikely that such a major change will happen
between ARM Compiler 6 and future versions. It is therefore also very unlikely
that distinct option settings for future versions will be needed.
We should therefore avoid appending version number the same way we do not
append it to GCC toolchain configuration settings.
2020-11-06 17:25:16 +00:00
Hugues Kamba 6dc5f5a582 CMake: Add CMake scripts 2020-11-06 17:25:14 +00:00