I use this:
using clang : 6.0cl : C:/Utilities/LLVM/601/x32/bin/clang++
:
<cxxflags>-fmacro-backtrace-limit=0
<cxxflags>-Wno-invalid-token-paste
<compileflags>-fmsc-version=1900
<compileflags>--target=i686-pc-windows-msvc
<linkflags>--target=i686-pc-windows-msvc
<linkflags>-fuse-ld=lld
;
My batch file which uses this puts C:\Utilities\LLVM\601\x32\bin
first in the path and also invokes the correct 'vcvarsall.bat x86'
command. The command line uses 'toolset=clang-6.0cl'. I have not tried
it yet with VS2017.
I agree. It is not very good. In general clang under Windows, whether
using gcc or vc++ has many problems, but almost always with the linker
and rarely with the compiler, although it still can not handle VMD with
its preprocessor. I gave up trying to get the clang developers to pay
any attention to any of this a while ago.
> On 10/24/2018 6:33 PM, Egor Pugin via Boost wrote:
> >> Do you mean clang on Windows targeting vc++ or clang on Windows
> > targeting mingw-64/gcc ?
> >
> > clang-vc++ aka clang-cl
> > In other words clang in VC++ compat mode.
> >
> >
>
> I have this in user-config.jam for clang 7.0 on Windows targeting vc++ (
> VC++ compat mode ) :
>
> using msvc ;
>
> using clang : 7.0 : C:/Utilities/LLVM/700/x64/bin/clang++
> :
> <cxxflags>-fmacro-backtrace-limit=0
> <cxxflags>-Wno-invalid-token-paste
> <compileflags>-fmsc-version=1900
> <compileflags>--target=x86_64-pc-windows-msvc
> <linkflags>--target=x86_64-pc-windows-msvc
> <linkflags>-fuse-ld=lld
> ;
>
You are calling clang++.exe, I doubt this invokes a vc-compatible
compiler. From what I have seen is that this approach creates some weird
linux/vc chimaera (all the build paths have some linux reference in it).
I'm not saying [Peter also seems to have this approach] that this [having
compatibility mode on] is required, you're indicated progress in the
PP-realm seem to confirm that.
When Boost-1.69-rc comes out I'll waste a few more hours of my life trying
to compile Boost with Clang, I'll keep you updated. If and when you give it
another try, I would pass on the advice (and more or less request) from
STL, that is to actually use VC-15.9 (yes, that's preview) cleanly
installed, as mixing the old (14.0) and the new, we won't be able to get to
the bottom of it.
I also add C:\Utilities\LLVM\700\x64\bin first in my PATH and I manually
> invoke:
>
> "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
> amd64
>
> before the b2 invocation using toolset=clang-7.0.
>
> It is possible that neither of these extra actions are needed.
>
Your setup is migrated from VS2015. In a clean install of VS2017,
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" does
not exist.The correct path (for x64 host targeting x64) is "C:\Program
Files (x86)\Microsoft Visual
Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat". If you use the
shortcuts in the menu [Windows Key], this problem is solved for you.
You'll need to open a developer command prompt, as, if not, clang (any
clang) will have a hard time locating the VC-STL and other required
libraries in the "windows kits" [8.1 or 10.0]. You could/can also add the
[clang] path afterwards [after opening the build prompt] with 'set
PATH="C:\Utilities\LLVM\700\x64\bin";%PATH%'. Both these actions are
required.
Also possible might be to use the -fmsc-version=1915 for vc++14.1 and
> invoke the vcvarsall,bat for Microsoft Visual Studio 14.1.
>
The version you put is only relevant if Boost actually does something with
the supplied information. In the meanwhile _MSC_VER should give the correct
info.
Last but not least I would like to point out the VS2017 LLVM Compiler
Toolchain Plugin (by Zach Turner). It has (for a while now) been updated
and allows to switch cleanly between VC and Clang, within 1 project,
without having to touch either of the project settings. This plugin now
also allows to use lld as the linker, which opens up the possibility to use
thin-lto from within the IDE (this was formerly not possible). For this to
be useful in respect of Boost, it is necessary to be able to build Boost
with thin-lto enabled as otherwise this cannot work (stuff is vastly
different). Using thin-lto can give massive [yes massive] performance
boosts to your/any code.
To use the LLVM toolchain from Visual Studio after running the installer
above, install the LLVM Compiler Toolchain Visual Studio extension
<https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.llvm-toolchain>
(supports Visual Studio 2017 and later), select a project in Solution
Explorer, open its Property Page (Alt+F7 by default), and in the "General"
section of "Configuration Properties" change "Platform Toolset" to "llvm".
Alternatively, invoke MSBuild with /p:PlatformToolset=llvm to try out the
toolchain without modifying the project files.
degski
--
*“If something cannot go on forever, it will stop" - Herbert Stein*
_______________________________________________
> The difference on our side is that clang-cl uses clang-win.jam, derived
> from
> msvc.jam, and clang++ uses clang-linux.jam, derived from gcc.jam. So it's
> not the same.
>
Thanks for acknowledging that they are not the same (within the Boost b2
context).
degski
--
*“If something cannot go on forever, it will stop" - Herbert Stein*
_______________________________________________
> With that
> said using clang on Windows works reasonably well for me without having
> to use clang-cl, but whether targeting gcc or vc++ clang on Windows has
> remained problematical in the linking phase for nearly every clang
> release. I am now trying clang 7.0 to see if it is better.
>
If you want to use Clang, targeting gcc [which I guess means that you are
using MinGW], you should build Clang [clang++] with[in] MinGW and use it
there. What we [or I at least] am talking about is using Clang as a native
windows compiler [a drop-in for cl.exe], please don't keep on mixing up
those very different things [name mangling keeps getting in the way of
mixing "gcc-targets" with "vc-targets"]. If you wouldn't mix things up,
there would not be any linking issues, as out-of-the-box clang-cl will use
link.exe [the vc-linker]. Using lld with clang [beit ++, -cl or just plain
clang] works perfectly fine as well.
Other than the above gcc-targeting I don't see what [for you] comes in the
way of proper correct working linking [it works for the rest of us]. I
doubt clang-7.0 brings any relief in solving your problem, because the
changes in clang are not at that [basic] level, it also always worked fine
with clang-6, clang-5, clang-4, clang-3.9 and clang-3.8 [in respect of the
latter two, the number of ICE's were rather prohibitive for anything over
"Hello world.", though].
degski
--
*“If something cannot go on forever, it will stop" - Herbert Stein*
_______________________________________________
> I have not attempted to build clang-8.0 under Windows. I ran into too
> many errors in the past attempting to build clang on Windows, which were
> ignored when I mentioned it on the clang developers list, to want to
> keep pursuing another attempt.
>
It has become clear [following discussions on the cfe-dev mailing list]
that vc/msbuild do(es) not scale well [enough] to build Clang/LLVM. The
recommended [and what more or less seems to be the only way] is to use the
combo Ninja/Cmake/VC. There are some spells [see llvm web-site] you could
utter that allows you to bootstrap Clang with VC and then build Clang with
the [that] latest Clang.
When I run the preprocessor tests using b2 with my toolset clang-7.0
> targeting VC++ I get no errors at all, so I really do not know what you
> are seeing or what you are doing to produce "lots of errors". I am
> working with the 'develop' branch of Boost Preprocessor.
>
As far as I read, Edward said there were 2 errors, one of which he thought,
could be ignored.
degski
--
*“If something cannot go on forever, it will stop" - Herbert Stein*
_______________________________________________
> There is no need to try and do that. Earlier releases for Windows were
> built targeting gcc, not vc++. It was only with later releases that the
> default build of clang for Windows targeted vc++.
You seem to continuously miss the point. I don't want to have anything to
do with GCC!
> But whatever the
> default build of clang for Windows targeted you could always use the
> compile/link -target switch to change it at runtime.
>
How does that work with C++-name-mangling?
Aside from the use of different jam files for clang and clang-cl,
Apart from this detail, it's exactly the same, WTF!
> and
> the fact that clang-cl allows vc++ like options, clang-cl and clang
> targeting vc++ work exactly the same.
>
Yes, this is true, the above is the problem.
I have experienced some linking issues when running Boost tests for
> various libraries for nearly every release of clang. John Maddock also
> brought this up in a past thread. If you had a solution for the linking
> issues that worked I did not see it.
>
Until this "targeting gcc" get's clarified, it's all like spaghetti on the
wall. I do not understand what "targeting gcc" even means in this context.
GCC does not work [on Windows] outside MinGW as far as I know, but this
implies everything should be compiled that way [inside MinGW].
> Other than the above gcc-targeting I don't see what [for you] comes in the
> > way of proper correct working linking [it works for the rest of us]. I
> > doubt clang-7.0 brings any relief in solving your problem, because the
> > changes in clang are not at that [basic] level, it also always worked
> fine
> > with clang-6, clang-5, clang-4, clang-3.9 and clang-3.8 [in respect of
> the
> > latter two, the number of ICE's were rather prohibitive for anything over
> > "Hello world.", though].
>
> Again this is your experience but not mine.,
>
Well, I am not 'targeting gcc' and as far as I know this is not something
clang-cl is doing [whatever that means]. FYI, Microsoft is using clang-cl
as a test case for their STL, they also use Boost as a test-case. If there
were problems linking stuff, I'm sure somebody would have noticed at some
point.
In order to get forward at all, we need to:
1. Forget about GCC! It's got nothing to do with GCC.
2. Don't call clang++.exe in the config file, as this invokes the incorrect
[linux] jam.file [as confirmed by Peter].
degski
--
*“If something cannot go on forever, it will stop" - Herbert Stein*
_______________________________________________
> Not with clang. The errors I mentioned, in anoter thread, were with vc++
> 14.1 using the new vc++ preprocessor with the /experimental:preprocessor
> switch.
>
You're right, got my wires crossed!
degski
--
*“If something cannot go on forever, it will stop" - Herbert Stein*
_______________________________________________
> I have not attempted to build clang-8.0 under Windows. I ran into too
> many errors in the past attempting to build clang on Windows, which were
> ignored when I mentioned it on the clang developers list, to want to
> keep pursuing another attempt.
>
Is there any particular reason that you cannot use the binaries that are
available for download from llvm.org? You seem to focus on a problem that
has some interest, but that now stops you from seeing the problem(s) there
is(are) with building boost with clang [which binary is doing that seem
rather irrelevant to me].
degski
-
*“If something cannot go on forever, it will stop" - Herbert Stein*
_______________________________________________
> This entire thread was started because using clang-cl with clang-win did
> not work for the OP.
It doesn't.
I have expressed the opinion that I have gotten
> clang targeting vc++, which you insist is not clang-cl in any way even
> though it uses the vc++ headers and libraries, to mostly work, except
> for some linking issues over a number of releases of clang, when testing
> Boost libraries.
>
So, you also say it doesn't work. Peter also pointed out that the wrong
jam-file is used [in the way you set up the config file], which possibly
leads to linker errors further down the line.
If you have a setup under Boost using clang-cl and clang-win that works
> in your testing of Boost libraries please present that setup in the form
> of jamfile code.
If I would have that [something that works], I would post that and be done
with it [I would shut up].
Otherwise we are discussing this to no purpose.
Until it provably works for more than one person, this discussion **is**
useful. I don't have the impression, though, that we are discussing this
problem in the most effective way. You keep on mixing in the issue of not
being able to build Clang/LLVM itself from source, I don't understand what
that has to do with the issue at hand [not being able to build Boost with
Clang].
The latest correspondent asked in this thread for some setup that would
> work
> and I gave to him what works for me best using clang.
>
You're actually saying it doesn't work, you are bringing up linker issues,
but I think there are more issues. But as I say, until you just download a
Clang binary [the windows one:
https://prereleases.llvm.org/win-snapshots/LLVM-8.0.0-r339319-win64.exe or
https://releases.llvm.org/7.0.0/LLVM-7.0.0-win64.exe] and go on and try
build Boost with Clang, we are all just looking at spaghetti on the wall.
degski
--
*“If something cannot go on forever, it will stop" - Herbert Stein*
_______________________________________________
> What makes you think I have not downloaded and installed clang binaries?
You are mentioning that you have experienced problems building Clang/LLVM
using GCC and MinGW. Based on that I conclude that that is what you are
doing [call me stupid, no probs] ... and then that makes me think that the
issues you experience are related to you doing that.
All of my setups for using clang on Windows have involved downloading
> and installing binaries. As others on this thread have expressed there
> are problems using clang on Windows to test Boost libraries. I have
> given what setup works for me best.
>
What works best. How do you compare best over better, if things fail?
AFAICS, the only result that matters is the one that works correctly. The
config you posted does [as confirmed by Peter], per design [no criticism],
the wrong thing [you implicitly invoke boost-build linux stuff, what could
possibly go wrong?].
degski
--
*“If something cannot go on forever, it will stop" - Herbert Stein*
_______________________________________________
> Why can't you get it in your head that when you use clang targeting vc++
> you have clang as the compiler using the vc++ headers and libraries
> creating a Windows executable, and when you use clang targeting
> mingw-64/gcc it uses the mingw-64/gcc headers and libraries and also
> produces a Windows executable.
I have no problem having that in my head. I'm only interested in one of
the two, targeting VC++. I'm also convinced that targeting MinGW, involves
compiling Clang/LLVM yourself, against those MinGW/GCC headers. That
compiler should then be used only with MinGW.
If both are not testing clang on Windows
> I do not know what is.
>
I'm not interested in testing Clang in conjunction with MinGW, mostly
because MinGW is not a stable target and by definition lags.
If I, and obviously the OP of this thread, could get clang-cl using
> clang-win to work reliably I would suggest using that.
To do that you should use/do what you suggest IMO, go the linux route. With
this choice you'll be fully relying on whatever the MinGW devs do [or don't
do] and just hope that that will work. Your own experience seems to
demonstrate that this is the wrong path to follow. Going forward, MinGW
will become, IMHO, a thing of the past.
But it is not my experience that the latter works very well. If that setup
> works for you, that is fine.
>
No, I'm not trying to do what you are trying to do. I don't want to be
dealing with MinGW!!! And trying to do that fails. More so nowadays, CMake
plays an ever more important role and makes building stuff that used to be
Linux/GNU only, often trivial. Most of the reasons to use MinGW [in many
cases] have gone away [also due to and helped by better compliance of VC].
What I take away from this is that at least it has more or less become
clear what you are discussing. So in the future we should actively try to
separate these different issues/configs. Making this clear on the cfe-dev
list [when you address an issue] might also help you, although from what
I'm reading supporting what you are doing/trying to do is back-burner stuff.
The question is, what is clang-win.jam supposed to support, in your terms,
"targeting gcc" or "targeting msvc"?
degski
--
*“If something cannot go on forever, it will stop" - Herbert Stein*
_______________________________________________
> ... and extract the path to link.exe from there...
You questioned the wisdom [or stupidity] of running the boost build from a
VC developer command prompt before, AFAICR. Well this is one, open a
dev-command-prompt and link.exe is in the path [plus everything else].
But it would in reality be more interesting to use lld, IMO. On the other
hand, I have not a single dll amongst my libs, and this never is a problem,
so again I'm puzzled.
degski
--
*“If something cannot go on forever, it will stop" - Herbert Stein*
_______________________________________________
> You can try the attached clang-win.jam, with ...
>
Thanks for sharing. As soon as the first rc is out, I'll give it another go!
degski
--
*“If something cannot go on forever, it will stop" - Herbert Stein*
_______________________________________________
> I have merged Peter's fix for clang-win.jam, from a PR he created, to
> Boost Build's 'develop' branch. Thanks, Peter, for working on this !
> This will make it easier for others who participated on this thread to
> try his update.
>
I'm building from the dev-head. I get this:
clang-win.archive
c:\boost-build\boost\bin.v2\libs\thread\build\clng-win-8.0.0\dbg\adrs-mdl-64\lnk-sttc\thrdp-wn32\thrd-mlt\libboost_thread-clangw8-mt-d-x64-1_69.lib
if exist
"c:\boost-build\boost\bin.v2\libs\thread\build\clng-win-8.0.0\dbg\adrs-mdl-64\lnk-sttc\thrdp-wn32\thrd-mlt\libboost_thread-clangw8-mt-d-x64-1_69.lib"
DEL
"c:\boost-build\boost\bin.v2\libs\thread\build\clng-win-8.0.0\dbg\adrs-mdl-64\lnk-sttc\thrdp-wn32\thrd-mlt\libboost_thread-clangw8-mt-d-x64-1_69.lib"
C:\Program Files\LLVM\bin\llvm-ar.exe /nologo
/out:"c:\boost-build\boost\bin.v2\libs\thread\build\clng-win-8.0.0\dbg\adrs-mdl-64\lnk-sttc\thrdp-wn32\thrd-mlt\libboost_thread-clangw8-mt-d-x64-1_69.lib"
@"c:\boost-build\boost\bin.v2\libs\thread\build\clng-win-8.0.0\dbg\adrs-mdl-64\lnk-sttc\thrdp-wn32\thrd-mlt\libboost_thread-clangw8-mt-d-x64-1_69.lib.rsp"
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
So this C:\Program Files\LLVM\bin\llvm-ar.exe does not seem to work, and
gets cut down to 'C:\Program', i.e. it's not properly quoted. This would
confirm what Peter said, that he cannot build static libs. I do seem to get
all the .obj files (i.e. stuff compiles), but it's messy.
Just for information. On Windows, for a while [approx. 20+ years] there is
the xcopy command. It [can] copies whole file-trees [with 1 command], and
can do so selectively (f.e. only copy when the source file is newer than
the destination file), it is also possible to make xcopy shut up about what
it copies. It would be helpful to stop doing all the unnecessary copying
[in the build] and also stop all the useless output, which [the output]
makes it extremely hard to see what's actually going on.
degski
--
*“If something cannot go on forever, it will stop" - Herbert Stein*
_______________________________________________
using clang-win : : :
<compatibility>vc14
<compileflags>-fmsc-version=1915
<ranlib>"C:\\Program Files\\LLVM\\bin\\llvm-ranlib.exe"
<archiver>"C:\\Program Files\\LLVM\\bin\\llvm-ar.exe"
<rc>"C:\\Program Files (x86)\\Windows
Kits\\10\\bin\\10.0.17763.0\\x64\\rc.exe"
<compileflags>--target=x86_64-pc-win32
<linkflags>--target=x86_64-pc-win32
<linkflags>-fuse-ld=lld
<linkflags>-flto=thin
<architecture>x86
<address-model>64
<link>static
<runtime-link>static
;
and then I make this call:
b2 -a -d+2 -j2 -o%HOME%\clang_log_debug.log
"-sZLIB_SOURCE=%HOME%\zlib-1.2.8" "-sBZIP2_SOURCE=%HOME%\bzip2-1.0.6"
variant=debug threading=multi --abbreviate-paths --prefix=%PREFIX%
--build-dir=c:\boost-build --without-python --without-mpi --without-math
--disable-filesystem2 install
In my setup, Clang/LLVM (/bin) is in my PATH.
degski
--
*“If something cannot go on forever, it will stop" - Herbert Stein*
_______________________________________________
> What does --debug-clang-configuration say?
>
Well, lots, coz it's doing a build, but just from the beginning:
C:\boost>b2 --debug-clang-configuration
notice: [clang-win] configuring 'clang-cl.exe' version '8.0.0'
notice: [clang-win] 32: using assembler '"C:\\Program Files
(x86)\\Microsoft Visual
Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX64\\x86\ml.exe"'
notice: [clang-win] 32: using archiver 'C:\Program
Files\LLVM\bin\llvm-ar.exe' <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< no
quotes
notice: [clang-win] 32: using manifest-tool 'mt.exe'
notice: [clang-win] 32: using resource-compiler 'rc.exe'
notice: [clang-win] 32: using mc-compiler 'mc.exe'
notice: [clang-win] 32: using idl-compiler 'midl.exe'
notice: [clang-win] 64: using assembler '"C:\\Program Files
(x86)\\Microsoft Visual
Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX64\\x64\ml64.exe"'
notice: [clang-win] 64: using archiver 'C:\Program
Files\LLVM\bin\llvm-ar.exe' <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< no quotes
notice: [clang-win] 64: using manifest-tool 'mt.exe'
notice: [clang-win] 64: using resource-compiler 'rc.exe'
notice: [clang-win] 64: using mc-compiler 'mc.exe'
notice: [clang-win] 64: using idl-compiler 'midl.exe'
Performing configuration checks
- default address-model : 64-bit (cached)
- default architecture : x86 (cached)
Building the Boost C++ Libraries.
- symlinks supported : yes (cached)
- C++11 mutex : yes (cached)
- Boost.Config Feature Check: cxx11_auto_declarations : yes (cached)
- Boost.Config Feature Check: cxx11_constexpr : yes (cached)
- Boost.Config Feature Check: cxx11_defaulted_functions : yes (cached)
- Boost.Config Feature Check: cxx11_final : yes (cached)
- Boost.Config Feature Check: cxx11_hdr_mutex : yes (cached)
- Boost.Config Feature Check: cxx11_hdr_tuple : yes (cached)
- Boost.Config Feature Check: cxx11_lambdas : yes (cached)
- Boost.Config Feature Check: cxx11_noexcept : yes (cached)
- Boost.Config Feature Check: cxx11_nullptr : yes (cached)
- Boost.Config Feature Check: cxx11_rvalue_references : yes (cached)
- Boost.Config Feature Check: cxx11_template_aliases : yes (cached)
- Boost.Config Feature Check: cxx11_thread_local : yes (cached)
- Boost.Config Feature Check: cxx11_variadic_templates : yes (cached)
- has_icu builds : no (cached)
warning: Graph library does not contain MPI-based parallel components.
note: to enable them, add "using mpi ;" to your user-config.jam.
note: to suppress this message, pass "--without-graph_parallel" to bjam.
- zlib : no (cached)
- bzip2 : no (cached)
- lzma : no (cached)
- zstd : no (cached)
- iconv (libc) : no (cached)
- iconv (separate) : no (cached)
- icu : no (cached)
- icu (lib64) : no (cached)
- native-atomic-int32-supported : no (cached)
- message-compiler : yes (cached)
- native-syslog-supported : no (cached)
- pthread-supports-robust-mutexes : no (cached)
- compiler-supports-ssse3 : yes (cached)
- compiler-supports-avx2 : yes (cached)
- gcc visibility : yes (cached)
- long double support : yes (cached)
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.
- libbacktrace builds : no (cached)
- addr2line builds : no (cached)
- WinDbg builds : no (cached)
- WinDbgCached builds : no (cached)
- BOOST_COMP_GNUC >= 4.3.0 : no (cached)
- zlib : no (cached)
- bzip2 : no (cached)
- lzma : no (cached)
- zstd : no (cached)
- C++11 mutex : yes (cached)
- Boost.Config Feature Check: cxx11_auto_declarations : yes (cached)
- Boost.Config Feature Check: cxx11_constexpr : yes (cached)
- Boost.Config Feature Check: cxx11_defaulted_functions : yes (cached)
- Boost.Config Feature Check: cxx11_final : yes (cached)
- Boost.Config Feature Check: cxx11_hdr_mutex : yes (cached)
- Boost.Config Feature Check: cxx11_hdr_tuple : yes (cached)
- Boost.Config Feature Check: cxx11_lambdas : yes (cached)
- Boost.Config Feature Check: cxx11_noexcept : yes (cached)
- Boost.Config Feature Check: cxx11_nullptr : yes (cached)
- Boost.Config Feature Check: cxx11_rvalue_references : yes (cached)
- Boost.Config Feature Check: cxx11_template_aliases : yes (cached)
- Boost.Config Feature Check: cxx11_thread_local : yes (cached)
- Boost.Config Feature Check: cxx11_variadic_templates : yes (cached)
- has_icu builds : no (cached)
- zlib : no (cached)
- bzip2 : no (cached)
- lzma : no (cached)
- zstd : no (cached)
- iconv (libc) : no (cached)
- iconv (separate) : no (cached)
- icu : no (cached)
- icu (lib64) : no (cached)
- native-atomic-int32-supported : no (cached)
- message-compiler : yes (cached)
- native-syslog-supported : no (cached)
- pthread-supports-robust-mutexes : no (cached)
- compiler-supports-ssse3 : yes (cached)
- compiler-supports-avx2 : yes (cached)
- gcc visibility : yes (cached)
- long double support : yes (cached)
- libbacktrace builds : no (cached)
- addr2line builds : no (cached)
- WinDbg builds : no (cached)
- WinDbgCached builds : no (cached)
- BOOST_COMP_GNUC >= 4.3.0 : no (cached)
- zlib : no (cached)
- bzip2 : no (cached)
- lzma : no (cached)
- zstd : no (cached)
Component configuration:
- atomic : building
- chrono : building
- container : building
- context : building
- contract : building
- coroutine : building
- date_time : building
- exception : building
- fiber : building
- filesystem : building
- graph : building
- graph_parallel : building
- iostreams : building
- locale : building
- log : building
- math : building
- mpi : building
- nowide : building
- program_options : building
- python : building
- random : building
- regex : building
- serialization : building
- stacktrace : building
- sync : building
- system : building
- test : building
- thread : building
- timer : building
- type_erasure : building
- wave : building
...patience...
...patience...
...patience...
...patience...
...patience...
...patience...
...found 33480 targets...
...updating 2361 targets...
We're cross-posting now (saw you answered, while writing).
degski
--
*“If something cannot go on forever, it will stop" - Herbert Stein*
_______________________________________________
> Yeah, you'll need to delete all that. Either just `using clang-win ;` or
> nothing at all.
>
So where to add any options/commands? On the command line?
The quoting issue is interesting; I do quote the command, which quoting I
> left from the previous clang-win.jam, but I don't quote the options such
> as
> <archiver>, because msvc.jam doesn't either. It probably needs to be
> consistent, but I'm not sure which way consistent.
>
Not only is it not quoted, but the escape is gone as well.
If you are able to build all, correctly, could you please post a recipe,
like do this, do that... I'm starting from the develop-head of a few hours
ago, those (your) PR's are in there. I have the latest VC-15.8.8, I'm on
Win10-1809, including the CRT's.
I would like to build static libs, x64, statically linked with/instrumented
for lld and thin-lto, optimized for broadwell (release and debug).
degski
--
*“If something cannot go on forever, it will stop" - Herbert Stein*
_______________________________________________
> > If you are able to build all, correctly, ...
>
> I can, but I don't use lld or thin-lto.
>
You should try ThinLTO
<http://blog.llvm.org/2016/06/thinlto-scalable-and-incremental-lto.html>,
it can generate wildly better binary code [and Clang/llvm does not
implement VC's LTO]. For being able to benefit, you'll need lld
<https://clang.llvm.org/docs/ThinLTO.html>, though.
That's a bit odd because clang-win is basically clang-cl.exe, which is the
> cl.exe-compatible driver, and you'll be trying to use decidedly non-cl.exe
> things.
>
As you can spot in the docs <https://clang.llvm.org/docs/ThinLTO.html> ,
clang-cl is specifically mentioned in relation to ThinLTO and lld.
But you can try with your config, I suppose. Use
>
> <archiver>"\"C:\\Program Files\\LLVM\\llvm-ar.exe\""
>
> for now, to manually quote it.
>
I'll try that.
--target, <architecture>, <address-model> shouldn't be needed.
>
How do I get 64-bit binaries then?
As Edward pointed out at length, clang, clang-cl and clang++ are the same
binary. You can pass gcc-like options "through" clang-cl, using the -Xclang
prefix, f.e. '-Xclang -fforce-enable-int128', will make gcc-style 128-bit
ints available on Windows (targeting VC, to keep the ED-speak).
degski
--
*“If something cannot go on forever, it will stop" - Herbert Stein*
_______________________________________________
> But you can try with your config, I suppose. Use
>
> <archiver>"\"C:\\Program Files\\LLVM\\llvm-ar.exe\""
>
> for now, to manually quote it.
>
The correct path is <archiver>"\"C:\\Program
Files\\LLVM\\bin\\llvm-ar.exe\"", but indeed, then it still doesn't work,
without it, it does.
<rc> too.
>
rc, the resource compiler, are you sure that's not a valid Windows-thing?
I did get to compile some 35+ libs, that excludes mpi and python. I did not
yet pass the -flto=thin flag, that seems to cause trouble.
Some random warnings:
...
clang-cl: warning: unknown argument ignored in clang-cl: '-pedantic'
[-Wunknown-argument]
...
In file included from libs\container\src\alloc_lib.c:24:
In file included from libs\container\src/dlmalloc_ext_2_8_6.c:36:
libs\container\src/dlmalloc_2_8_6.c(1878,47): warning: incompatible
pointer types passing 'int *' to parameter of type 'volatile long *'
[-Wincompatible-pointer-types]
...
In file included from libs\contract\src\contract.cpp:11:
In file included from .\boost/contract/detail/inlined.hpp:11:
In file included from .\boost/contract/detail/inlined/core/exception.hpp:18:
In file included from .\boost/exception/diagnostic_information.hpp:11:
.\boost/exception/info.hpp(85,67): warning: expression with side effects
will be evaluated despite being used as an operand to 'typeid'
[-Wpotentially-evaluated-expression]
BOOST_ASSERT(
*BOOST_EXCEPTION_DYNAMIC_TYPEID(*p).type_==*ti.type_ );
^
.\boost/exception/info.hpp(134,21): warning: delete called on non-final
'boost::exception_detail::error_info_container_impl' that has virtual
functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
delete this;
^
...
clang-cl: warning: unknown argument ignored in clang-cl:
'-ftemplate-depth-255' [-Wunknown-argument]
clang-cl: warning: unknown argument ignored in clang-cl:
'-fvisibility=hidden' [-Wunknown-argument]
clang-cl: warning: unknown argument ignored in clang-cl:
'-fvisibility-inlines-hidden' [-Wunknown-argument]
So, overall, progress has been made, great!
degski
--
*“If something cannot go on forever, it will stop" - Herbert Stein*
_______________________________________________
> Whereas the msvc.jam name for this option is <resource-compiler>:
>
I was [by my mind] led into believing "rc" stood for resource compiler. .rc
is also the file-name-ending one would give to resource files.
Your whole configuration was for clang-linux, but you tried to use it with
> clang-win.
>
Yes, too much trial-and-error, not always productive, but we are getting
there.
address-model=64 on the command line, as with msvc.
>
In the meanwhile, I figured that out as well: architecture, address-model
and instruction-set, all on the command line.
degski
--
*“If something cannot go on forever, it will stop" - Herbert Stein*
_______________________________________________