Closed grisumbras closed 3 months ago
That's probably the right thing to do, but it has the potential of breaking previously working builds on Windows due to path limits.
I'm not sure whether there's anything we can do about that, though.
(References https://github.com/bfgroup/b2/pull/375).
Yeah, I'm hitting Windows path limits when building with MinGW-w64:
...failed gcc.compile.c++ ..\..\bin.v2\libs\uuid\test\~hdr-decl-detail-basic_name_generator~hpp.test\gcc-8\release\address-model-64\architecture-x86\cxxstd-14-iso\threadapi-win32\threading-multi\visibility-hidden\~hdr-decl-detail-basic_name_generator~hpp.o...
gcc.compile.c++ ..\..\bin.v2\libs\uuid\test\~hdr-decl-detail-basic_name_generator~hpp.test\gcc-8\release\address-model-64\architecture-x86\cxxstd-1z-iso\threadapi-win32\threading-multi\visibility-hidden\~hdr-decl-detail-basic_name_generator~hpp.o
Assembler messages:
Fatal error: can't create ..\..\bin.v2\libs\uuid\test\~hdr-decl-detail-basic_name_generator~hpp.test\gcc-8\release\address-model-64\architecture-x86\cxxstd-1z-iso\threadapi-win32\threading-multi\visibility-hidden\~hdr-decl-detail-basic_name_generator~hpp.o: No such file or directory
If we keep this, https://github.com/bfgroup/b2/issues/378 will be urgently required. Or we need to figure out a way to enable --abbreviate-paths
on the Boost side if B2 doesn't cooperate.
Another option is to special-case architecture
and address-model
and instead of adding address-model-64/architecture-x86/
to the path, just add x86-64/
to it.
This should finally fix bfgroup/b2#368.
Background. After my b2 PR (bfgroup/b2#375) was merged, the build system is properly creating two alternatives for checked libraries (e.g.
/openssl//ssl
): before the deduced properties are added, and after that. What this does not result in, though, is build system actually compiling and linking corresponding files twice. This is becausededuced-X
are hidden features, and they do not affect the target path. As a resultfoo.o
withaddress-model=32
, andfoo.o
withaddress-model=32 deduced-architecture=x86
result in the same file (e.g.gcc-13/debug/address-model-32/threading-multi/visibility-hidden/foo.o
, notice the lack ofarchitecture
).After some thinking, I decided that this is a flaw in how deduced platform features are implemented. They should not be hidden, because their presence affects binary compatibility.
This change removes
deduced-X
features, as their only purpose was hiding the related property from the path. Instead it fully relies on conditional property adding the deduced values forX
feature if necessary.NOTE: the unfortunate result of this change is that all targets in a Boost build will get
architecture-A
andaddress-model-M
parts in the path.