Skip to content

Commit b51b2ce

Browse files
committed
Merge branch 'main' into pr/294
2 parents ca7b306 + 7e64ad6 commit b51b2ce

12 files changed

Lines changed: 141 additions & 58 deletions

File tree

.vscode/launch.json

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,25 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7+
{
8+
"name": "(gdb) Launch",
9+
"type": "cppdbg",
10+
"request": "launch",
11+
"program": "${workspaceFolder}/.build/gcc-15/debug/cxxstd-11-iso/threading-multi/b2",
12+
"args": ["-d9"],
13+
"stopAtEntry": false,
14+
"cwd": "${workspaceFolder}/example/hello",
15+
"environment": [],
16+
"externalConsole": false,
17+
"MIMode": "gdb",
18+
"setupCommands": [
19+
{
20+
"description": "Enable pretty-printing for gdb",
21+
"text": "-enable-pretty-printing",
22+
"ignoreFailures": true
23+
}
24+
]
25+
},
726
{
827
"name": "(gdb) Pipe Launch",
928
"type": "cppdbg",
@@ -17,10 +36,7 @@
1736
"pipeTransport": {
1837
"debuggerPath": "/usr/local/bin/gdb",
1938
"pipeProgram": "/usr/bin/ssh",
20-
"pipeArgs": [
21-
"-v",
22-
"root@192.168.13.163"
23-
],
39+
"pipeArgs": ["-v", "root@192.168.13.163"],
2440
"pipeCwd": ""
2541
},
2642
"MIMode": "gdb",
@@ -40,9 +56,7 @@
4056
"type": "cppdbg",
4157
"request": "launch",
4258
"program": "${workspaceFolder}\\.build\\gcc-10\\debug\\cxxstd-11-iso\\b2.exe",
43-
"args": [
44-
"-v"
45-
],
59+
"args": ["-v"],
4660
"stopAtEntry": false,
4761
"cwd": "${workspaceFolder}",
4862
"environment": [],
@@ -67,9 +81,7 @@
6781
"type": "cppvsdbg",
6882
"request": "launch",
6983
"program": "${workspaceFolder}\\.build\\msvc-14.3\\debug\\cxxstd-11-iso\\threading-multi\\b2.exe",
70-
"args": [
71-
"-ftest.jam"
72-
],
84+
"args": ["-ftest.jam"],
7385
"stopAtEntry": false,
7486
"cwd": "${workspaceFolder}\\test",
7587
"environment": [
@@ -84,11 +96,7 @@
8496
"type": "cppvsdbg",
8597
"request": "launch",
8698
"program": "${workspaceFolder}\\.build\\msvc-14.3\\debug\\cxxstd-11-iso\\threading-multi\\b2.exe",
87-
"args": [
88-
"--debug",
89-
"--build-system=test/test",
90-
"-j1"
91-
],
99+
"args": ["--debug", "--build-system=test/test", "-j1"],
92100
"stopAtEntry": false,
93101
"cwd": "${workspaceFolder}\\test",
94102
"environment": []
@@ -98,9 +106,7 @@
98106
"type": "cppdbg",
99107
"request": "launch",
100108
"program": "${workspaceFolder}/.build/gcc-14/debug/cxxstd-11-iso/threading-multi/b2",
101-
"args": [
102-
"-h"
103-
],
109+
"args": ["-h"],
104110
"stopAtEntry": false,
105111
"cwd": "${workspaceFolder}/example/hello",
106112
"environment": [],
@@ -119,10 +125,7 @@
119125
"type": "cppdbg",
120126
"request": "launch",
121127
"program": "${workspaceFolder}/.build/gcc-14/debug/address-sanitizer-on/cxxstd-11-iso/threading-multi/b2",
122-
"args": [
123-
"-n",
124-
"-a"
125-
],
128+
"args": ["-n", "-a"],
126129
"stopAtEntry": false,
127130
"cwd": "${workspaceFolder}",
128131
"environment": [],
@@ -193,12 +196,10 @@
193196
"name": "(rr) Launch",
194197
"type": "cppdbg",
195198
"request": "launch",
196-
"program": "${workspaceFolder}/.build/gcc-14/debug/cxxstd-11-iso/b2",
197-
"args": [
198-
"--grep"
199-
],
199+
"program": "${workspaceFolder}/.build/gcc-15/debug/cxxstd-11-iso/threading-multi/b2",
200+
"args": ["-d9"],
200201
"stopAtEntry": false,
201-
"cwd": "${workspaceFolder}",
202+
"cwd": "${workspaceFolder}/example/hello",
202203
"environment": [],
203204
"externalConsole": true,
204205
"MIMode": "gdb",
@@ -216,4 +217,4 @@
216217
]
217218
}
218219
]
219-
}
220+
}

doc/src/history.adoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
11
[[b2.history]]
22
= History
33

4+
== Version 5.4.2
5+
6+
Fix detection of Visual Studio 2026 to account for non-native tools being
7+
installed by default and hence conflicting with the native tools.
8+
9+
== Version 5.4.1
10+
11+
Fix error in path environment variables not being properly processed to split
12+
on path separator.
13+
414
== Version 5.4.0
515

16+
This is the end of year release. Biggest new items are the detection of
17+
Visual Studio 2026 (aka msvc145).
18+
619
* *New*: Add initial support for {CPP}-26 Contracts for GCC based toolsets
720
(like clang).
821
-- _René Ferdinand Rivera Morell_
@@ -37,6 +50,10 @@
3750
-- _Dmitry Arkhipov_
3851
* Fix building when targetting WASM64 with emscripten.
3952
-- _Uilian Ries_
53+
* Fix resolution of subprojects of rooted projects.
54+
-- _Dmitry Arkhipov_
55+
* Fix crash when using `-d9` to output module debug stats.
56+
-- _René Ferdinand Rivera Morell_
4057

4158
== Version 5.3.3
4259

src/build/project.jam

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ rule find ( name : current-location )
163163
{
164164
name = [ NORMALIZE_PATH $(name) ] ;
165165
local project-module ;
166+
local location ;
166167

167168
# Try interpreting name as project id.
168169
if [ path.is-rooted $(name) ]
@@ -195,14 +196,37 @@ rule find ( name : current-location )
195196
load-used-projects $(caller-module) ;
196197
}
197198
}
199+
else
200+
{
201+
local sub = [ path.basename $(name) ] ;
202+
local root = [ path.parent $(name) ] ;
203+
while $(root) != /
204+
{
205+
local m = $($(root).jamfile-module) ;
206+
if $(m)
207+
{
208+
location = [ path.root $(sub)
209+
[ attribute $(m) location ] ] ;
210+
root = / ;
211+
}
212+
else
213+
{
214+
sub = [ path.join [ path.basename $(root) ] $(sub) ] ;
215+
root = [ path.parent $(root) ] ;
216+
}
217+
}
218+
}
198219
project-module = $($(name).jamfile-module) ;
199220
}
200221
}
201222

202223
if ! $(project-module)
203224
{
204-
local location = [ path.root [ path.make $(name) ] $(current-location) ]
205-
;
225+
if ! $(location)
226+
{
227+
location = [ path.root [ path.make $(name) ] $(current-location) ]
228+
;
229+
}
206230

207231
# If no project is registered for the given location, try to load it.
208232
# First see if we have a Jamfile. If not, then see if we might have a

src/build/version.jam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import numbers ;
1010
# Mirror engine JAM_VERSION
1111
.major = 5 ;
1212
.minor = 4 ;
13-
.patch = 0 ;
13+
.patch = 2 ;
1414

1515

1616
rule build ( )

src/engine/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ if test_true ${B2_HELP_OPT} ; then
271271
error_exit
272272
fi
273273

274-
# If we have a CXX but no B2_TOOLSET specified by the user we assume they meant
275-
# "cxx" as the toolset.
274+
# If user gave a --cxx option but no B2_TOOLSET specified by the user we assume
275+
# they meant "cxx" as the toolset.
276276
if test "${B2_CXX_OPT}" != "" -a "${B2_TOOLSET}" = "" ; then
277277
B2_TOOLSET=cxx
278278
fi

src/engine/modules.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ static void stat_module( void * xmodule, void * data )
205205
if ( is_debug_mem() || is_debug_profile() )
206206
{
207207
struct hash * class_info = (struct hash *)data;
208-
if ( m->class_module )
208+
if ( m->class_module && m->class_module->name )
209209
{
210210
int found;
211211
struct module_stats * ms = (struct module_stats *)hash_insert( class_info, m->class_module->name, &found );

src/engine/modules.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ typedef module_t * module_ptr;
2222

2323
struct module_t
2424
{
25-
OBJECT * name;
26-
struct hash * rules;
27-
struct hash * variables;
28-
struct hash * variable_indices;
29-
int num_fixed_variables;
30-
LIST * * fixed_variables;
31-
struct hash * imported_modules;
32-
module_t * class_module;
33-
struct hash * native_rules;
34-
int user_module;
25+
OBJECT * name = nullptr;
26+
struct hash * rules = nullptr;
27+
struct hash * variables = nullptr;
28+
struct hash * variable_indices = nullptr;
29+
int num_fixed_variables = 0;
30+
LIST * * fixed_variables = nullptr;
31+
struct hash * imported_modules = nullptr;
32+
module_t * class_module = nullptr;
33+
struct hash * native_rules = nullptr;
34+
int user_module = 0;
3535
};
3636

3737
module_t * bindmodule( OBJECT * name );

src/engine/patchlevel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ Distributed under the Boost Software License, Version 1.0.
1414

1515
#define VERSION_MAJOR 5
1616
#define VERSION_MINOR 4
17-
#define VERSION_PATCH 0
17+
#define VERSION_PATCH 2

src/engine/variable.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ void var_defines(struct module_t * module, const char * const * e, int preproces
111111
{
112112
char split = ' ';
113113
/* Split *PATH at :'s, not spaces. */
114-
if (var.ends_with("PATH")
115-
|| var.ends_with("Path" || var.ends_with("path")))
114+
if (var.ends_with("PATH") || var.ends_with("Path")
115+
|| var.ends_with("path"))
116116
split = SPLITPATH;
117117
/* Do the split. */
118118
for (::b2::string_view::size_type p0 = 0; p0 < val.size();)

src/tools/msvc.jam

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2164,11 +2164,25 @@ for local cpu in [ MATCH "^\\.cpu-arch-info-(.*)" : [ VARNAMES $(__name__) ] ]
21642164
.default-cpu-arch = [ os.environ PROCESSOR_ARCHITEW6432 ] ;
21652165
.default-cpu-arch ?= [ os.environ PROCESSOR_ARCHITECTURE ] ;
21662166
.default-cpu-arch = $(.default-cpu-arch:L) ;
2167+
.host-arch = x86 ;
21672168
switch $(.default-cpu-arch)
21682169
{
2169-
case x86 : .default-cpu-arch = i386 ;
2170-
case em64t : .default-cpu-arch = amd64 ;
2171-
case arm64 : .default-cpu-arch = arm64 ;
2170+
case x86 :
2171+
.default-cpu-arch = i386 ;
2172+
2173+
case em64t :
2174+
.default-cpu-arch = amd64 ;
2175+
.host-arch = x64 ;
2176+
2177+
case arm64 :
2178+
.default-cpu-arch = arm64 ;
2179+
.host-arch = arm64 ;
2180+
2181+
case amd64 :
2182+
.host-arch = x64 ;
2183+
2184+
case ia64 :
2185+
.host-arch = x64 ;
21722186
}
21732187

21742188
for local cpu in $(.cpus-on-$(.cpu-arch-info-$(.default-cpu-arch)[1]))
@@ -2253,23 +2267,23 @@ for local arch in [ MATCH "^\\.cpus-on-(.*)" : [ VARNAMES $(__name__) ] ]
22532267
# of discovery involve having a compiled program. So as a fallback we search
22542268
# paths for VS2017 (aka msvc >= 14.1).
22552269
.version-14.1-path =
2256-
"../../VC/Tools/MSVC/*/bin/Host*/*"
2257-
"Microsoft Visual Studio/2017/*/VC/Tools/MSVC/*/bin/Host*/*" ;
2270+
"../../VC/Tools/MSVC/*/bin/Host$(.host-arch)/$(.host-arch)"
2271+
"Microsoft Visual Studio/2017/*/VC/Tools/MSVC/*/bin/Host$(.host-arch)/$(.host-arch)" ;
22582272
.version-14.1-env = VS150COMNTOOLS ProgramFiles ProgramFiles(x86) ;
22592273

22602274
.version-14.2-path =
2261-
"../../VC/Tools/MSVC/*/bin/Host*/*"
2262-
"Microsoft Visual Studio/2019/*/VC/Tools/MSVC/*/bin/Host*/*" ;
2275+
"../../VC/Tools/MSVC/*/bin/Host$(.host-arch)/$(.host-arch)"
2276+
"Microsoft Visual Studio/2019/*/VC/Tools/MSVC/*/bin/Host$(.host-arch)/$(.host-arch)" ;
22632277
.version-14.2-env = VS160COMNTOOLS ProgramFiles ProgramFiles(x86) ;
22642278

22652279
.version-14.3-path =
2266-
"../../VC/Tools/MSVC/*/bin/Host*/*"
2267-
"Microsoft Visual Studio/2022/*/VC/Tools/MSVC/*/bin/Host*/*" ;
2280+
"../../VC/Tools/MSVC/*/bin/Host$(.host-arch)/$(.host-arch)"
2281+
"Microsoft Visual Studio/2022/*/VC/Tools/MSVC/*/bin/Host$(.host-arch)/$(.host-arch)" ;
22682282
.version-14.3-env = VS170COMNTOOLS ProgramFiles ProgramFiles(x86) ;
22692283

22702284
.version-14.5-path =
2271-
"../../VC/Tools/MSVC/*/bin/Host*/*"
2272-
"Microsoft Visual Studio/18/*/VC/Tools/MSVC/14.5*/bin/Host*/*" ;
2285+
"../../VC/Tools/MSVC/14.5*/bin/Host$(.host-arch)/$(.host-arch)"
2286+
"Microsoft Visual Studio/18/*/VC/Tools/MSVC/14.5*/bin/Host$(.host-arch)/$(.host-arch)" ;
22732287
.version-14.5-env = VS180COMNTOOLS ProgramFiles ProgramFiles(x86) ;
22742288

22752289

0 commit comments

Comments
 (0)