Boost logo

Boost :

Subject: Re: [boost] clang-win, (Thin)LTO this time
From: degski (degski_at_[hidden])
Date: 2018-11-06 12:17:27


On Mon, 5 Nov 2018 at 18:46, Peter Dimov via Boost <boost_at_[hidden]>
wrote:

> I was going to look into this but got sidetracked, sorry.
>

No worries.

Try the current develop.
>

 I did, and I've use this project-config:

import option ;
using clang-win : : "C:\\Program Files\\LLVM\\bin\\clang-cl.exe"
-fuse-ld=lld :
    <compatibility>vc14
    <compileflags>-fmsc-version=1915
    <compileflags>-fms-compatibility
    <compileflags>-fno-delayed-template-parsing
    <compileflags>-flto=thin
    <cxxflags>"/std:c++17"
    <cxxflags>"/Zc:forScope"
    <cxxflags>"/arch:AVX2"
    <cxxflags>"/Zc:wchar_t"
    <cxxflags>"/EHsc"
    <cxxflags>"/Zc:inline"
    <cxxflags>"/Gd"
    <cxxflags>"/diagnostics:classic"
    <cxxflags>-Wno-unknown-argument
    <cxxflags>-Wno-unknown-pragmas
    <cxxflags>-Wno-macro-redefined
    <cxxflags>-Wno-unused-variable
    <cxxflags>-Wno-mismatched-tags
    <cxxflags>-Wno-deprecated-declarations
    <cxxflags>-D_UNICODE
    <cxxflags>-DUNICODE
    <cxxflags>-DBOOST_USE_WINDOWS_H
    <cxxflags>-DBOOST_NO_ANSI_APIS
    <cxxflags>-DBOOST_USE_WINAPI_VERSION=0x1000
    <cxxflags>-DBOOST_USE_WINDOWS_H=1
    <cxxflags>-DNOMINMAX
    <cxxflags>-DWIN32_LEAN_AND_MEAN
    <cxxflags>-D_CRT_SECURE_NO_WARNINGS
;

Note that -fuse-ld=lld in the above is not quoted, but it comes out like
[as an example]:

"C:\Program Files\LLVM\bin\clang-cl.exe" "-fuse-ld=lld" -m64
@"c:\boost-build\boost\bin.v2\libs\log\config\atomic-int32\clng-win-8.0.0\dbg\adrs-mdl-64\pch-off\atomic_int32.obj.rsp"

So, -fuse-ld=lld is quoted in the command. It appears [looks like]
clang-cl.exe gobbles the quotes, though, i.e. it seems to work.

There are some options that are passed, that are linux, like
template_depth, which is set to 255 [while the default is 1024]. These are
ignored, and in the case of template_depth, that seems better.

Then I notice this:

clang-win.link
c:\boost-build\boost\bin.v2\libs\stacktrace\build\clng-win-8.0.0\dbg\adrs-mdl-64\WinDbg_exe.exe

         "C:\Program Files\LLVM\bin\clang-cl.exe" "-fuse-ld=lld" -m64 /link
/incremental:no /DEBUG /subsystem:console
/out:"c:\boost-build\boost\bin.v2\libs\stacktrace\build\clng-win-8.0.0\dbg\adrs-mdl-64\WinDbg_exe.exe"
@"c:\boost-build\boost\bin.v2\libs\stacktrace\build\clng-win-8.0.0\dbg\adrs-mdl-64\WinDbg_exe.exe.rsp"
        if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%

lld-link: error: undefined symbol: __imp_CoInitializeEx

So it looks like ole32.lib is not linked in, or that lld-link cannot link
it [for whatever reason].

There's probably more small stuff, but in general, it looks pretty good. I
also tried to link to one of the thus compiled static libs (boost_random),
that works.

It would be cool and helpful if the output [of the build-process] be
reduced. I'm on an SSD, my guess is that the bottle-neck in the build
process is the console output [most of the time]. I'm also looking at an
100'000 line log file, mostly "copy x to y" or "mklink x", it's hard to
spot problems.

Thanks, Peter, we're getting oh so close.

degski

-- 
*“If something cannot go on forever, it will stop" - Herbert Stein*

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk