Skip to content

Commit d361cdf

Browse files
committed
Noissue - Use clang++ and libc++ on Linux
https://codereview.adblockplus.org/29817566/
1 parent 786e16c commit d361cdf

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ os:
77
dist: trusty
88
sudo: false
99

10+
compiler: clang
11+
1012
addons:
1113
apt:
1214
sources:
1315
- 'ubuntu-toolchain-r-test'
1416
packages:
1517
- binutils-gold
1618
- libcurl4-openssl-dev
17-
- g++-7
1819
- p7zip-full
1920

2021
python: '2.7'
@@ -32,7 +33,6 @@ env:
3233
before_script:
3334
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
3435
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install p7zip; fi
35-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CXX=g++-7 CC=gcc-7; fi
3636
- make get-prebuilt-v8
3737
- ./ensure_dependencies.py
3838
- if [[ "${TARGET_OS}" == "android" && "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip -O third_party/android-ndk.zip ; fi

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ifndef HOST_OS
55
ifeq (${raw_OS},Linux)
66
HOST_OS=linux
77
TRAVIS_OS_NAME=linux
8+
CXX=clang++
89
else ifeq (${raw_OS},Darwin)
910
HOST_OS=mac
1011
TRAVIS_OS_NAME=osx

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,13 @@ Win32:
3030
* At least v141 Visual C++ toolset (available in Microsoft Visual Studio 2017).
3131

3232
Linux:
33-
* g++ 7.3
33+
* clang 5.0
34+
We use libc++ instead of the libstdc++ that gcc uses, since by default v8 build
35+
with libc++.
3436

3537
Mac:
36-
* Apple LLVM 9.1.0 for OS X/macOS (Xcode should be installed and its developer tools should be "selected").
38+
* Apple LLVM 9.0.0 for OS X/macOS (Xcode should be installed and its
39+
developer tools should be "selected").
3740

3841
Android:
3942
* The host system should be Linux or OS X

common.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Adding -fpermissive to solve this.
1515
# See https://issues.adblockplus.org/ticket/4950
1616
# We might be able to do without after upgrading V8.
17-
'cflags_cc': [ '-fno-rtti', '-std=c++14', '-fexceptions', '-fpermissive' ],
17+
'cflags_cc': [ '-fno-rtti', '-std=c++14', '-fexceptions', '-fpermissive', '-stdlib=libc++' ],
1818
'cflags!': [ '-Werror', ],
1919
'ldflags': [ '-pthread', ],
2020
},

0 commit comments

Comments
 (0)