[PATCH] D55997: Add support for LLVM profile for NetBSD

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 21 23:00:16 PST 2018


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT349994: Add support for LLVM profile for NetBSD (authored by kamil, committed by ).

Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55997/new/

https://reviews.llvm.org/D55997

Files:
  cmake/config-ix.cmake
  lib/profile/InstrProfilingPlatformLinux.c
  lib/profile/InstrProfilingPlatformOther.c
  test/profile/instrprof-dlopen-dlclose-gcov.test
  test/profile/lit.cfg


Index: cmake/config-ix.cmake
===================================================================
--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -586,7 +586,7 @@
 endif()
 
 if (PROFILE_SUPPORTED_ARCH AND NOT LLVM_USE_SANITIZER AND
-    OS_NAME MATCHES "Darwin|Linux|FreeBSD|Windows|Android|Fuchsia|SunOS")
+    OS_NAME MATCHES "Darwin|Linux|FreeBSD|Windows|Android|Fuchsia|SunOS|NetBSD")
   set(COMPILER_RT_HAS_PROFILE TRUE)
 else()
   set(COMPILER_RT_HAS_PROFILE FALSE)
Index: test/profile/lit.cfg
===================================================================
--- test/profile/lit.cfg
+++ test/profile/lit.cfg
@@ -67,7 +67,7 @@
 
 config.substitutions.append( ("%clang_lto_profgen=", build_invocation(clang_cflags, True) + " -fprofile-instr-generate=") )
 
-if config.host_os not in ['Darwin', 'FreeBSD', 'Linux', 'SunOS']:
+if config.host_os not in ['Darwin', 'FreeBSD', 'Linux', 'NetBSD', 'SunOS']:
   config.unsupported = True
 
 if config.target_arch in ['armv7l']:
Index: test/profile/instrprof-dlopen-dlclose-gcov.test
===================================================================
--- test/profile/instrprof-dlopen-dlclose-gcov.test
+++ test/profile/instrprof-dlopen-dlclose-gcov.test
@@ -1,3 +1,6 @@
+# atexit(3) not supported in dlopen(3)ed+dlclose(3)d DSO
+XFAIL: netbsd
+
 RUN: mkdir -p %t.d
 RUN: cd %t.d
 
Index: lib/profile/InstrProfilingPlatformLinux.c
===================================================================
--- lib/profile/InstrProfilingPlatformLinux.c
+++ lib/profile/InstrProfilingPlatformLinux.c
@@ -8,7 +8,7 @@
 \*===----------------------------------------------------------------------===*/
 
 #if defined(__linux__) || defined(__FreeBSD__) || defined(__Fuchsia__) || \
-    (defined(__sun__) && defined(__svr4__))
+    (defined(__sun__) && defined(__svr4__)) || defined(__NetBSD__)
 
 #include <stdlib.h>
 
Index: lib/profile/InstrProfilingPlatformOther.c
===================================================================
--- lib/profile/InstrProfilingPlatformOther.c
+++ lib/profile/InstrProfilingPlatformOther.c
@@ -8,7 +8,7 @@
 \*===----------------------------------------------------------------------===*/
 
 #if !defined(__APPLE__) && !defined(__linux__) && !defined(__FreeBSD__) && \
-    !(defined(__sun__) && defined(__svr4__))
+    !(defined(__sun__) && defined(__svr4__)) && !defined(__NetBSD__)
 
 #include <stdlib.h>
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55997.179411.patch
Type: text/x-patch
Size: 2391 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181222/cf683771/attachment.bin>


More information about the llvm-commits mailing list