Skip to content

Commit

Permalink
build: ease DragonFlyBSD build
Browse files Browse the repository at this point in the history
Implicitly pretending being FreeBSD and disable
large pages for this platform.

PR-URL: #30201
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
devnexen authored and targos committed Jan 14, 2020
1 parent a8df2e2 commit 50f6541
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/debug_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
#endif // __POSIX__

#if defined(__linux__) || defined(__sun) || \
defined(__FreeBSD__) || defined(__OpenBSD__)
defined(__FreeBSD__) || defined(__OpenBSD__) || \
defined(__DragonFly__)
#include <link.h>
#endif // (__linux__) || defined(__sun) ||
// (__FreeBSD__) || defined(__OpenBSD__)
#endif

#ifdef __APPLE__
#include <mach-o/dyld.h> // _dyld_get_image_name()
Expand Down Expand Up @@ -337,7 +337,8 @@ void PrintLibuvHandleInformation(uv_loop_t* loop, FILE* stream) {

std::vector<std::string> NativeSymbolDebuggingContext::GetLoadedLibraries() {
std::vector<std::string> list;
#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
#if defined(__linux__) || defined(__FreeBSD__) || \
defined(__OpenBSD__) || defined(__DragonFly__)
dl_iterate_phdr(
[](struct dl_phdr_info* info, size_t size, void* data) {
auto list = static_cast<std::vector<std::string>*>(data);
Expand Down
4 changes: 4 additions & 0 deletions tools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ def GuessOS():
return 'solaris'
elif id == 'NetBSD':
return 'netbsd'
elif id == 'DragonFly':
# Doing so on purpose as they are pretty close
# minus few features
return 'freebsd'
elif id == 'AIX':
return 'aix'
else:
Expand Down

0 comments on commit 50f6541

Please sign in to comment.