2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-17 01:32:12 +00:00
Commit Graph

1161 Commits

Author SHA1 Message Date
Nikita Kniazev
64d292d7a0 win: Increase communication buffers size (#412)
Currently the size of reading buffer is 16KiB while the the pipe buffer is of
system default size which seems to be 8KiB on Win7. Because of this the half of
the reading buffer is never used.

Also, recent Windows updates with Meltdown mitigation made syscalls more
expensive, and increasing the buffer size will lower the syscalls count.
2019-03-17 14:10:40 -05:00
Tom Kent
de026bc61e Clear the error instead of not setting it.
Rearranged order for newest first.
2019-03-05 16:23:53 -06:00
Tom Kent
1691e6194c If the vswhere lookup fails, keep searching for others 2019-03-05 06:53:19 -06:00
Thomas Kent
0a93cc2b97 Added support for actually building with msvc-14.2 2019-03-01 16:06:03 -06:00
Tom Kent
bee2ef619b Future one is "UNK" 2019-03-01 16:04:01 -06:00
Thomas Kent
b655b3f1c2 Fixes vswhere lookup during bootstrap for 16.X and 17.X 2019-03-01 07:05:03 -06:00
Tanzinul Islam
ccb9a97efb Fix build with Embarcadero C++ Builder ("borland" toolset) (#398)
* Fix "bootstrap.bat borland" failing to find label "Test_Path"

If an override toolset is given in the `bootstrap.bat` command-line,
`bootstrap.bat` -> `src/engine/build.bat` bypasses loading
`src/engine/guess_toolset.bat` entirely. Later on the call to
`Test_Path` from `build.bat` -> `config_toolset.bat` fails to find that
label.

Fix this by making a new parameterized entry-point `test_path` inside
`guess_toolset.bat` for this caller in `config_toolset.bat`.

Fixes: #382.

* Handle spaces in C++Builder toolchain path

Nowadays a default installation goes into %PROGRAMFILES%, e.g.
"C:\Program Files (x86)\Embarcadero\Studio\20.0\Bin".

* Add "-Nd" before "/D"-options for bcc32.exe

The preprocessor of the old Borland/C++Builder compiler (bcc32.exe) by
default does not accept preprocessor statements of the form:

    #if SYMBOL_NAME

where `SYMBOL_NAME` was `#define`-ed without a value. It insists on the
`#if defined(SYMBOL_NAME)` or `#ifdef SYMBOL_NAME` forms (emitting error
E2188 "expression syntax"). The workaround is to specify the `-Nd`
option before the offending `/D` options, which effectively provides a
value of "1" to the symbols being #define-ed. Apply this workaround in
the recipes of `bjam` and `b2` to satisfy the preprocessor.

The alternative here would be to migrate to the Clang-based (and much
more standard-compliant) bcc32c.exe, but that would be a more involved
change.

* Separate :Guess_Yacc logic from :Guess_Toolset in build.bat

This was an existing benign issue introduced in 00c2358, but it became
apparent after 9339693.
2019-02-26 19:32:53 -06:00
David Michael
4746def4a2 Implement a pseudo-toolset for cross-compiling (#196)
When running build.sh with the cross-cc toolset, it uses the native
compiler settings found in the BUILD_CC, BUILD_CFLAGS, and
BUILD_LDFLAGS environment variables to create executables to run on
the build system.  It then sets the toolset to cc so that the
cross-compilers given as CC etc. are propagated to subprocesses.
This ensures both that the build system can build and execute its
required programs and that final executables are cross-compiled for
the target architecture.
2019-02-23 09:36:23 -06:00
Steven Watanabe
acdf27398b Remove premature optimization that breaks piecemeal on windows.
The bug happens because exec_check replaces the shell inside
the command structure, but make1cmds retains a reference to
the old shell. The bug appears when all of the following are true:
- The action is piecemeal
- b2 is running on Windows
- SHELL is %
- The action contains elements that require a shell
- The action is split into multiple commands
In particular, this applies for gcc.archive with a large
number of object files.

Instead of attempting to reuse the same shell, we make
a new copy in every iteration of the loop.  The shell
and target lists are usually short and the cost of copying
them is insignificant compared to the other work done by the loop.
In addition, the optimization is rarely triggered because
piecemeal actions that require splitting are relatively rare.
2019-02-15 11:55:59 -07:00
Rene Rivera
b1954e3205 Reduce the repitition of the bjam version number. 2018-11-20 14:01:04 -06:00
James E. King III
158a8b6d5e Fix typo in cleanup code (#372) 2018-11-19 12:44:50 -06:00
James E. King III
66938a9470 add clang to the list of supported toolsets for bootstrap.sh (#369) 2018-11-18 14:46:18 -06:00
James E. King III
a8447917be gcc compiler warnings identified unhandled error cases (#370)
error on fork had no output and did not end correctly
2018-11-18 14:08:39 -06:00
Raffi Enficiaud
c39a8b81b3 Fix compilation issue on some old compilers (#362) 2018-10-28 09:59:44 -05:00
Steven Watanabe
40d45a1853 Display the object id for method calls in the call-stack. 2018-10-27 16:52:24 -06:00
Rene Rivera
0ae5c3ddeb Merge pull request #353 from Kojoley/fixed-slow-pipe-reading-on-windows
Fixed slow pipe reading on windows
2018-10-17 21:37:22 -05:00
Rene Rivera
c8bd4136f2 Avoid logical expression warnings. 2018-10-12 19:01:04 -05:00
Nikita Kniazev
e7e55d0cc9 Do not read pipe content at available size peeking
Currently the same data is read twice.

The first time a buffer is filled by `PeekNamedPipe` and second time it is
overwritten with the same content by `ReadFile`.
2018-10-11 23:23:28 +03:00
Nikita Kniazev
d13002a92d Fixed slow pipe reading on windows
It looks like the OS has the internal buffer around 4KB and with any buffer
over this size `read_pipe` will end the reading loop after first try despite
that reading a pipe may pump a new data and it can be read immediately.
2018-10-11 20:31:44 +03:00
Jonathan Wakely
8ff11a8ecc Fix memory leak
If vsnprintf returns -1 then the buffer should be freed before returning.
2018-10-10 17:17:10 +01:00
Jonathan Wakely
35ce23a327 Use correct sizeof in malloc call
This is allocating space for `nel` objects of type `ITEM*` so it should use `sizeof(ITEM*)` not `sizeof(ITEM**)`.

In practice the values are the same, but using the correct type is better anyway, and now matches the same calculation in the `memset` call in the following statement.
2018-10-10 13:47:13 +01:00
luzpaz
a2b8731d2a build: misc.typos (#341)
* build: misc.typos

Found via `codespell -q 3 --skip="./src/engine/boehm_gc" -L te,iff`

* Revert 3rdParty code changes
2018-09-26 09:54:06 -07:00
Mike Sullivan
b8329d25a8 boost/build: fix ch declaration in debugger.c 2018-08-20 11:34:15 +00:00
Steven Watanabe
33d6396afd Fix memory leak. Fixes #326. 2018-07-27 11:13:45 -06:00
Jonathan Neuschäfer
8b2054417c Avoid 100% CPU utilization if no timeout is set
While building boost, I noticed that jam0 and bjam used 100% of a CPU.
Strace showed that they were calling poll with a zero timeout in a loop.
This is because:
- the logic in exec_wait() initializes select_timeout to globs.timeout
- globs.timeout is zero when no action timeout is specified
- poll interprets a zero timeout as "return immediately" rather than
  "wait indefinitely".

Fix this by passing -1 to poll when globs.timeout is zero.
2018-04-02 15:20:57 +02:00
Steven Watanabe
0a1ffa1deb Fix warnings on msvc. Note that the lack of a return shouldn't cause a problem, because we never actually call yypeek in a case where the return is needed, but it's still more future-proof to have it. 2018-02-19 12:28:37 -07:00
Steven Watanabe
8af8dda1e5 Increment jam version. This should actually have been done multiple times in the past, as there have been several significant updates to the engine. 2018-02-19 12:23:15 -07:00
Steven Watanabe
aff0b08eb3 #||# comments should not swallow to the end of the line. 2018-02-15 11:04:16 -07:00
Steven Watanabe
0d5e76ebf2 Upgrade the scanner to handle whitespace more intelligently
* The new scanner is currently disabled and only issues a warning
  for tokens that would be lexed differently.
* Special case a few common uses of ':', to limit breakage to
  a manageable level.
* Remove the horribly outdated Jambase code inherited from Perforce Jam
* Update all of Boost.Build to work in the presence of the new lexer.
2018-01-31 14:08:36 -07:00
Steven Watanabe
fb43f6bb60 Print output from actions immediately in single-threaded builds (-j1). Output is still buffered in parallel builds and for quiet actions. This should also fix the output order for VMS which doesn't support parallel builds. Fixes #210. 2018-01-26 12:49:09 -07:00
Steven Watanabe
c594b12b13 Adjust check for using clock_gettime. 2017-12-23 09:47:32 -07:00
Steven Watanabe
6d7c0c752d Quote the name of the batch script so that it works when %TMP% contains a space. Fixes #274. 2017-12-21 15:16:45 -07:00
Steven Watanabe
d2b64dc55d Fix crash in the debugger's backtrace when a built-in function is on the stack. 2017-12-20 15:33:01 -07:00
Steven Watanabe
8aa702aaf4 Try to fix the build for older versions of XCode. 2017-12-19 10:27:31 -07:00
Steven Watanabe
0c6d0165b0 Support nanosecond timestamp resolution for posix. 2017-12-18 13:09:07 -07:00
Steven Watanabe
6c3397fac8 Fix crash when calling a member function that doesn't exist. Fixes #260. 2017-12-16 15:19:00 -07:00
Steven Watanabe
e31489760c breakpoints should work even if they're hit repeatedly. 2017-12-15 15:15:54 -07:00
Steven Watanabe
d81254cba0 Fix link-fail on Windows, Take 2. FAIL_EXPECTED now works correctly for targets that have multiple updating actions. Fixes #259. 2017-12-12 09:59:21 -07:00
Steven Watanabe
4269c9e663 Revert "Fix link-fail on Windows. FAIL_EXPECTED now works correctly for targets that have multiple updating actions. Fixes #259."
This reverts commit 0c3089d3c0.
2017-12-06 08:59:17 -07:00
Steven Watanabe
994bad539a hash requires the first element of the struct to be the key. 2017-12-05 19:27:11 -07:00
Steven Watanabe
192dedd2ee Fix debug builds of the debugger. Fixes #245. Fixes #246. 2017-12-05 18:26:09 -07:00
Steven Watanabe
0c3089d3c0 Fix link-fail on Windows. FAIL_EXPECTED now works correctly for targets that have multiple updating actions. Fixes #259. 2017-12-04 17:54:49 -07:00
Jürgen Hunold
e07c805e31 Workaround vsdevcmd_end.bat switching to %USERPROFILE%\Source
Fixs #236 and PR #252
2017-11-17 13:54:46 +01:00
Rene Rivera
2b44ccf5dc Avoid various pedantic warnings. 2017-10-28 23:21:40 -05:00
Alexander Karzhenkov
48e9017139 Fix compiler warnings about deprecated language features (#238) 2017-10-28 22:50:55 -05:00
Ion Gaztañaga
5377199473 More fixes for MSVC 7.1:
- Add missing WINVER=0x0501 and _WIN32_WINNT=0x0501 to config_toolset.bat
- Add needed -D_WIN32_WINNT=0x0501 for vc7 to fix unresolved symbols
- Added alternatives to va_copy and vsnprintf in debugger.c
- Add missing fix from previous patch in strings.c
2017-08-13 22:24:57 -05:00
Ion Gaztañaga
2f84a23f8d Fix non-C90 compatible lines
MSVC compilers fail to compile as they don't support declarations after statements
2017-08-12 23:06:24 -05:00
Refael Ackermann
9dc853b1cd bump vswhere_usability_wrapper.cmd
* bump to 1.15.4
* specific Boost.build patch (no VCINSTALLDIR)
2017-08-09 09:03:05 -05:00
Refael Ackermann
99b01d131b extra ERRORLEVEL reset 2017-08-09 09:03:05 -05:00
Rene Rivera
ae0c5b7a57 Change block comment to #| comment |#. 2017-07-28 16:59:31 -05:00