Skip to content

Commit 0a7daa7

Browse files
committed
fix: make std c++17
1 parent d936b19 commit 0a7daa7

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

.github/workflows/CI.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@ jobs:
4242
path: node_modules
4343
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ matrix.node_arch }}-${{ hashFiles('package.json') }}
4444

45-
- name: Install Compiler for Ubuntu 16.04
46-
if: ${{ contains(matrix.os, 'ubuntu-16.04') }}
47-
run: |
48-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
49-
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-9 10
50-
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-9 10
51-
sudo update-alternatives --config clang
52-
sudo update-alternatives --config clang++
53-
54-
- name: Set Compiler for Ubuntu
55-
run: |
56-
echo "CC=clang" >> $GITHUB_ENV
57-
echo "CXX=clang++" >> $GITHUB_ENV
45+
# - name: Install Compiler for Ubuntu 16.04
46+
# if: ${{ contains(matrix.os, 'ubuntu-16.04') }}
47+
# run: |
48+
# sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
49+
# sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-9 10
50+
# sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-9 10
51+
# sudo update-alternatives --config clang
52+
# sudo update-alternatives --config clang++
53+
54+
# - name: Set Compiler for Ubuntu
55+
# run: |
56+
# echo "CC=clang" >> $GITHUB_ENV
57+
# echo "CXX=clang++" >> $GITHUB_ENV
5858

5959
- name: Install Node
6060
uses: actions/[email protected]

binding.gyp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
'Release': {
1414
'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS', 'NDEBUG' ],
1515
"cflags": [ "-fno-exceptions", "-Ofast" ],
16-
"cflags_cc": [ "-fno-exceptions", "-Ofast", "-std=c++2a", "-stdlib=libc++" ],
16+
"cflags_cc": [ "-fno-exceptions", "-Ofast", "-std=c++17" ],
1717
"xcode_settings": {
1818
'GCC_OPTIMIZATION_LEVEL': '3', # stop gyp from defaulting to -Os
1919
"CLANG_CXX_LIBRARY": "libc++",
20-
"CLANG_CXX_LANGUAGE_STANDARD":"c++2a",
20+
"CLANG_CXX_LANGUAGE_STANDARD":"c++17",
2121
'MACOSX_DEPLOYMENT_TARGET': '10.15'
2222
},
2323
"msvs_settings": {
@@ -50,7 +50,7 @@
5050
'-fexceptions', # enable exceptions
5151

5252
# C++ standard
53-
"-std=c++2a",
53+
"-std=c++17",
5454
"-stdlib=libc++",
5555

5656
# Clang warnings
@@ -108,7 +108,7 @@
108108
'GCC_OPTIMIZATION_LEVEL': '0', # stop gyp from defaulting to -Os
109109
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
110110
"CLANG_CXX_LIBRARY": "libc++",
111-
"CLANG_CXX_LANGUAGE_STANDARD":"c++2a",
111+
"CLANG_CXX_LANGUAGE_STANDARD":"c++17",
112112
'MACOSX_DEPLOYMENT_TARGET': '10.15'
113113
} # XCODE
114114
}, # Debug

0 commit comments

Comments
 (0)