[llvm-bugs] [Bug 32390] New: version list clang_rt.asan-dynamic-arm.vers isn't generated

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 23 02:29:09 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=32390

            Bug ID: 32390
           Summary: version list clang_rt.asan-dynamic-arm.vers isn't
                    generated
           Product: compiler-rt
           Version: 4.0
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: compiler-rt
          Assignee: unassignedbugs at nondot.org
          Reporter: mode89 at mail.ru
                CC: llvm-bugs at lists.llvm.org

Created attachment 18151
  --> https://bugs.llvm.org/attachment.cgi?id=18151&action=edit
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170323/2a9282d3/attachment.html>


More information about the llvm-bugs mailing list