summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-06-03 10:10:05 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-06-03 10:10:14 (GMT)
commit007109b20f8ef07cc8d473bf7bc3b97d4c3cd2b4 (patch)
treee7cf99c46e22f16b237046913469f7a28376f310 /Modules
parent42e6e296544e1412b5699aac0f1910eb7fd20bc5 (diff)
parent73fb6ac82bf4c9a203b879c6fee06b9c852cb0d6 (diff)
downloadCMake-007109b20f8ef07cc8d473bf7bc3b97d4c3cd2b4.zip
CMake-007109b20f8ef07cc8d473bf7bc3b97d4c3cd2b4.tar.gz
CMake-007109b20f8ef07cc8d473bf7bc3b97d4c3cd2b4.tar.bz2
Merge topic 'armclang-armlink'
73fb6ac82b ARMClang: Add support for armlink Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4811
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Compiler/ARMClang.cmake16
1 files changed, 14 insertions, 2 deletions
diff --git a/Modules/Compiler/ARMClang.cmake b/Modules/Compiler/ARMClang.cmake
index 2518ac7..f0fdcd5 100644
--- a/Modules/Compiler/ARMClang.cmake
+++ b/Modules/Compiler/ARMClang.cmake
@@ -19,6 +19,13 @@ mark_as_advanced(CMAKE_ARMClang_LINKER)
set(CMAKE_AR "${CMAKE_ARMClang_AR}" CACHE FILEPATH "The ARMClang archiver" FORCE)
mark_as_advanced(CMAKE_ARMClang_AR)
+if (CMAKE_LINKER MATCHES "armlink")
+ set(__CMAKE_ARMClang_USING_armlink TRUE)
+ set(CMAKE_LIBRARY_PATH_FLAG "--userlibpath=")
+else()
+ set(__CMAKE_ARMClang_USING_armlink FALSE)
+endif()
+
# get compiler supported cpu list
function(__armclang_set_processor_list lang out_var)
execute_process(COMMAND "${CMAKE_${lang}_COMPILER}" --target=${CMAKE_${lang}_COMPILER_TARGET} -mcpu=list
@@ -60,10 +67,15 @@ macro(__compiler_armclang lang)
string(APPEND CMAKE_${lang}_FLAGS_INIT "-mcpu=${CMAKE_SYSTEM_PROCESSOR}")
string(APPEND CMAKE_${lang}_LINK_FLAGS "--cpu=${CMAKE_SYSTEM_PROCESSOR}")
- set(CMAKE_${lang}_LINK_EXECUTABLE "<CMAKE_LINKER> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> <OBJECTS> -o <TARGET> --list <TARGET_BASE>.map")
+ if(__CMAKE_ARMClang_USING_armlink)
+ set(__CMAKE_ARMClang_USING_armlink_WRAPPER "")
+ else()
+ set(__CMAKE_ARMClang_USING_armlink_WRAPPER ${CMAKE_${lang}_LINKER_WRAPPER_FLAG})
+ endif()
+ set(CMAKE_${lang}_LINK_EXECUTABLE "<CMAKE_LINKER> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> <OBJECTS> -o <TARGET> ${__CMAKE_ARMClang_USING_armlink_WRAPPER} --list <TARGET_BASE>.map")
set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "<CMAKE_AR> --create -cr <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_${lang}_ARCHIVE_CREATE "<CMAKE_AR> --create -cr <TARGET> <LINK_FLAGS> <OBJECTS>")
- set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "--via=")
+ set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "${__CMAKE_ARMClang_USING_armlink_WRAPPER} --via=")
set(CMAKE_${lang}_OUTPUT_EXTENSION ".o")
set(CMAKE_${lang}_OUTPUT_EXTENSION_REPLACE 1)
endmacro()