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

11 Commits

Author SHA1 Message Date
DoctorNoobingstoneIPresume
861cd41c2b The engine can now be built with MinGW-w64 configured with --threads=win32. (#68)
* The engine can now be built with MinGW-w64 configured with --threads=win32.

This is the case for i686-w64-mingw32-g++ and x86_64-w64-mingw32-g++
distributed with the last versions of Cygwin compatible with Windows XP
(www.crouchingtigerhiddenfruitbat.org/Cygwin/timemachine.html).

The MinGW-w64 toolchains are very powerful, just like their gcc counterparts.
Even the ones with win32 threading model (as opposed to posix threading model),
while not able to use std::thread, can still build-and-use Boost.Thread.
(which, arguably, is more powerful than the Standard counterpart
for example with its support for thread interruption
-- which is less intrusive than the one offered by C++20 std::jthread).

For Windows XP, MinGW-w64 toolchains might be the only ones to support C++11.
Visual C++ has only been supporting C++11 since 2013
(and those versions require-and-often-target newer versions of Windows).

The only part of <thread> we were using was std::thread::hardware_concurrency
(in order to obtain the default value for b2's -j option).
For Windows, we now use dwNumberOfProcessors (in SYSTEM_INFO) and GetSystemInfo.
2021-09-09 08:24:22 -05:00
Rene Rivera
c9cc1ae2ed Replace refs to boost.org witth bfgroup.xyz. 2021-02-20 21:35:16 -06:00
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