2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 13:22:11 +00:00
Commit Graph

9 Commits

Author SHA1 Message Date
Pino Toscano
25879fc24d Basic changes for GNU/Hurd (#676)
* Define OSMINOR & OS_HURD on GNU/Hurd

Add a way to identify GNU/Hurd with b2, and also in the Python support.

* Use /proc/self/exe for executable_path on Hurd

Use the Linux compatibility procfs translator to get the full path of
the current executable.

* Define _GNU_SOURCE on any GNU libc-based OS

Make sure to enable GNU features when building on any OS that uses
GNU libc.
2020-12-14 13:37:32 -06:00
Rene Rivera
a83f94aad2 Fix bad number of args to cpu count macro. 2019-06-18 09:24:18 -05:00
Rene Rivera
79c248c57a Restore POSIX & Linux core count.
Looks like the std core count function is no worse than the POSIX &
Linux specific methods. Re-enabling those platform methods.
2019-06-18 08:09:48 -05:00
Rene Rivera
9e4bb2e28b Disable the POSIX & Linux core count until stable.
Some methods for quering the cpu counts are unreliable when run
in a container or other cpuset restrictions. Disable them to prefer
the std query.
2019-06-14 23:48:59 -05:00
Rene Rivera
495410e2c1 Avoid warnings about redef of _GNU_SOURCE. 2019-06-11 21:34:58 -05:00
Rene Rivera
c27d575fb3 Rework sysinfo cpu to avoid overcounts.
When running in Linux containers the POSIX sysconf can return "too many"
cores or cpus. Instead we prefer using Linux specific sched_getaffinity
there.
2019-06-11 21:26:25 -05:00
Rene Rivera
a8ab76ef97 Final fallback for cpu count to use std::thread. 2019-06-04 17:07:24 -05:00
Rene Rivera
451059949d Implement minimal cpu sys info for POSIX.
This implements partial cpu count information on POSIX systems using
`sysconf` call. This should be the fallback for most Unix like systems
if they don't have a more accurate cpu count API.
2019-06-04 08:25:47 -05:00
Rene Rivera
150d69bd57 Default to available cpu threads for -j option.
This adds a `b2::system_info` class to obtain available information on
system we are running in. Currently provides CPU counts.
And currently only implemented for macOS.
2019-06-03 18:39:22 -05:00