Boost logo

Boost-Build :

Subject: [Boost-build] Error messages suggest clang not using expect lld linker?
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2018-03-21 11:53:09


I am trying to use the Clang 6.0.0 compiler (with some success) on windows 10
but I am confused at this output

user-config contains

using clang
  : # Version.
    6.0.0
  : # Location of Clang compiler .exe file(s).
    "C:/LLVM/clang-600/LLVM/bin/clang++.exe"
  : # Options.
    # <include>"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include"
    <compileflags>-v
    <compileflags>-fmsc-version=1900
    <compileflags>--target=i686-pc-windows-msvc
    <define>_CRT_SECURE_NO_DEPRECATE
    <define>_CRT_SECURE_NO_WARNINGS
    <cxxflags>-std=c++17
    <cxxflags>-flto=thin
    <linkflags>-v
    <linkflags>--target=i686-pc-windows-msvc
    <linkflags>-fuse-ld=lld
    <linkflags>-flto=thin
    <linkflags>-lmsvcrt
   ;

I'd like to fix the linker lld (seems to be needed, and it recommend anyway) a bit like

<linker> "C:/LLVM/clang-600/LLVM/bin/llvm-ranlib.exe" Is this sensible/possible?

but anyway is specified with this

    <linkflags>-fuse-ld=lld
    <linkflags>-flto=thin

What I see in several places is

clang-linux.link
..\..\..\bin.v2\libs\math\example\root_elliptic_finding.test\clang-gnu-linux-6.0.0\release\link-static\threadapi-win32\root_elliptic
_finding.exe
LINK : warning LNK4044: unrecognized option '/-start-group'; ignored
LINK : warning LNK4044: unrecognized option '/Bstatic'; ignored
LINK : warning LNK4044: unrecognized option '/Bdynamic'; ignored
LINK : warning LNK4044: unrecognized option '/-end-group'; ignored
root_elliptic_finding.obj : warning LNK4217: locally defined symbol __std_terminate imported in function "int `class
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl make_root(void)'::`1'::dtor$82"
(?dtor$82@?0??make_root@@YA?AV?$basic_string_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@XZ_at_4HA)
libboost_timer-clang60-x64-1_66.lib(cpu_timer.obj) : warning LNK4049: locally defined symbol __std_terminate imported
root_elliptic_finding.obj : warning LNK4217: locally defined symbol _CxxThrowException imported in function "int `class
catch$41::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<<struct std::char_traits<char> >(class
catch$41::std &,char const *)'::`1'::catch$41"
(?catch$41@?0???$?6U?$char_traits_at_D@std@@@std@@YAAEAV?$basic_ostream_at_DU?$char_traits_at_D@std@@@0_at_AEAV10@PEBD_at_Z@4HA)
libboost_timer-clang60-x64-1_66.lib(cpu_timer.obj) : warning LNK4049: locally defined symbol _CxxThrowException imported

but the *messages* appear to come from the MSVC linker?

I see the warnings using the MSVC linker too and I am not too concerned about them, but I am concerned that I am not using the
expected linker (despite saying clang-linux).

Views?

Thanks

Paul

---
Paul A. Bristow
Prizet Farmhouse
Kendal UK LA8 8AB
+44 (0) 1539 561830

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk