Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost 1.68.0, clang, windows
From: degski (degski_at_[hidden])
Date: 2018-07-07 03:54:13


On 7 July 2018 at 05:36, JR Cary via Boost-users <
boost-users_at_[hidden]> wrote:

> clang-cl
>

Somewhere between 1.66 and 1.67, I've built (most) of Boost successfully,
regex failed, but John fixed that almost immediately. As you see, it's
quite dated (you have to update the version numbers everywhere, to make
them correspond to you're setup), as I never bothered with 1.67. But as I
also use Clang/LLVM, I'd like to build a thin-lto instrumented Boost for
use with Clang/LLVM, so a.s.a. 1.68 comes out I'll give it a go.

I used this project-config.jam file:

-----------------------------------

import option ;

using clang : 6.0 :

  "C:/Program Files/LLVM/bin/clang++.exe" :
  <compileflags>-fmsc-version=1911

  <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.16299.0/x64/rc.exe"

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

  <cxxflags>-Wno-gnu-string-literal-operator-template
  <cxxflags>-Xclang <cxxflags>-flto-visibility-public-std

  <cxxflags>-fno-ms-compatibility
  <cxxflags>-fno-delayed-template-parsing
  <cxxflags>-Wno-dynamic-exception-spec # TODO: file bug to MS
  <cxxflags>-Wno-c++11-narrowing # TODO: wut
  <cxxflags>-D_WINSOCK_DEPRECATED_NO_WARNINGS # TODO: wut

  <cxxflags>-std=c++17
  <cxxflags>-Wunused-command-line-argument

  <cxxflags>-DBOOST_USE_WINDOWS_H
  <cxxflags>-DBOOST_NO_ANSI_APIS

  <cxxflags>-DBOOST_USE_WINAPI_VERSION=0x1000
  <cxxflags>-DBOOST_USE_WINDOWS_H=1
  <cxxflags>-D_WIN32_WINNT=0x1000

  <cxxflags>-D_MT
  <cxxflags>-D_WIN32
  <cxxflags>-D_WIN64
  <cxxflags>-DNOMINMAX
  <cxxflags>-DWIN32_LEAN_AND_MEAN
  <cxxflags>-D_HAS_AUTO_PTR_ETC=1
  <cxxflags>-D_ITERATOR_DEBUG_LEVEL=0
  <cxxflags>-D_CRT_DECLARE_NONSTDC_NAMES=1 # clang defines __STDC__, cl
does not (see definition of _CRT_INTERNAL_NONSTDC_NAMES)

  #
<cxxflags>-IC:/PROGRA~2/MICROS~1/2017/COMMUN~1/VC/Tools/MSVC/1411~1.255/atlmfc/include
  #
<linkflags>-LC:/PROGRA~2/MICROS~1/2017/COMMUN~1/VC/Tools/MSVC/1411~1.255/atlmfc/lib/x64
  ;

option.set keep-going : false ;

--------------------------------------------

For the rest it's just the normal process, like with VC.

degski

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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net