summaryrefslogtreecommitdiff
path: root/lib/asan/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'lib/asan/CMakeLists.txt')
-rw-r--r--lib/asan/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/asan/CMakeLists.txt b/lib/asan/CMakeLists.txt
index da82e485b..fbd72f692 100644
--- a/lib/asan/CMakeLists.txt
+++ b/lib/asan/CMakeLists.txt
@@ -175,6 +175,11 @@ else()
EXTRA asan.syms.extra)
set(VERSION_SCRIPT_FLAG
-Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/clang_rt.asan-dynamic-${arch}.vers)
+ # The Solaris 11.4 linker supports a subset of GNU ld version scripts,
+ # but requires a special option to enable it.
+ if (OS_NAME MATCHES "SunOS")
+ list(APPEND VERSION_SCRIPT_FLAG -Wl,-z,gnu-version-script-compat)
+ endif()
set_property(SOURCE
${CMAKE_CURRENT_BINARY_DIR}/dummy.cc
APPEND PROPERTY