Opened 11 years ago

Last modified 8 years ago

#5943 new Feature Requests

clang++ on windows support (was: clang-linux-3.0 output path for clang++ on Windows)

Reported by: Mateusz Loskot Owned by: Vladimir Prus
Milestone: To Be Determined Component: build
Version: Boost Development Trunk Severity: Problem
Keywords: clang, windows Cc:

Description

I'm doing some test builds on Windows 7 using LLVM and clang from their current SVN trunks.

I define the toolset in my user-config.jam:

# --------------------
# clang configuration.
# --------------------
using clang
    : # version
    3.0
    : # compiler
    g:/dev/llvm/_svn/build/bin/Release/clang++
    : # options
    <cxxflags>-Wno-mismatched-tags
    <cxxflags>-Wno-unused-variable
    ;

This is inspired by Jürgen Hunold's post in configuring the clang toolset.

Then I call bootstrap.bat, works well.

Finally, I try to run Boost.Array test getting this:

g:\dev\boost\_svn\trunk\libs\array\test>bjam
...patience...
...found 291 targets...
...updating 51 targets...
common.mkdir ..\..\..\bin.v2\libs\array
common.mkdir ..\..\..\bin.v2\libs\array\test
common.mkdir ..\..\..\bin.v2\libs\array\test\array0.test
common.mkdir ..\..\..\bin.v2\libs\array\test\array0.test\clang-linux-3.0
common.mkdir ..\..\..\bin.v2\libs\array\test\array0.test\clang-linux-3.0\debug
compile.c++.without-pth ..\..\..\bin.v2\libs\array\test\array0.test\clang-linux-3.0\debug\array0.obj
...

The process eventually stops due to compilation errors, but this is not relevant to this particular issue I'm reporting.

Given the system I'm using, the problem is with the output path specified by Boost.Build which is

...\clang-linux-3.0

Given that I use Windows, this path does not look right.

Attachments (5)

clang.jam (952 bytes ) - added by Minmin Gong <gongminmin@…> 8 years ago.
common.jam (29.1 KB ) - added by Minmin Gong <gongminmin@…> 8 years ago.
lib.jam (2.6 KB ) - added by Minmin Gong <gongminmin@…> 8 years ago.
clang-win.7z (1.8 KB ) - added by Minmin Gong <gongminmin@…> 8 years ago.
boost_clang_on_win.patch.7z (2.4 KB ) - added by Minmin Gong <gongminmin@…> 8 years ago.
Patch for building boost with Clang + MinGW

Download all attachments as: .zip

Change History (8)

comment:1 by René Rivera, 11 years ago

Component: Building Boostbuild
Owner: set to Vladimir Prus
Summary: clang-linux-3.0 output path for clang++ on Windowsclang++ on windows support (was: clang-linux-3.0 output path for clang++ on Windows)
Type: BugsFeature Requests

Since there is currently no support for a windows version of clang in BBv2 this can be considered wither a feature request, or a bug in that it defaults to the clang-linux variation. Since we'd need the windows support to just do a check to detect windows, I'm going to go for a feature request. Hence perhaps this is something you'd like to bring up on the BBv2 list. Especially the whole process of getting a windows clang, and how BBv2 would support it.

comment:2 by Mateusz Loskot, 11 years ago

I must admit, I had had no idea there is no clang support on Windows in the BBv2, so I submitted this ticket. I'm not a heavy user of LLVM/clang on Windows. I just wanted to do quick test and see if Boost.Geometry tests build with this toolset.

I'm not able to contribute to the clang support on Windows for BBv2 myself. So, I'm not sure what I'd like to discuss on the BBv2 list. Perhaps we should leave this ticket open and see if someone interested and competent will want to pick it up.

by Minmin Gong <gongminmin@…>, 8 years ago

Attachment: clang.jam added

by Minmin Gong <gongminmin@…>, 8 years ago

Attachment: common.jam added

by Minmin Gong <gongminmin@…>, 8 years ago

Attachment: lib.jam added

by Minmin Gong <gongminmin@…>, 8 years ago

Attachment: clang-win.7z added

comment:3 by Minmin Gong <gongminmin@…>, 8 years ago

I've made a patch for building boost with Clang + MinGW on Windows. boost\tools\build\v2\tools\clang.jam, boost\tools\build\v2\tools\common.jam and boost\tools\build\v2\tools\types\lib.jam are modified, and one more file boost\tools\build\v2\tools\clang_win.jam is added.

This is tested on Clang 3.5.0 SVN trunk, with MinGW-w64 4.8.2.

by Minmin Gong <gongminmin@…>, 8 years ago

Attachment: boost_clang_on_win.patch.7z added

Patch for building boost with Clang + MinGW

Note: See TracTickets for help on using tickets.