<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - version list clang_rt.asan-dynamic-arm.vers isn't generated"
href="https://bugs.llvm.org/show_bug.cgi?id=32390">32390</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>version list clang_rt.asan-dynamic-arm.vers isn't generated
</td>
</tr>
<tr>
<th>Product</th>
<td>compiler-rt
</td>
</tr>
<tr>
<th>Version</th>
<td>4.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>compiler-rt
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mode89@mail.ru
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=18151" name="attach_18151" title="full log of configuration and building">attachment 18151</a> <a href="attachment.cgi?id=18151&action=edit" title="full log of configuration and building">[details]</a></span>
full log of configuration and building
I'm building branch release_40 of compiler-rt using Clang 4.0.0 for ARM.
Configuration is done without errors. At the end of building linker cannot find
clang_rt.asan-dynamic-arm.vers, though version list for armhf has been
generated (see below). Here are the last lines of building output (full log is
attached):
-------------------------------------------------------------------------
[ 84%] Built target RTAsan_dynamic.arm
[ 84%] Generating version list for clang_rt.asan-dynamic-armhf
Scanning dependencies of target RTAsan_dynamic_version_script_dummy.arm
[ 84%] Building CXX object
projects/compiler-rt/lib/asan/CMakeFiles/RTAsan_dynamic_version_script_dummy.arm.dir/dummy.cc.o
[ 84%] Built target RTAsan_dynamic_version_script_dummy.arm
Scanning dependencies of target clang_rt.asan-dynamic-arm
[ 84%] Linking CXX shared library
../../../../lib/clang/4.0.0/lib/linux/libclang_rt.asan-arm.so
/home/mode/llvm/install/bin/ld.lld: error: cannot open
/home/mode/llvm/build-compiler-rt/projects/compiler-rt/lib/asan/clang_rt.asan-dynamic-arm.vers:
No such file or directory
clang-4.0: error: linker command failed with exit code 1 (use -v to see
invocation)
make[3]: ***
[projects/compiler-rt/lib/asan/CMakeFiles/clang_rt.asan-dynamic-arm.dir/build.make:245:
lib/clang/4.0.0/lib/linux/libclang_rt.asan-arm.so] Error 1
make[2]: *** [CMakeFiles/Makefile2:8316:
projects/compiler-rt/lib/asan/CMakeFiles/clang_rt.asan-dynamic-arm.dir/all]
Error 2
make[1]: *** [CMakeFiles/Makefile2:5960:
projects/compiler-rt/CMakeFiles/compiler-rt.dir/rule] Error 2
make: *** [Makefile:1822: compiler-rt] Error 2
-------------------------------------------------------------------------
Here is my workaround:
-------------------------------------------------------------------------
diff --git a/lib/asan/CMakeLists.txt b/lib/asan/CMakeLists.txt
index 5ac5708..a4bcb6a 100644
--- a/lib/asan/CMakeLists.txt
+++ b/lib/asan/CMakeLists.txt
@@ -168,9 +168,9 @@ else()
EXTRA asan.syms.extra)
set(VERSION_SCRIPT_FLAG
-Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/clang_rt.asan-dynamic-${arch}.vers)
- set_source_files_properties(
+ set_property(SOURCE
${CMAKE_CURRENT_BINARY_DIR}/dummy.cc
- PROPERTIES
+ APPEND PROPERTY
OBJECT_DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/clang_rt.asan-dynamic-${arch}.vers)
else()
set(VERSION_SCRIPT_FLAG)
-------------------------------------------------------------------------
Looks like set_source_files_properties() adds only one dependency even when
multiple architectures supported. That's why only armhf version is generated.
That's why I replaced it with set_property() which allows append strings to
property keeping previous content.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>