[PATCH] D88061: [Testsuite] allow a linker to be specified
Davide Italiano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 17:57:45 PDT 2020
davide created this revision.
davide added a reviewer: cmatthews.
Herald added a subscriber: mgorny.
davide requested review of this revision.
https://reviews.llvm.org/D88061
Files:
CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -4,6 +4,12 @@
project(test-suite C CXX)
+function(append value)
+ foreach(variable ${ARGN})
+ set(${variable} "${${variable}} ${value}" PARENT_SCOPE)
+ endforeach(variable)
+endfunction()
+
# The test-suite is designed to be built in release mode anyway and
# falls over unless -DNDEBUG is set.
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
@@ -156,6 +162,11 @@
set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} ${TEST_SUITE_DIAGNOSE_LINKER_FLAGS}")
+if (TESTSUITE_USE_LINKER)
+ append("-fuse-ld=${TESTSUITE_USE_LINKER}"
+ CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAG)
+endif()
+
# Append extra flags. These extra flags are mainly meant for cache files that
# want to apply flags that get not override even when the user manually
# specifies CMAKE_C_FLAGS and similar.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88061.293305.patch
Type: text/x-patch
Size: 976 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200922/15ef0464/attachment.bin>
More information about the llvm-commits
mailing list