]> git.proxmox.com Git - rustc.git/blobdiff - src/compiler-rt/lib/profile/CMakeLists.txt
Imported Upstream version 1.6.0+dfsg1
[rustc.git] / src / compiler-rt / lib / profile / CMakeLists.txt
index 2255277ed1d928bd598db4996c9a130c30c065bb..6b37b39b4fffa4b49d6861735d43158c0964b341 100644 (file)
@@ -6,20 +6,25 @@ set(PROFILE_SOURCES
   InstrProfilingBuffer.c
   InstrProfilingFile.c
   InstrProfilingPlatformDarwin.c
+  InstrProfilingPlatformLinux.c
   InstrProfilingPlatformOther.c
-  InstrProfilingRuntime.cc)
+  InstrProfilingRuntime.cc
+  InstrProfilingUtil.c)
 
 if(APPLE)
-  add_compiler_rt_osx_static_runtime(clang_rt.profile_osx
-    ARCH ${PROFILE_SUPPORTED_ARCH}
-    SOURCES ${PROFILE_SOURCES})
-  add_dependencies(profile clang_rt.profile_osx)
+  add_compiler_rt_runtime(clang_rt.profile
+    STATIC
+    OS ${PROFILE_SUPPORTED_OS}
+    ARCHS ${PROFILE_SUPPORTED_ARCH}
+    SOURCES ${PROFILE_SOURCES}
+    PARENT_TARGET profile)
 else()
-  foreach(arch ${PROFILE_SUPPORTED_ARCH})
-    add_compiler_rt_runtime(clang_rt.profile-${arch} ${arch} STATIC
-      SOURCES ${PROFILE_SOURCES})
-    add_dependencies(profile clang_rt.profile-${arch})
-  endforeach()
+  add_compiler_rt_runtime(clang_rt.profile
+    STATIC
+    ARCHS ${PROFILE_SUPPORTED_ARCH}
+    CFLAGS -fPIC
+    SOURCES ${PROFILE_SOURCES}
+    PARENT_TARGET profile)
 endif()
 
 add_dependencies(compiler-rt profile)